How much space for /var
? I have installed EOS in January and created a dedicated /var
partition of 16G. I now realise that it is not enough. If you have a separate partition for this, how big is it? Any experiences/recommendations?
Thank you, Nikos
dalto
February 15, 2023, 5:54pm
2
On Arch-based distros, I recommend not creating a separate /var
because pacman stores permament data there.
As for size, it depends how aggressively you prune the package cache and what else you store there.
I would say at least 30GB to be safe. More if you are keeping VMs, containers or containerized applications there.
2 Likes
Is it safe to to move /var
in my /
partition? My root is a separate partition, with 104G free space currently.
dalto
February 15, 2023, 8:20pm
4
As long as you do it correctly preserving all the attributes it should be safe.
Just don’t update your system while you are copying the files.
The section on file system cloning in this wiki article has a good set of rsync options to use for that kind of operation.
https://wiki.archlinux.org/title/Rsync#File_system_cloning
2 Likes
Something like :
# as root
cd /
mkdir varclone
rsync -qaHAXSx /var/ /varclone/
sudo umount /var
sudo mv /varclone /var
Then remove the line that mounts /var
from /etc/fstab
and try to re-boot. If all goes well, then remove the old /var
:
sudo rm -R /var
dalto
February 16, 2023, 10:42pm
6
NikosAlexandris:
sudo umount /var
This might be tough to do while it is in use. You will have to try and see.
NikosAlexandris:
sudo rm -R /var
That will delete the new /var
. You shouldn’t need to do this. The old var is in it’s partition still. You can just do as you will with that partition. No need to delete the files.
1 Like
How about
umount -f /var (force umount)
or
umount -l /var (lazy umount)
see : https://serverfault.com/a/1007187
dalto
February 16, 2023, 10:45pm
8
Personally, I would do that part while booted off the ISO. You don’t want to cause applications to crash that depend on /var/cache
or some other part of /var
1 Like
Right, then I correct myself with your assistance :-). I meant to remove tha (old) partition once not needed.
Operation succesful. Thank you so much @dalto !
It went like :
Boot via Endeavouros_Cassini_neo_22_12.iso
Identify the /
partition (find in /etc/fstab
for example)
Decrypt the encrypted /
partition via sudo cryptsetup luksOpen /dev/the-root-nvm-partition cryptroot
Identify the device mapper via ls -la /dev/mapper
, if I remember correctly
Mount it via sudo mkdir /mnt/eosroot && sudo mount /dev/dm-0 /mnt/eosroot
Get into it cd /mnt/eosroot
and rename var
to varold
and finally varclone
to var
I commented out the corresponding var
lines in /etc/fstab
and /etc/crypttab
Reboot and all is fine
1 Like
system
Closed
February 19, 2023, 12:43pm
11
This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.