Wednesday, May 21, 2008

Mounting a Linux Logical Volume

As it turns out, it is not exactly straight forward to mount a Linux logical volume on a new machine. I've found that this is a problem whether the drive is in the box or attached via USB.

The error I kept getting was unknown fs type when I would try and mount it (I'll try it again later and get the exact error code in here).

After a little research, I found you need the following commands to do discovery on the drive so that Linux can figure out what's on it. Here's the commands necessary to make this work for a drive with a volume called LogicalVolume00 that we want to mount to /misc2:

/sbin/pvscan
/sbin/vgcfgrestore VolGroup00
vgscan -v
/sbin/vgchange -ay -v
/sbin/vgdisplay -v
mount /dev/VolGroup00/LogVol00 /misc2

I'm not really sure what each of these commands does. If you understand how this works, please e-mail me or post a comment and I'll update this listing to make it more thorough.

No comments: