LVM and Thin Provisioning
john.r.moser at gmail.com
Thu Aug 23 18:59:14 UTC 2012
Do you think in the future Ubuntu would benefit from an LVM with thin
provisioning default whole-disk layout? At the moment thin
provisioning is not considered stable, and so it would be
I believe that once LVM thin provisioning is stable, it would be
worthwhile for Ubuntu to use it by default when installing across a
whole disk. Essentially with a single large disk, Ubuntu could create
one big logical volume such that 100% of the disk is /, 100% is /home,
and some small amount is swap. This would allow for snapshot backups,
encryption, and such through the supported LVM interfaces. More
importantly, it would allow for the isolation of file systems
(particularly / and /home) without complex considerations like "how
big do we make them?"
The down side to this is LVM complexity--power users can't simply pull
up gparted and manipulate LVM partitions, slide things around to
install an alternate OS, etc, without learning some new tools. I
think power users would plan ahead for that, and other users who do a
full disk install won't particularly have such needs because they'll
be of the "Install one Linux because I want my computer to work"
Users who are resizing an existing OS and using part of the disk may
legitimately have a middle ground where they eventually move to resize
partitions (remove the old OS or Ubuntu) and find that their basic
knowledge is suddenly useless and they don't know where to go from
here or really want to put in that kind of effort. From that
perspective, shrinking a Windows partition and putting an LVM Physical
Volume next to it with a complex Logical Volume layout may not be a
great idea; the distinction between "power user" and "regular user"
does have a gray-zone border, and these sorts of installs fall within
it much more often than straight-up whole disk installs. But then,
maybe it'd be perfectly fine anyway.
LVM thin provision does legitimize automatic file system migration.
Passing TRIM through a thin provisioned LVM volume doesn't just knock
a block off an SSD; it tells the thin provisioning layer that that
block is free. When an entire extent is TRIMed off, it becomes
available again (as is my understanding, anyway). So a user on Ubuntu
with ext3 migrating to ext4 loses out on a lot of features that ext4
simply has to be created from scratch for; well you can create a new
thin root, move the data across (TRIMing as you go), and then remove
the old LV. Even if the disk is 90% full. Same for when some fool
has experimented with btrfs and realizes there's no fsck tool (fsck
doesn't FIX btrfs, it just tells you if it's broken) and he wants to
go back to ext4 or XFS.
More information about the Ubuntu-devel-discuss