日常运维操作

记录一些日常操作

GPT的磁盘如何扩容?

# 查看分区类型,确认是gpt格式
fdisk -l
# 查看磁盘挂载路径
mount | grep "/dev/vdc"
# 检查是否被占用,并卸载磁盘
umount +d /dev/vdc1
umount /dev/vdc1
# 复查
mount | grep "/dev/vdc"
# 使用parted工具调整GPT分区大小(如果提示修复,直接Fix,然后再操作)
parted /dev/vdc
(parted) print
(parted) resizepart 1 100%
(parted) print
(parted) quit
# 检查文件系统一致性(如果提示修复,都修复了,不然无法resize2fs)
e2fsck -f /dev/vdc1
# 调整文件系统大小
resize2fs /dev/vdc1
# 挂回去
mount -a

Have you had a chance to answer the previous question?

Yes, after a few months we finally found the answer. Sadly, Mike is on vacations right now so I'm afraid we are not able to provide the answer at this point.