[CentOS] LiveCD System recovery - Mounting LVM?

Sun Jan 9 01:17:21 UTC 2011
Johan Martinez <jmartiee at gmail.com>

On Sat, Jan 8, 2011 at 3:50 PM, Lamar Owen <lowen at 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 at 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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.centos.org/pipermail/centos/attachments/20110108/57dc7040/attachment-0005.html>