Difference between revisions of "LVM2"
From Knoppix Documentation Wiki
(added how to mount a LVM volume) |
(Updated the content to match 5.0.1) |
||
Line 1: | Line 1: | ||
− | If you | + | *(If you use an old Knoppix version you may need to install LVM tools first. '''Version 5.0.1 already has the packages and dm-mod module loaded, and the following first steps are not necessary'''.) |
− | + | ||
# modprobe dm-mod | # modprobe dm-mod | ||
# apt-get update | # apt-get update | ||
# apt-get install lvm-common lvm2 | # apt-get install lvm-common lvm2 | ||
− | + | ||
− | + | If you needed the above steps, remember that the tools are in /lib/lvm-200 but if you don't want to type the complete path, you may link them into /usr/bin. | |
− | + | ||
# lndir /lib/lvm-200/ /usr/sbin/ | # lndir /lib/lvm-200/ /usr/sbin/ | ||
− | + | *To use existing volume groups you have to activate them. | |
− | To use existing volume groups you have to activate them. | + | |
# vgscan | # vgscan | ||
# vgchange -a y | # vgchange -a y | ||
− | To mount it, find the VG name, then find that name in /dev/ | + | *To mount it, find the VG name, then find that name in /dev/ |
# vgdisplay | head | # vgdisplay | head | ||
--- Volume group --- | --- Volume group --- | ||
VG Name music2_vg | VG Name music2_vg | ||
− | + | ||
# ls /dev/music2_vg/* | # ls /dev/music2_vg/* | ||
/dev/music2_vg/lvol1 | /dev/music2_vg/lvol1 | ||
− | + | ||
# mount /dev/music2_vg/lvol1 /mnt/tmp | # mount /dev/music2_vg/lvol1 /mnt/tmp | ||
# ls /mnt/tmp | # ls /mnt/tmp | ||
lost+found mp3 | lost+found mp3 |
Revision as of 21:00, 24 October 2006
- (If you use an old Knoppix version you may need to install LVM tools first. Version 5.0.1 already has the packages and dm-mod module loaded, and the following first steps are not necessary.)
# modprobe dm-mod # apt-get update # apt-get install lvm-common lvm2 If you needed the above steps, remember that the tools are in /lib/lvm-200 but if you don't want to type the complete path, you may link them into /usr/bin. # lndir /lib/lvm-200/ /usr/sbin/
- To use existing volume groups you have to activate them.
# vgscan # vgchange -a y
- To mount it, find the VG name, then find that name in /dev/
# vgdisplay | head --- Volume group --- VG Name music2_vg # ls /dev/music2_vg/* /dev/music2_vg/lvol1 # mount /dev/music2_vg/lvol1 /mnt/tmp # ls /mnt/tmp lost+found mp3