腾讯云liunx挂载云硬盘

  • 查看数据盘

       请以root用户执行以下命令:

[root@VM_39_211_centos ~]# fdisk -l

复制代码

1.png 

  • 添加分区

[root@VM_39_211_centos ~]# fdisk /dev/vdb

2.png 

  • 格式化分区

[root@VM_39_211_centos ~]# mkfs.ext4 /dev/vdb1

3.png 

  • 设置自动挂载

[root@VM_39_211_centos ~]# mkdir -p /data
[root@VM_39_211_centos ~]# echo '/dev/vdb1 /data ext4 defaults 0 0' >> /etc/fstab
[root@VM_39_211_centos ~]# mount -a
[root@VM_39_211_centos ~]# df -Th

4.png 


猜你喜欢

转载自blog.51cto.com/13717297/2169234