|
我们再将这两个物理卷(PV)加到一个叫做“test”的卷组(VG)中:
# vgcreate test /dev/hdb2 /dev/hda3 vgcreate -- INFO: using default physical extent size 4 MB vgcreate -- INFO: maximum logical volume size is 255.99 Gigabyte vgcreate -- doing automatic backup of volume group "test" vgcreate -- volume group "test" successfully created and activated
现在我们有一个空的卷组(VG),让我们来检查一下:
# vgdisplay -v test --- Volume group --- VG Name test VG Access read/write VG Status available/resizable VG # 0 MAX LV 256 Cur LV 0 Open LV 0 MAX LV Size 255.99 GB Max PV 256 Cur PV 2 Act PV 2 VG Size 184 MB PE Size 4 MB Total PE 46 Alloc PE / Size 0 / 0 Free PE / Size 46 / 184 MB
--- No logical volumes defined in test ---
--- Physical volumes --- PV Name (#) /dev/hda3 (2) PV Status available / allocatable Total PE / Free PE 13 / 13
PV Name (#) /dev/hdb2 (1) PV Status available / allocatable Total PE / Free PE 33 / 33
这里的许多数据--大多数现在都容易理解了。我们看到没有逻辑卷(LV)定义,因此我们要补上它。我们将在“test”卷组(PV)中创建一个50MB的逻辑卷,叫做“HOWTO”:
# lvcreate -L 50M -n HOWTO test lvcreate -- rounding up size to physical extent boundary "52 MB" lvcreate -- doing automatic backup of "test" lvcreate -- logical volume "/dev/test/HOWTO" successfully created
Ok,到这里,我们创建一个文件系统:
# mke2fs /dev/test/HOWTO mke2fs 1.18, 11-Nov-1999 for EXT2 FS 0.5b, 95/08/09 Filesystem label= OS type: Linux Block size=1024 (log=0) Fragment size=1024 (log=0) 13328 inodes, 53248 blocks 2662 blocks (5.00%) reserved for the super user First data block=1 7 block groups 8192 blocks per group, 8192 fragments per group 1904 inodes per group Superblock backups stored on blocks: 8193, 24577, 40961
Writing inode tables: done Writing superblocks and filesystem accounting information: done # mount /dev/test/HOWTO /mnt # ls /mnt lost+found
我们做完了!让我们回顾我们的卷组(VG),它现在充满了一些东西:
# vgdisplay test -v --- Volume group --- VG Name test VG Access read/write VG Status available/resizable VG # 0 MAX LV 256 Cur LV 1 Open LV 1 MAX LV Size 255.99 GB Max PV 256 Cur PV 2 Act PV 2 VG Size 184 MB PE Size 4 MB Total PE 46 Alloc PE / Size 13 / 52 MB Free PE / Size 33 / 132 MB
--- Logical volume --- LV Name /dev/test/HOWTO VG Name test LV Write Access read/write LV Status available LV # 1 # open 1 LV Size 52 MB Current LE 13 Allocated LE 13 Allocation next free Read ahead sectors 120 Block device 58:0
|