Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Move /var/log from the / partition to the /home partition
##
## Moving /var/log from SSD on / to regular HDD on /home/var_log
## http://backdrift.org/how-to-use-bind-mounts-in-linux
##
sudo cp /etc/fstab /etc/fstab.$(date +%Y-%m-%d)
sudo mkdir /home/var_log
sudo chown root:root /home/var_log/
sudo chmod 755 /home/var_log/
echo "# bind /var/log to /home/var_log" | sudo tee -a /etc/fstab
echo "/home/var_log /var/log none bind 0 0" | sudo tee -a /etc/fstab
sudo mv /var/log /home/var_log
sudo shutdown -r now
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.