reran lts 22 installer - could not alter prior partitioning
Colin Watson
cjwatson at ubuntu.com
Mon May 19 01:08:11 UTC 2025
On Sun, May 18, 2025 at 05:44:08PM -0400, Robert Moskowitz wrote:
>I did not "like" what the Ubuntu installer did. I have a 500GB SSD
>drive, and it only allocated 100GB to the / partition.
I believe the reason it errs on the small side is that it's easy to grow
a logical volume and the filesystem on it, but once you've grown it it's
a lot more effort to shrink it. Not slurping up all the available space
gives you far more flexibility.
>This Zotac Zboxnano has 2GB memory and I replaced this original HD
>with said SSD drive.
>
>In /etc/fstab there is:
>
>/dev/disk/by-id/dm-uuid-LVM-Of0ciG9Rj2oEXQTBmqvSYhxN750GH9QTckCCW3W0nXsNN3J7fji735bWG831VRKD
>/ ext4 defaults 0 1
># /boot was on /dev/sda2 during curtin installation
>/dev/disk/by-uuid/62887e8e-6dea-4bcc-a830-a9ec367fe578 /boot ext4
>defaults 0 1
>/swap.img none swap sw 0 0
>
>and df reports:
>
>Filesystem Size Used Avail Use% Mounted on
>/dev/mapper/ubuntu--vg-ubuntu--lv 98G 5.1G 88G 6% /
>/dev/sda2 2.0G 126M 1.7G 7% /boot
>
>I want to "grow" the partition with /
For example, to add an additional 50GiB:
lvextend -L +50G ubuntu-vg/ubuntu-lv
resize2fs -p /dev/mapper/ubuntu--vg-ubuntu--lv
(See "man lvextend" for variations on how to specify the size.)
I'm in a particularly good mood with LVM today, since it meant that
recovering from an SSD that abruptly started throwing write errors and
sent my house server into read-only mode was a matter of plugging in a
new SSD, adding a new physical volume on it, running "pvmove" a few
times, adjusting the boot loader, and dealing with a couple of
filesystems where fsck was now a little unhappy. I could have rsynced
everything over onto fresh filesystems (since reading from the old drive
still worked fine), or rebuilt from backups; but I've used the pvmove
approach several times before and it's much easier, especially for
filesystems such as / that are a hassle to remount. If SATA hotplug
worked properly on that motherboard then I wouldn't even have had to
reboot except to confirm that the boot loader changes worked at the very
end.
--
Colin Watson (he/him) [cjwatson at ubuntu.com]
More information about the ubuntu-users
mailing list