[CentOS] LiveCD System recovery - Mounting LVM?

Sat Jan 8 23:03:03 UTC 2011
Robert Heller <heller at deepsoft.com>

At Sat, 8 Jan 2011 15:27:39 -0600 CentOS mailing list <centos at centos.org> wrote:

> 
> 
> 
> Hi,
> 
> I am trying to recover data from my old system which had LVM. The disk had
> two partitions - /dev/sda1 (boot, Linux) and /dev/sda2 (Linux LVM). I had
> taken a backup of both partitions using dd.
> 
> 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?

You will need to do a vgscan to scan for the LVM volumn you created. 
Once scanned, you can then mount the file system(s) there, either using
the mapper files (/dev/mapper/volumegroup-volumn) or the mount labels
(LABEL=label). If this was a stock CentOS install, the root file system
will be labeled '/' and the /boot file system will be labeled '/boot':

mkdir /mnt/sysimage
mount -v LABEL=/ /mnt/sysimage
mount -v LABEL=/boot /mnt/sysimage/boot


> 
> jM.
> 
> MIME-Version: 1.0
> 
> _______________________________________________
> CentOS mailing list
> CentOS at centos.org
> http://lists.centos.org/mailman/listinfo/centos
> 
>                                                                     

-- 
Robert Heller             -- 978-544-6933 / heller at deepsoft.com
Deepwoods Software        -- http://www.deepsoft.com/
()  ascii ribbon campaign -- against html e-mail
/\  www.asciiribbon.org   -- against proprietary attachments