Pandu Poluan writes:

> Everytime I read some guide on LVM, my eyes becomes blurry, the room 
> starts spinning, and I can hear wolves howling ... :D
> 
> Seriously, LVM looks mighty nice, but it also looks (and is!) mighty
> complex.

I really don't think so. pvcreate <partition> creates a physical volume,
vgcreate <vgname> <partition> starts a volume group, and lvcreate -n
<name> -L <size> <vgname> creates a logical volume that you can use as
if it were a physical partition.

  pvcreate /dev/sda5
  vgcreate myvg /dev/sda5
  lvcreate -n usr -L 10G myvg
  mke2fs -j /dev/myvg/usr

> So, I want to start from something simple.

Of course, just using /dev/sda5 for /usr is simpler. But what if this
turns out to be too small? With so many partitions I would think this is
very likely to happen sooner or later. With LVM, all you'd have to do is:

  lvresize -L +1G /dev/myvg/usr
  resize2fs /dev/myvg/usr

Takes 10 seconds plus the time you need to type this, and you have 1G of
more space. Otherwise, you'd probably have to boot from another system
and use something like parted to move stuff around. Or move stuff like
/usr/src to other partitions.

Another neat featurea are snapshots, this is nice for backups.


> Comments, suggestions, are welcome :)

I also have many partitons, but I've overdone italready.

I like to have all big partitions separated in order to prevent / from
becoming full, so I have /home, /opt, /tmp, /usr and /var. I also have
/usr/{local,src}. And a big partition for /var/portage, contining tree
(sometimes on its own partition), distfiles and tmpdir. And /home. And
/data/{mp3,mpeg}. And /32 for my 32 bit chroot Gentoo. And /backup for
all sorts of backups, including a sub-directory with another partiton
for each of the partitions above. All are LUKS-encrypted, and it takes a
while during bootup until they are all opened. But then, I reboot very
seldomly.

        Wonko

Reply via email to