Created
July 26, 2012 09:01
-
-
Save alghanmi/3181115 to your computer and use it in GitHub Desktop.
Move /var/log from the / partition to the /home partition
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## | |
## 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