On Sat, Jan 8, 2011 at 7:17 PM, Johan Martinez jmartiee@gmail.com
wrote:
On Sat, Jan 8, 2011 at 3:50 PM, Lamar Owen lowen@pari.edu wrote: On Saturday, January 08, 2011 04:27:39 pm Johan Martinez wrote:
> Now I am booting of CentOS live cd for system restore. I recreated > partitions like previous system using fdisk and then used dd to dump all the > data onto it. I would like to mount sda2 as LVM, but I don't know how to do > that. Any steps or howto mount LVM manually would be really helpful. I think > I can recover the system once I am able to access sda1 and sda2. Any help?
pvscan vgscan vgchange -ay lvscan
(It has been awhile since I have done this; I know the vgchange -ay is required, but I don't recall if pvscan and lvscan were required or if I just used them for information....but I do think the vgscan was required.)
In the lvscan output you should see the logical volumes; mount to the desired mountpoint with mount /dev/VOLUMEGROUP/LOGICALVOLUME MOUNTPOINT
Or you can reboot the CentOS disk in rescue mode and have it find your system as part of its bootup. In that case your system will be mounted under /mnt/sysimage and you can do a 'chroot /mnt/sysimage' and essentially get a command line inside that system.
Hope that helps. _______________________________________________ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
Thanks for the reply Lamar and Robert.
I had tried pvscan and vgscan before sending out my first mail, but it didn't show up any physical volumes and vol grpups.
I didn't do lvscan though.
I will try again and see how it goes.
jM.
I can see PVs sda1 and sda2 with pvscan, but they are not getting mounted as lvm. Also, I see sda2 listed as LVM although I didn't partition it that way. e.g. fdisk shows it as Linux type and pvscan is showing it as lvm2. That's somewhat confusing me.
Also, the real problem for me is recovery. I don't see LVM mounted after doing vgscan and lvscan. Am I missing something here? Any help?
Thanks you.. jM
------------------------------------------------------------------------
Johan,
I have the same circumstance, and have not been able to mount an lvm volume to a new machine. I have your posts, but have not been able to mount the lvm either. Did you ever get this resolved? Sure would appreciate your thoughts, or any one else that has been able to do this.
Greg