[CentOS] figuring out LogVol details for mount

Nico Kadel-Garcia nkadel at gmail.com
Fri Apr 1 01:39:03 UTC 2011


On Thu, Mar 31, 2011 at 8:50 PM, Winter <winter at frostmarch.com> wrote:
> On 3/31/2011 6:22 PM, neubyr wrote:
>> Hi,
>>
>> I need to mount a LVM in rescue mode to create a new initrd image. I
>> am not sure how do I fond out which LogVol is to be mounted. How do I
>> find it out?  In most of the configs I have used LogVol00 with ext3
>> filesystem which contains OS install. This particular system is not
>> installed by me and I am not sure how do I find it out. I did try 'lvm
>> lvs' command, but probably that's not the right command here. Any
>> help?
>>
>> --
>> thanks,
>> neuby.r.
>
> Good evening, Neuby
>
> When you boot into rescue mode are you given the option to
> continue-mount or read-only-mount the system to /mnt/sysimage?  You
> could try to view /mnt/sysimage/etc/fstab to find the partition types.
>
> Regards,
>
> W.

If he could do *that*, he would already have the volumes mounted,
barring other strangeness going on. They'd all be mounted under
"/mnt/sysimage", and would be revealed by the "df" or "mount"
commands.

If this isn't available, the "pvscan", "vgscan", and "lvscan" commands
are all available in the bootable CD, *but* they are all built into
the underlying "lvm" command. So type "lvm pvscan" to find what
physical volumes are set up for LVM, "lvm vgscan" to find the volume
groups, and "lvm lvscan" to find the volumes.

Re-activating an 'inactive' LVM due to a messed up configuration or
volume is left as an exercise for the reader.



More information about the CentOS mailing list