[colug-432] Install and Manually Partition Debian

Rick Hornsby richardjhornsby at gmail.com
Fri Mar 14 22:36:00 EDT 2014


On Mar 14, 2014, at 21:11, George Larson <george.g.larson at gmail.com> wrote:
...

> Four partitions? I'd guess all primary partitions.  

Honestly, I wouldn’t do that.  Use LVM for everything except /boot and swap.  LVM is far more flexible than straight-up direct-on-disk filesystems, and easier to manage over time.

It isn’t that many more steps than fdisk, and once you get the hang of it, easier to understand.  The three key concepts to know are

pvcreate - p = physical volume, a whole disk or a partition
vgcreate - v = volume group, a set of one or more PVs combine to create a container to hold LVs
lvcreate - l = logical volume, this is what you would normally think of as a partition

There are a bunch of other management commands, but those are how you get started if you’re doing it by hand.

Why easier to manage over time?  Let’s say /home is getting full.  When you created your volume group (VG) you left 10GB unallocated.  Let’s take 5GB of that and give it to /home:

lvextend -L +5G /dev/mapper/vg00-homelv
resize2fs /dev/mapper/vg00-homelv

The paths are just examples from a generic Redhat system, but that’s how easy it is.  No reboot, no parted or gparted, no having to take the filesystem offline, no having to copy all the files off somewhere else and reformat to resize.

If you decide that /usr/local has too much space allocated, you can lvreduce it and give that space to something else.  It should be noted that lvreduce does require taking the filesystem offline first.  Not everything can be done online.

> Though, to be honest, this seems like a a pretty laborious install if
> you're not already familiar with these things.  

Even though I am familiar with these things, it still seems like way more work than is necessary.  Most of the installers will allow you to have some flexibility in setting up your scheme without having to manually write an fstab file.  Most modern installers also let you set things up using LVM.  Certainly, one always has the option to override the suggested configuration and write their own by hand if they wish.

It isn’t a terrible exercise to learn how to deal with /etc/fstab, but it isn’t something I’d necessarily want to build from scratch by hand unless my box was super hosed and there was no other way to recover.







More information about the colug-432 mailing list