PDA

View Full Version : About detect and mount extend/LVM partitions



satimis
08-29-2007, 07:47 AM
Hi folks,


My HD has extend partition and LVM. Is there any way to detect and mount them.

# fdisk -l

Disk /dev/sda: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sda1 * 1 31 248976 83 Linux
/dev/sda2 32 19457 156039345 5 Extended
/dev/sda5 32 19457 156039313+ 8e Linux LVM


sda1 is mounted automatically with its icon displayed on desktop.

# ls -al /media/sda1

total 10410
drwxr-xr-x 4 root root 1024 Jul 24 10:21 .
drwxr-xr-x 6 root root 1024 Aug 29 06:14 ..
-rw-r--r-- 1 root root 1033449 Apr 15 02:28 System.map-2.6.20-15-generic
-rw-r--r-- 1 root root 407099 Apr 15 02:28 abi-2.6.20-15-generic
-rw-r--r-- 1 root root 75349 Apr 15 01:02 config-2.6.20-15-generic
drwxr-xr-x 2 root root 1024 Jul 24 10:22 grub
-rw-r--r-- 1 root root 7255399 Jul 24 10:21 initrd.img-2.6.20-15-generic
drwx------ 2 root root 12288 Jul 24 10:13 lost+found
-rw-r--r-- 1 root root 94600 Oct 20 2006 memtest86+.bin
-rw-r--r-- 1 root root 1726608 Apr 15 02:28 vmlinuz-2.6.20-15-generic



# ls /media/

cdrom0 floppy0 sda1 sda5

sda5 seems mounted as well.


# ls -al /media/sda5

total 2
drwxr-xr-x 2 root root 1024 Aug 29 06:14 .
drwxr-xr-x 6 root root 1024 Aug 29 06:14 ..

But nothing found on it.

Advice would be appreciated. TIA


B.R.
satimis

tomask
04-27-2008, 09:24 PM
It is probably not an issue anymore, so it is just for posterity.

I found good answer at: http://www.linuxquestions.org/questions/linux-hardware-18/how-to-mount-a-logvol-into-knoppix-471366/

Here is summary how to mount LVM disks:
knoppix# vgscan --mknodes
Reading all physical volumes. This may take a while...
Found volume group "system" using metadata type lvm2
# vgchange -ay
3 logical volume(s) in volume group "system" now active
# lvscan
ACTIVE '/dev/system/home' [20.00 GB] inherit
ACTIVE '/dev/system/root' [15.00 GB] inherit
ACTIVE '/dev/system/swap' [2.00 GB] inherit
# mkdir -p /mnt/root /mnt/home
# mount /dev/system/root /mnt/root
# mount /dev/system/home /mnt/home

More about LVM is on:
http://www.ibiblio.org/pub/Linux/docs/HOWTO/other-formats/html_single/LVM-HOWTO.html

Hope it helps to the next person. :-)