# pvdisplay "/dev/sdb" is a new physical volume of "2.00 GiB" --- NEW Physical volume --- PV Name /dev/sdb VG Name PV Size 2.00 GiB Allocatable NO PE Size 0 Total PE 0 Free PE 0 Allocated PE 0 PV UUID Mt3F7z-a2AV-28Vn-uXe2-QejE-Z6tP-UMlQGM
"/dev/sdc" is a new physical volume of "2.00 GiB" --- NEW Physical volume --- PV Name /dev/sdc VG Name PV Size 2.00 GiB Allocatable NO PE Size 0 Total PE 0 Free PE 0 Allocated PE 0 PV UUID 5m1Fuc-yTRn-I2vG-bMfU-6SE7-53EA-s8VQjt
"/dev/sdd" is a new physical volume of "2.00 GiB" --- NEW Physical volume --- PV Name /dev/sdd VG Name PV Size 2.00 GiB Allocatable NO PE Size 0 Total PE 0 Free PE 0 Allocated PE 0 PV UUID 1x3e2A-C0Lt-DrUA-tPSM-lsMu-sn70-qg1j8p
# vgdisplay vg01 --- Volume group --- VG Name vg01 System ID Format lvm2 Metadata Areas 3 Metadata Sequence No 1 VG Access read/write VG Status resizable MAX LV 0 Cur LV 0 Open LV 0 Max PV 0 Cur PV 3 Act PV 3 VG Size 5.99 GiB PE Size 4.00 MiB Total PE 1533 Alloc PE / Size 0 / 0 Free PE / Size 1533 / 5.99 GiB VG UUID Cw7GGz-NH3o-Sax2-5jPv-buZS-938T-tmNKFa
使用 vgchange 命令可以 activate/deactivate 卷组。 激活卷组:
1 2
# vgchange -a n vg01 0 logical volume(s) in volume group "vg01" now active
停用卷组:
1 2
# vgchange -a y vg01 1 logical volume(s) in volume group "vg01" now active
# mkfs.ext4 /dev/vg01/lvol01 mke2fs 1.41.12 (17-May-2010) Filesystem label= OS type: Linux Block size=4096 (log=2) Fragment size=4096 (log=2) Stride=0 blocks, Stripe width=0 blocks 65536 inodes, 262144 blocks 13107 blocks (5.00%) reserved for the super user First data block=0 Maximum filesystem blocks=268435456 8 block groups 32768 blocks per group, 32768 fragments per group 8192 inodes per group Superblock backups stored on blocks: 32768, 98304, 163840, 229376