First, what do I mean by foreign? Foreign means mounting the logical volume with an OS that it wasn’t originally installed on. This could be because you are using KNOPPIX to repair something on the volume, or because you’ve moved the disk to a new location.
The process itself if quite simple, but it would help if you understood how logical volumes work first. Click here for some nice background
Mounting an LVM Volume
- First Identify it with the fdisk command
- And find the VolGroup with the pvs command
- lvdisplay will show you the Logical Volume
- Finally mount it
# fdisk -l
Disk /dev/sda: 500.1 GB, 500107862016 bytes255 heads, 63 sectors/track, 60801 cylindersUnits = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System/dev/sda1 * 1 13 104391 83 Linux/dev/sda2 14 60801 488279610 8e Linux LVM
# pvs PV VG Fmt Attr PSize PFree
/dev/sda2 VolGroup00 lvm2 a- 465.66G 0
Okay, this isn’t finished yet, but I published it so that next time I’m working on this task I’ll complete it. If you have any suggestions or want to complete this list. let me know.
About Jay Farschman - Jay currently works as a Senior Systems Administrator for an asset management company in Colorado where he works with companies that produce hardware, telecommunications software and financial services. Jay previously owned a consulting company and provided training and consulting services for three Fortune 500 companies and numerous small businesses where he leveraged Linux to provided exceptional value.