Web lists-archives.com

Re: making more room in root partition for distribution upgrade




Hello,

On Fri, May 18, 2018 at 04:00:45AM -0700, Rick Thomas wrote:
> Contrary to Andy’s recommendation, though, I would also
> put swap on LVM — if only just to simplify things when I do find
> myself needing to adjust it

Well, OK. But…

Should I need more swap then I don't really find adding an
additional swap device with:

# lvcreate -L1g -n /dev/myvg/more-swap-vicar
# swapon /dev/myvg/more-swap-vicar
# echo '/dev/myvg/more-swap-vicar swap swap defaults 0 0' >> /etc/fstab

any more difficult than your suggestion of resizing a swap that was
already in LVM:

# swapoff -a
# lvresize -L2g /dev/myvg/my-only-swap
# mkswap /dev/myvg/my-only-swap
# swapon -a

Yet in the overwhelmingly common case for me, I never adjust the
size of swap so having it outside of LVM means it works even if I
somehow break LVM.

Cheers,
Andy

-- 
https://bitfolk.com/ -- No-nonsense VPS hosting