[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Hmmm... /boot is too small. what's the best way to increase it's size?



Old ways die hard, disk space is cheap! these days

On 10/5/20 1:53 pm, The Wanderer wrote:
On 2020-05-09 at 23:36, Andy Smith wrote:

Hi Rick,

On Sat, May 09, 2020 at 08:05:48PM -0700, Rick Thomas wrote:
What's the best way to increase the size of /boot ?
There is no easy way. If you boot into a live/rescue environment and
run parted you *may* be able to shrink your LVM and grow your /boot
but it's a procedure fraught with danger; make sure you have
excellent backups first.

I am not 100% sure that parted can handle partitions that are used as
LVM PVs.

I can easily create a gig or so of space by a shrink/resize of
/home, but how do I add that space to /dev/sda2 ?
This won't work because your /home is an LVM logical volume. Its
actual extents could be all over sda3.

I can't just move up the end of /dev/sda2 = start of /dev/sda3
without backing up and restoring, can I?
parted can move partitions about, so if you run it from outside your
install and it does support LVM PV then it might work. You'd
basically have to shift everything up the disk, making your PV (sda3)
slightly smaller in the process.

I really wouldn't like to try it myself. With the backup that you'll
need you may as well just reinstall as even if parted can do this it
will take some time for it to rewrite all that data.
In theory I *think* it should be possible to shrink /home, shrink the
LV, shrink the PV, then expand /boot - but the practice may be quite
different from the theory.

https://unix.stackexchange.com/questions/479545/how-to-shrink-a-physical-volume
has detailed instructions on how to do one part of the process, and
indicates that gparted can indeed handle LVM PVs - but whether it's
suitable for the actual scenario at hand here probably depends on how
you've got your PVs and LVs set up, and I don't know enough about that
to make a recommendation, aside from being very careful with backups no
matter what.

(I'm also up late, so don't necessarily trust me to have things right at
the moment; double-check before going ahead, and if in doubt, don't.)

This is a great example of why it's not good to be stingy with the
size of /boot.
Definitely. My current system started out with around 4-8 TB of usable
space (across all partitions, after RAID overhead) when I first built
it, and I have fully 22GB allocated to /boot. That's ridiculous overkill
- even 1GB would probably have been more than I'm likely to ever need
here, and 2GB would definitely have - but I'd far rather have erred on
the side of too much than too little.


And yet your 22GB hasn't cracked the $1 mark on a cost effective drive.







--
All that glitters has a high refractive index.


Reply to: