mount lvm
thufir
hawat.thufir at gmail.com
Wed Dec 26 06:08:41 UTC 2012
In trying to mount an LVM I was given this command on IRC:
/dev/mapper/dur-root /media/sda2
but why wasn't it:
/dev/mapper/sda2 /media/sda2 ?
root at dur:~#
root at dur:~# mount /dev/sda2 /media/sda2
mount: you must specify the filesystem type
root at dur:~#
root at dur:~#
root at dur:~# ls -al /dev/mapper
total 0
drwxr-xr-x 2 root root 100 Dec 25 17:45 .
drwxr-xr-x 15 root root 4460 Dec 25 19:45 ..
crw------- 1 root root 10, 236 Dec 25 17:45 control
lrwxrwxrwx 1 root root 7 Dec 25 17:45 dur-root -> ../dm-0
lrwxrwxrwx 1 root root 7 Dec 25 17:45 dur-swap_1 -> ../dm-1
root at dur:~#
root at dur:~#
root at dur:~# fdisk -l
Disk /dev/sda: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders, total 156301488 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000d2c34
Device Boot Start End Blocks Id System
/dev/sda1 * 2048 152176639 76087296 83 Linux
/dev/sda2 152178686 156301311 2061313 5 Extended
/dev/sda5 152178688 156301311 2061312 82 Linux swap /
Solaris
Disk /dev/sdb: 30.8 GB, 30750031872 bytes
255 heads, 63 sectors/track, 3738 cylinders, total 60058656 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x0000f2be
Device Boot Start End Blocks Id System
/dev/sdb1 2048 499711 248832 83 Linux
/dev/sdb2 501758 60057599 29777921 5 Extended
/dev/sdb5 501760 60057599 29777920 8e Linux LVM
Disk /dev/mapper/dur-root: 28.4 GB, 28374466560 bytes
255 heads, 63 sectors/track, 3449 cylinders, total 55418880 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
Disk /dev/mapper/dur-root doesn't contain a valid partition table
Disk /dev/mapper/dur-swap_1: 2113 MB, 2113929216 bytes
255 heads, 63 sectors/track, 257 cylinders, total 4128768 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
Disk /dev/mapper/dur-swap_1 doesn't contain a valid partition table
root at dur:~#
root at dur:~# lvdisplay
--- Logical volume ---
LV Name /dev/dur/root
VG Name dur
LV UUID bqK8yp-VgIg-UZdS-nsXO-SFka-NWkX-odW0wa
LV Write Access read/write
LV Status available
# open 0
LV Size 26.43 GiB
Current LE 6765
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 252:0
--- Logical volume ---
LV Name /dev/dur/swap_1
VG Name dur
LV UUID dBpQrP-U3kp-c4jU-HaSG-BVVb-RfCe-4QI91H
LV Write Access read/write
LV Status available
# open 0
LV Size 1.97 GiB
Current LE 504
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 252:1
root at dur:~#
root at dur:~# mount
/dev/sda1 on / type ext4 (rw,errors=remount-ro)
proc on /proc type proc (rw,noexec,nosuid,nodev)
sysfs on /sys type sysfs (rw,noexec,nosuid,nodev)
none on /sys/fs/fuse/connections type fusectl (rw)
none on /sys/kernel/debug type debugfs (rw)
none on /sys/kernel/security type securityfs (rw)
udev on /dev type devtmpfs (rw,mode=0755)
devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=0620)
tmpfs on /run type tmpfs (rw,noexec,nosuid,size=10%,mode=0755)
none on /run/lock type tmpfs (rw,noexec,nosuid,nodev,size=5242880)
none on /run/shm type tmpfs (rw,nosuid,nodev)
gvfs-fuse-daemon on /home/thufir/.gvfs type fuse.gvfs-fuse-daemon
(rw,nosuid,nodev,user=thufir)
root at dur:~#
root at dur:~#
thanks,
Thufir
More information about the ubuntu-users
mailing list