Logical Volume Group
Logical Volumes
- Code: Select all
# lvmdiskscan
/dev/hda [ 9.54 GB]
/dev/hda1 [ 101.94 MB]
/dev/hda2 [ 7.94 GB]
/dev/hda3 [ 1.49 GB]
/dev/hdb [ 3.02 GB]
/dev/hdd [ 7.87 GB]
/dev/hdd1 [ 1.00 GB]
/dev/hdd2 [ 6.86 GB]
3 disks
5 partitions
0 LVM physical volume whole disks
0 LVM physical volumes
- Code: Select all
# pvcreate /dev/hdb /dev/hdd
No physical volume label read from /dev/hdb
Physical volume "/dev/hdb" successfully created
No physical volume label read from /dev/hdd
Physical volume "/dev/hdd" successfully created
- Code: Select all
# vgcreate data_lvm /dev/hdb /dev/hdd
Volume group "data_lvm" successfully created
- Code: Select all
# vgdisplay
--- Volume group ---
VG Name data_lvm
System ID
Format lvm2
Metadata Areas 2
Metadata Sequence No 1
VG Access read/write
VG Status resizable
MAX LV 255
Cur LV 0
Open LV 0
Max PV 255
Cur PV 2
Act PV 2
VG Size 10.89 GB
PE Size 4.00 MB
Total PE 2788
Alloc PE / Size 0 / 0
Free PE / Size 2788 / 10.89 GB
VG UUID uJaZGq-ri8h-inuU-Lxp7-Z1rj-PqLs-Hlz1Ge
- Code: Select all
# vgchange -ay data_lvm
1 logical volume(s) in volume group "data_lvm" now active
- Code: Select all
# lvcreate -L2G -ndatavol1 data_lvm
Logical volume "datavol1" created
- Code: Select all
# mkfs.ext3 /dev/data_lvm/datavol1
mke2fs 1.35 (28-Feb-2004)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
262144 inodes, 524288 blocks
26214 blocks (5.00%) reserved for the super user
First data block=0
16 block groups
32768 blocks per group, 32768 fragments per group
16384 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912
Writing inode tables: done
Creating journal (8192 blocks): done
Writing superblocks and filesystem accounting information: done
This filesystem will be automatically checked every 29 mounts or
180 days, whichever comes first. Use tune2fs -c or -i to override.
