标签:defaults code guide 格式 mkf mount blkid size roo
aws的话挂载的ebs需要格式化,参考:
https://docs.aws.amazon.com/zh_cn/AWSEC2/latest/UserGuide/ebs-using-volumes.html
[root@oride-dr-algo1 .ssh]# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
nvme0n1 259:1 0 30G 0 disk
└─nvme0n1p1 259:2 0 30G 0 part /
nvme1n1 259:0 0 500G 0 disk
file -s /dev/nvme1n1
mkfs -t xfs /dev/nvme1n1
mount /dev/nvme1n1 /data
#添加开机启动,不然启动后挂载会丢失
cp /etc/fstab /etc/fstab.orig
查看设备的uuid
blkid
/dev/nvme1n1: UUID="d75ddf68-d300-4f66-a484-f76a53868e38" TYPE="xfs"
vim /etc/fstab
UUID=5d95cbda-ece5-42a7-aa57-15070030a904 /data xfs defaults,nofail 0 2
要检查条目是否有效:
umount /data #强制: umount -f /data
mount -a
也可直接reboot测试
标签:defaults code guide 格式 mkf mount blkid size roo
原文地址:https://www.cnblogs.com/hongfeng2019/p/11351099.html