1、创建pv
[root@autodeploy nfs]# pvcreate /dev/vdd1WARNING: xfs signature detected on /dev/vdd1 at offset 0. Wipe it? [y/n]: y Wiping xfs signature on /dev/vdd1. Physical volume "/dev/vdd1" successfully created[root@autodeploy nfs]# pvcreate /dev/vde1 Physical volume "/dev/vde1" successfully created2、创建vg
[root@autodeploy nfs]# vgcreate nfs_vg /dev/vdd1 /dev/vde1 Volume group "nfs_vg" successfully created 3、创建lv [root@autodeploy ~]# lvcreate -l 100%FREE -n nfs_lv nfs_vg Logical volume "nfs_lv" created. 大小可以指定,比如: lvcreate -l 100G -n nfs_lv nfs_vg 4、格代化lv为xfs [root@autodeploy dev]# mkfs.xfs /dev/nfs_vg/nfs_lvmeta-data=/dev/nfs_vg/nfs_lv isize=256 agcount=4, agsize=262143488 blks = sectsz=512 attr=2, projid32bit=1 = crc=0 finobt=0data = bsize=4096 blocks=1048573952, imaxpct=5 = sunit=0 swidth=0 blksnaming =version 2 bsize=4096 ascii-ci=0 ftype=0log =internal log bsize=4096 blocks=511999, version=2 = sectsz=512 sunit=0 blks, lazy-count=1realtime =none extsz=4096 blocks=0, rtextents=05、新加入一块100G的盘
pvcreate /dev/vdf1把pv加到VG中:vgextend nfs_vg /dev/vdf1
将逻辑卷分区VG(nfs_vg)增加100G:lvextend -L +100G /dev/nfs_vg/nfs_lv
调整xfs: resize2fs -p /dev/nfs_vg/nfs_lv