I'd like to store /var
on a separate partition from /
. What is the correct way to set this up?
Ubuntu – How to store /var on a separate partition
mountpartitioning
mountpartitioning
I'd like to store /var
on a separate partition from /
. What is the correct way to set this up?
Best Answer
First prepare a new partition (e.g. with
parted
andmkfs
).Say the partition is /dev/sda5
Mount the new partition:
Sync your current var:
Add the entry to /etc/fstab
Reboot.
If you happen to need to go back you your old /var just comment out the entry in fstab.