home

 

Cannot find Physical Volumes for LVM

# /usr/sbin/vgdisplay -vv

output

vgdisplay output

[root@earth ~]# vgdisplay -vv
Setting global/locking_type to 1
File-based locking selected.
Setting global/locking_dir to /var/lock/lvm
Finding all volume groups
/dev/ramdisk: No label detected
/dev/root: No label detected
/dev/ram: No label detected
/dev/sda1: No label detected
/dev/osvg/lvvar: No label detected
/dev/ram2: No label detected
/dev/sda2: lvm2 label detected
/dev/osvg/lvtmp: No label detected
/dev/ram3: No label detected
/dev/osvg/lvusr: No label detected
/dev/ram4: No label detected
/dev/osvg/lvhome: No label detected
/dev/ram5: No label detected
/dev/osvg/lvvarlog: No label detected
/dev/ram6: No label detected
/dev/osvg/LogVol01: No label detected
/dev/ram7: No label detected
/dev/ram8: No label detected
/dev/ram9: No label detected
/dev/ram10: No label detected
/dev/ram11: No label detected
/dev/ram12: No label detected
/dev/ram13: No label detected
/dev/ram14: No label detected
/dev/ram15: No label detected
Locking /var/lock/lvm/V_osvg RB
Finding volume group "osvg"
/dev/sda2: lvm2 label detected
--- 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

--- Logical volume ---
LV Name /dev/osvg/lvroot
VG Name osvg
LV UUID RVd9tU-huNJ-BcTM-keOI-omBo-PvQ2-rjquC4
LV Write Access read/write
LV Status available
# open 1
LV Size 7.62 GB
Current LE 1950
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 253:0

--- Logical volume ---
LV Name /dev/osvg/lvvar
VG Name osvg
LV UUID PfoiTQ-CacM-1YXL-9QmF-0vSR-pdQQ-vz4UTo
LV Write Access read/write
LV Status available
# open 1
LV Size 4.79 GB
Current LE 1225
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 253:1

--- Logical volume ---
LV Name /dev/osvg/lvtmp
VG Name osvg
LV UUID DuVqhC-eMA5-KQiO-mzlu-5LHu-oU2w-51BTie
LV Write Access read/write
LV Status available
# open 1
LV Size 39.06 GB
Current LE 10000
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 253:2

--- Logical volume ---
LV Name /dev/osvg/lvusr
VG Name osvg
LV UUID toRlNu-DCuT-vdS0-KpgX-rqbz-v2KJ-qLb4nG
LV Write Access read/write
LV Status available
# open 1
LV Size 4.79 GB
Current LE 1225
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 253:3

--- Logical volume ---
LV Name /dev/osvg/lvhome
VG Name osvg
LV UUID TSqTSM-wbT4-JUi4-Mu5g-Nzo1-wGHc-eEMSNo
LV Write Access read/write
LV Status available
# open 1
LV Size 41.46 GB
Current LE 10614
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 253:4

--- Logical volume ---
LV Name /dev/osvg/lvvarlog
VG Name osvg
LV UUID JUPYpQ-TX8O-6hdP-ikwY-nG98-emea-8iTHiT
LV Write Access read/write
LV Status available
# open 1
LV Size 4.79 GB
Current LE 1225
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 253:5

--- Logical volume ---
LV Name /dev/osvg/LogVol01
VG Name osvg
LV UUID P1lI86-HW8d-5tIH-wihS-xkUo-Odmx-r5u1sX
LV Write Access read/write
LV Status available
# open 1
LV Size 33.38 GB
Current LE 8544
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 253:6

--- Physical volumes ---
PV Name /dev/sda2
PV UUID ZDzBMx-GnK1-94uZ-3MV3-btmS-U1oG-ptQvsg
PV Status allocatable
Total PE / Free PE 34783 / 0

Unlocking /var/lock/lvm/V_osvg

create the physical volume:

# /usr/sbin/pvcreate --uuid "P1lI86-HW8d-5tIH-wihS-xkUo-Odmx-r5u1sX" /dev/emcpowern1 -ff

pvcreate only overwrites the LVM metadata areas on disk and doesn't touch the data areas.  Logical Volume information is not disturbed by recreating the physical volume metadata. 

Restore the LVM metadata

# /usr/sbin/vgcfgrestore osvg
# /usr/sbin/vgscan
# /usr/sbin/vgchange -ay osvg

Check the file system on the logical volume

# /sbin/fsck.ext3 /dev/osvg/xx