[CentOS] reading lvm

Peter Kjellstrom cap at nsc.liu.se
Sat May 12 11:30:28 UTC 2007


On Saturday 12 May 2007, Dave wrote:
> Hi,
>     I don't like to start messages out this way and this is my opinion but
> i'm really beginning to hate lvm.
>     With that out of the way here's the situation. I have a centos 4.4
> drive with two partitions on it, one an hd*1 partition former /boot ext3
> partition, which i can read fine, but which doesn't have the data i want.
> I've got some data on an lvm volume /dev/hd*2 which contains two partitions
> within it's volume, the last one which i believe is swap and the first one
> which was a former / filesystem and has data on it i am trying to obtain.
> Using fdisk i can read that it's linux-lvm, but i can't get mount to read
> it.

I may have misunderstood you, but partitions that show up as "LVM" when you 
use fdisk are not meant to be mounted. LVM is a bit more complex, that 
partition is in lvmspeak a PV (Physical Volume). The next layer up is the VG 
layer (Volume Groups). A VG can be made up out of one or more PVs. And then 
finally, the topmost layer, LV (Logical Volumes). LVs are the actual block 
devices that you use (where filesystems live, what you mount etc.). You can 
have many LVs in a VG and they can span several PVs.

To find out which LVs you can mount run lvdisplay. You then typically mount it 
like "mount /dev/VGNAME/LVNAME /mountpoint".

All that said, please do read up on how LVM works.

/Peter
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.centos.org/pipermail/centos/attachments/20070512/c6f2cd09/attachment.sig>


More information about the CentOS mailing list