Aliyun CentOS 7 system mounts the tutorial for SSD cloud disk

  • 2020-05-13 04:22:07
  • OfStack

1. Check SSD cloud disk


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 

You can see that the SSD system has been identified as /dev/vdb

2. Format cloud disk


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. Mount


sudo mount /dev/vdb /opt 

Mount cloud disk to the /opt directory.

4. Configure automatic mount after startup

Modify the /etc/fstab file and add at the end of the file


/dev/vdb /opt ext4 defaults 0 0 

5. Restart the check

use


init 6 

Elegant restart system.

use


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 

You can see that the system has mounted SSD cloud disk.

conclusion

This is the whole content of mounting SSD cloud disk method on aliyun CentOS 7. I hope the content of this article can bring you some help in your study or work. If you have any questions, you can leave a message to communicate.


Related articles: