# fdisk -l Disk /dev/vdb: 8796.1 GB, 8796093022208 byte
# pvcreate /dev/vdb Physical volume "/dev/vdb" successfully created # vgcreate data_vga1 /dev/vdb Volume group "data_vga1" successfully created # lvcreate -L 8790G -n data_lv1 data_vga1 Volume group "data_vga1" has insufficient free space (2097151 extents): 2250240 required. #报错,区块错误,我们查看一下 # vgdisplay PE Size 4.00 MiB Free PE / Size 2097151 / 8.00 TiB #可以看到2097151X4= 8388604/1024=8191.996,我们可以这样 # lvcreate -L 8191G -n data_lv1 data_vga1或者 #lvcreate -l2097151 -n data_lv1 data_vga1 #lvs
LV VG Attr LSize Pool Origin Data% Move Log Copy% Convert
root backup-vg -wi-ao--- 75.72g
swap_1 backup-vg -wi-ao--- 4.00g
data_lv1 data_vga1 -wi-a---- 8.00t
格式化
# mkfs.ext4 /dev/data_vga1/data_lv1
Writing superblocks and filesystem accounting information:
done