aws的話掛載的ebs須要格式化,參考:
https://docs.aws.amazon.com/zh_cn/AWSEC2/latest/UserGuide/ebs-using-volumes.htmlhtml
[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 diskvim
file -s /dev/nvme1n1
mkfs -t xfs /dev/nvme1n1
mount /dev/nvme1n1 /data
#添加開機啓動,否則啓動後掛載會丟失
cp /etc/fstab /etc/fstab.orig
查看設備的uuid
blkid或ls -l /dev/disk/by-uuid/
/dev/nvme1n1: UUID="d75ddf68-d300-4f66-a484-f76a53868e38" TYPE="xfs"centos
vim /etc/fstab
UUID=5d95cbda-ece5-42a7-aa57-15070030a904 /data xfs defaults,nofail 0 2ssh
要檢查條目是否有效:
umount /data #強制: umount -f /data
mount -aide
也可直接reboot測試測試
ufile:ui
ufile擴容系統盤直接在控制檯上操做,擴容系統盤需從新mountcentos7
https://docs.ucloud.cn/compute/uhost/guide/diskhtm
fdisk -lblog
df -ihT
centos7:
umount /dev/vdb
xfs_repair /dev/vdb
mount /dev/vdb /data
xfs_growfs /data
#新加數據盤的話需先格式化再掛載
mkfs.xfs /dev/vdb
mount /dev/vdb /data
centos6:
umount /dev/vdb
e2fsck -f /dev/vdb
resize2fs /dev/vdb
mount /dev/vdb /data
注: 遇到umount busy的狀況
能夠 fuser -m /data看下佔用/data的程序,關掉這些程序再卸載