博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
阿里云CentOS7挂载SSD云盘的方法
阅读量:4543 次
发布时间:2019-06-08

本文共 1932 字,大约阅读时间需要 6 分钟。

阿里云购买的第2块云盘默认是不自动挂载的,需要手动配置挂载上。

1.查看SSD云盘

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

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

2.格式化云盘

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

 

3.挂载

[python]
  1. sudo mount /dev/vdb  /opt  

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

4.配置开机自动挂载

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

[python]
  1. /dev/vdb   /opt ext4    defaults    0  0  

5.重启检查

使用

[python]
  1. init 6  

优雅的重启系统。

使用

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

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

 

http://blog.csdn.net/skykingf/article/details/51994680

转载于:https://www.cnblogs.com/lixiuran/p/6756203.html

你可能感兴趣的文章
[转]c# System.IO.Ports SerialPort Class
查看>>
14. 最长公共前缀
查看>>
Redis文档
查看>>
项目重构
查看>>
(笔试题)和一半的组合数
查看>>
leetcode--Algorithm--Array_Part 1 Easy- 566 Reshape the Matrix
查看>>
AC自动机算法详解 (转载)
查看>>
python3-day5(模块)
查看>>
Linux配置JDK
查看>>
qt 读取xml文件
查看>>
python3之正则表达式
查看>>
Visual Studio提示“无法启动IIS Express Web服务器”的解决方法
查看>>
Java 时间总结
查看>>
jQuery EasyUI 拖放 – 基本的拖动和放置
查看>>
这些年正Android - 母亲
查看>>
[工具] BurpSuite--XssValidator插件
查看>>
LPC1788系统时钟初始化
查看>>
channel vs mutex
查看>>
页面布局(--FlowLayout,--BorderLayout,--GridLayout)
查看>>
实验吧--web--你真的会php吗
查看>>