[CentOS] Mounting a LVM partition from a linux live cd

Wed Sep 17 16:00:16 UTC 2008
Stephen Harris <lists at spuddy.org>

On Wed, Sep 17, 2008 at 11:44:19AM -0400, Matt Shields wrote:
> I'm running CentOS 5.2, it uses LVM to manage the disks and we had a
> programmer do something (not sure what) then reboot the system.  When it
> came up it kernel panicked.  Luckily it's not production, it was their
> sandbox.  But they didn't backup any of their files.  I know the disks are
> fine because I was able to boot from a linux live cd and mount the /boot
> partition from the sda drive, and the sdb drive that has the mysql database
> mounted at /var/lib/mysql and not using LVM.   What I don't know how to do
> is mount /dev/sda2 (root / partition) which is an LVM/ext3 partition.  Does
> anyone have the steps to mount this drive while booted into a linux live cd?

Commands that might be useful:
  pvscan  - verify the physical disks are present
  vgscan  - scans for volume groups
  vgchange -a y     - activates all volume groups
Now your logical volumes should be present and seen with 'lvscan' and
so can be mounted (/dev/VolGroup/LVName would be the volume to mount)

-- 

rgds
Stephen