Linux挂载磁盘

1、df -h查看是否已挂载

https://cdn.nlark.com/yuque/0/2022/png/786486/1648806692904-64d0dacd-4ae4-4073-b708-95faca67e31a.png

2、fdisk -l查看磁盘

https://cdn.nlark.com/yuque/0/2022/png/786486/1648807120058-6395fc32-2304-42b4-98f2-415e5c7c4b4c.png

3、fdisk /dev/vdc创建分区表

https://cdn.nlark.com/yuque/0/2022/png/786486/1648807360759-cecf308a-77a9-4f60-920b-0086f6b78fdb.png

4、mkdir -p /data 创建目录

5、mkfs.xfs /dev/vdc1挂载磁盘,mount /dev/vdc1 /data挂载到dada

https://cdn.nlark.com/yuque/0/2022/png/786486/1648807651027-279e3aa0-8cc4-4cc5-9cc2-5a4356cd9fea.png

6、vi /etc/fstab编辑fstab

https://cdn.nlark.com/yuque/0/2022/png/786486/1648807950583-f3c66aa3-919c-4c48-a5f1-2d7f1e650d38.png

7、df -h查看磁盘情况, cat /etc/fstab查看磁盘挂载情况

https://cdn.nlark.com/yuque/0/2022/png/786486/1648807833119-62663e1d-af8b-44d6-b9ce-b8bf3fa56824.png

posted @ 2022-08-09 11:32  fxsen  阅读(53)  评论(0编辑  收藏  举报