标签:mount -a 执行 lvcreate 识别 vgcreate 命令执行 linu creat mkdir
新添加磁盘,LVM创建过程:
首先添加上新的磁盘,让系统识别到
pvcreate /dev/sdb1
vgcreate storage /dev/sdb1
lvcreate -n vo -L 150M storage
mkfs.ext4 /dev/storage/vo 或者mkfs.xfs /dev/sdb1
mkdir /root/linuxprobe
mount /dev/storage/vo /root/linuxprobe
df -h
vim /etc/fstab
/dev/storage/vo /root/linuxprobe ext4 defaults 0 0
或者直接用下面命令执行:
echo "/dev/storage/vo /root/linuxprobe ext4 defaults 0 0" >> /etc/fstab
(注意:扩容后ext4要umount后再自检,xfs格式则需要mount后才能自检)
使用blkid查看格式,lsblk查看树状列表
umount /linuxprobe
lvextend -L 290M /dev/storage/vo
e2fsck -f /dev/storage/vo
resize2fs /dev/storage/vo
mount -a
df -h
mount /linuxprobe
lvextend -L 290M /dev/storage/vo
xfs_growfs /dev/linuxprobe/vo
df -h
LVM
标签:mount -a 执行 lvcreate 识别 vgcreate 命令执行 linu creat mkdir
原文地址:https://www.cnblogs.com/biglu/p/10801110.html