2009-10-18. I've never yet really seen an advantage (for me) in LVM, /except/, as recently written about, the use of its device-mapper parent for implementing an encrypted disk partition. Still, a little playing about could be interesting, now that I've reserved a large partition in the desktop's disk for just this purpose (and ultimately for a bit of temporary storage space). [And, addendum after a few minutes: even for this rather artificial use, of dividing a largish partition into parts, doing this with good flexibility of resizing, subject of course to the filesystems' ease of resizing, does seem convenient compared to having some hundreds of GB of disparate groups of data all needing backup before changing a filesystem.] --------------------------------------------------------------- The lvm command is nicely designed: it does several jobs, each a worthily-featured command in itself, and can be called either with an argument to say which command to act as, or called by this named (e.g. run a symlink), or if lvm is run alone it gives an interactive shell in which these commands can be used. We've got /dev/sda4, a `Linux LVM' dos-partition, available as the physical volume. # fdisk -l /dev/sda Disk /dev/sda: 320.0 GB, 320072933376 bytes 255 heads, 63 sectors/track, 38913 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Disk identifier: 0x00000000 Device Boot Start End Blocks Id System /dev/sda1 1 3648 29302528+ 83 Linux /dev/sda2 3649 4147 4008217+ 82 Linux swap / Solaris /dev/sda3 4148 7066 23446867+ a5 FreeBSD /dev/sda4 7067 38913 255811027+ 8e Linux LVM There's a fair old bit of DM (device-mapper) stuff in the kernel: # cat /proc/config.gz | gunzip | grep _DM_ CONFIG_DM_DEBUG=y CONFIG_DM_CRYPT=m CONFIG_DM_SNAPSHOT=m CONFIG_DM_MIRROR=m # CONFIG_DM_LOG_USERSPACE is not set CONFIG_DM_ZERO=m CONFIG_DM_MULTIPATH=m # CONFIG_DM_MULTIPATH_QL is not set # CONFIG_DM_MULTIPATH_ST is not set CONFIG_DM_DELAY=m CONFIG_DM_UEVENT=y CONFIG_BLK_DEV_DM_BBR=m ----------------------------------------------------------- Make some logical volumes. # lvm pvcreate /dev/sda4 Physical volume "/dev/sda4" successfully created # lvm vgcreate space /dev/sda4 Volume group "space" successfully created # lvm lvcreate -L 120G -n user space Logical volume "user" created # mkfs.ext3 /dev/mapper/space-user ----------------------------------------------------------- Find out more: # lvm pvdisplay --- Physical volume --- PV Name /dev/sda4 VG Name space PV Size 243.96 GB / not usable 3.46 MB Allocatable yes PE Size (KByte) 4096 Total PE 62453 Free PE 62453 Allocated PE 0 PV UUID YJ7i01-1kvb-uC2X-AyiN-GRA2-bG3e-YYo0Eo # lvm vgdisplay --- Volume group --- VG Name space System ID Format lvm2 Metadata Areas 2 Metadata Sequence No 1 VG Access read/write VG Status resizable MAX LV 0 Cur LV 0 Open LV 0 Max PV 0 Cur PV 1 Act PV 1 VG Size 243.96 GB PE Size 4.00 MB Total PE 62453 Alloc PE / Size 0 / 0 Free PE / Size 62453 / 243.96 GB VG UUID tWc3Np-HbU1-AHrf-Luz3-eITA-KzAv-Z64Kdw # lvm lvdisplay space/user --- Logical volume --- LV Name /dev/space/user VG Name space LV UUID NSaLfR-J4FK-mtgq-PDFM-WRGy-PrHD-llcr46 LV Write Access read/write LV Status available # open 0 LV Size 120.00 GB Current LE 30720 Segments 1 Allocation inherit Read ahead sectors auto - currently set to 256 Block device 254:1 ------------------------------------------------------------------