[clug] Partitioning for fun and benefit

Paul Wayper paulway at mabula.net
Thu Oct 24 20:41:45 UTC 2019


Hmm - didn't press Send on this...

Hi all,

Steve, that's a really great and detailed reply :-)  Good work.  I think the
important point to get to is:

On 17/10/19 4:55 pm, steve jenkin via linux wrote:
> George,
> 
[...]
> 
> Logical Volumes were initially created to lash multiple small disks together into One Big Volume, then disks got bigger than normal storage requirements and that use went away.
> 
> So LVM’s were co-opted to provide RAID levels and other stuff - which IMHO is conflating operations of two independent subsystems.
> LVM’s are now typically much smaller than a full disk - they get useful differently now.
> 
> Operationally, LVM gives two significant operational benefits:
>  - with dynamic resizing, don’t have to run out of space in a volume, increase as needed without affecting operations
>  - on-the-fly disk upgrade / replacement:

Those two, combined with that 'initial' use of joining multiple disks together
flexibly, are the reason why I use LVM everywhere I can.

On my home server I have pairs of disks - same size, different manufacturer -
mirrored using MDADM.  Then I add those md devices to the LVM as physical
volumes.  Should any one disk die, I can easily replace it completely
transparently to LVM - while LVM can do mirroring, I've found the process of
replacing a disk that dies in a volume group to be fraught with problems.
Replacing a drive that dies in an LVM array is much easier.

Aside: I use pairs of disks from different manufacturer for two reasons.  One
is to avoid the 'bad batch' problem, where just occasionally drives in a
particular batch all die early or have problems.  It's much less likely to get
two drives from different manufacturers that fail at the same time.  The
second is so that, when I need to replace one, it will be really obvious which
drive I'm replacing: I don't have to try to determine serial numbers or
recognise device to cable mappings, I just look for the Western Digital 3TB
disk as opposed to the Seagate 3TB disk.

So I only end up with two partitions: boot (which can be mirrored with certain
versions of MDADM) and the LVM.  Disks that don't have a boot partition I
leave unpartitioned and give the whole disk to MDADM.

For my laptop, I end up with two partitions on the boot device: boot and
LUKS-encrypted LVM.  Then drive upgrades are accomplished by adding the new
drive (on a USB adapter) to the VG, using pvmove to move all the data across,
and then removing the old drive.  No long periods of downtime!

Hope this helps,

Paul



More information about the linux mailing list