gpt4 book ai didi

阿里云CentOS 7系统挂载SSD云盘的教程

转载 作者:qq735679552 更新时间:2022-09-27 22:32:09 31 4
gpt4 key购买 nike

CFSDN坚持开源创造价值,我们致力于搭建一个资源共享平台,让每一个IT人在这里找到属于你的精彩世界.

这篇CFSDN的博客文章阿里云CentOS 7系统挂载SSD云盘的教程由作者收集整理,如果你对这篇文章有兴趣,记得点赞哟.

1、查看SSD云盘 。

?
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
sudo fdisk -l
 
Disk /dev/vda : 42.9 GB, 42949672960 bytes, 83886080 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical /physical ): 512 bytes / 512 bytes
I /O size (minimum /optimal ): 512 bytes / 512 bytes
Disk label type : dos
Disk identifier: 0x635e6c7d
 
  Device Boot  Start   End  Blocks Id System
/dev/vda1   2048 83886079 41942016 83 Linux
 
Disk /dev/vdb : 107.4 GB, 107374182400 bytes, 209715200 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical /physical ): 512 bytes / 512 bytes
I /O size (minimum /optimal ): 512 bytes / 512 bytes

可以看到SSD系统已经识别为/dev/vdb 。

2、格式化云盘 。

?
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
sudo mkfs.ext4 /dev/vdb
mke2fs 1.42.9 (28-Dec-2013)
Filesystem label=
OS type : Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
6553600 inodes, 26214400 blocks
1310720 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=2174746624
800 block groups
32768 blocks per group, 32768 fragments per group
8192 inodes per group
Superblock backups stored on blocks:
   32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
   4096000, 7962624, 11239424, 20480000, 23887872
 
Allocating group tables: done       
Writing inode tables: done       
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: done

3、挂载 。

?
1
sudo mount /dev/vdb /opt

将云盘挂载到/opt目录下.

4、配置开机自动挂载 。

修改/etc/fstab文件,文件末尾添加 。

?
1
/dev/vdb /opt ext4 defaults 0 0

5、重启检查 。

使用 。

?
1
init 6

优雅的重启系统.

使用 。

?
1
2
3
4
5
6
7
8
9
sudo df -h
Filesystem  Size Used Avail Use% Mounted on
/dev/vda1  40G 3.6G 34G 10% /
devtmpfs  1.9G  0 1.9G 0% /dev
tmpfs   1.9G  0 1.9G 0% /dev/shm
tmpfs   1.9G 8.4M 1.9G 1% /run
tmpfs   1.9G  0 1.9G 0% /sys/fs/cgroup
/dev/vdb   99G 61M 94G 1% /opt
tmpfs   380M  0 380M 0% /run/user/1000

可以看到系统已挂载了SSD云盘.

总结 。

以上就是阿里云CentOS 7挂载SSD云盘方法的全部内容,希望本文的内容对大家的学习或者工作能带来一定的帮助,如果有疑问大家可以留言交流.

原文链接:http://blog.csdn.net/skykingf/article/details/51994680 。

最后此篇关于阿里云CentOS 7系统挂载SSD云盘的教程的文章就讲到这里了,如果你想了解更多关于阿里云CentOS 7系统挂载SSD云盘的教程的内容请搜索CFSDN的文章或继续浏览相关文章,希望大家以后支持我的博客! 。

31 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com