home

logical volumes
create logical volume Cannot find Physical Volumes for LVM

good note for creating logical volumes

Logical Volume Manager:

system-config-lvm

using system-config-lvm

 

Create logical volume

1, - initialize the SCSI disk

pvcreate -> physical volumes

2. Create the volume group-
vgcreate -> volume group

vgdisplay 

3. Create the logical volumes on the volume group

lvcreate -> logical volumes

3. Create the file system on the logical volumes

mkdf /dev/mo_volume_group/mo_logical_volume_name

3. Mount the file system

mount /dev/mo_volume_group/mo_logical_volume_name/mnt

 

Physical volumes show up in /dev

initalize the SCSI disk /dev/sdb:

# pvcreate /dev/sdb
Physical volume "/dev/sdb" successfully created

A volume group - the logical volumes and physical volumes in one

# vgcreate osvg /dev/sdb
Volume group "osvg" successfully created

vgdisplay output
[root@earth dev]# vgdisplay
--- Volume group ---
VG Name osvg
System ID
Format lvm2
Metadata Areas 1
Metadata Sequence No 8
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 7
Open LV 7
Max PV 0
Cur PV 1
Act PV 1
VG Size 135.87 GB
PE Size 4.00 MB
Total PE 34783
Alloc PE / Size 34783 / 135.87 GB
Free PE / Size 0 / 0
VG UUID 7hjrr1-h7gZ-X3uO-P9RN-Vvd3-B8wT-K2vgTx

 

A logical volume is like a disk partion. Create a logcial volume in an existing volume group

# lvcreate -L 10 -n my_logic_volume_name my_volume_group
Rounding up size to full physical extent 12.00 MB
Logical volume "my_logic_volume_name" created