On Sun, 2019-08-18 at 08:06 +1000, Cameron Simpson wrote:
On 17Aug2019 12:01, Patrick O'Callaghan pocallaghan@gmail.com wrote:
On Sat, 2019-08-17 at 09:38 +1000, Cameron Simpson wrote:
Really, all you need to do is to remove the /var fstab entry, umount the existing /var mount, rsync /newvar BACK INTO the stub /var mountpoint which is there, scrub /newvar.
/var cannot be unmounted while the system is running (see above).
"umount -l /var" is your friend. See "man 8 umount".
Nice, I hadn't known about that.
You could (roughly):
mkdir /newvar rsync -a /var/ /newvar/ # note trailing slashes umount -l /var rmdir /var mv /newvar /var
and scrub the fstab entry. Then reboot to make everything use the new tree.
I'll keep it in mind for next time (there's always a next time).
Cheers
poc