Created
November 20, 2015 14:39
-
-
Save diogoca/a9297dfb9b40e5b38d7b to your computer and use it in GitHub Desktop.
Move /var to another partition
This file contains hidden or 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
| # First, boot into single user mode (edit boot, esc + e), add init=/bin/bash after ro | |
| # Make sure any process writing to /var is stopped. (Check with lsof | grep /var) | |
| mkdir -p /home/var | |
| rsync -va /var /home/var | |
| mv /var /var.old # you can remove /var.old when you are done to reclaim the space | |
| mkdir -p /var | |
| mount -o bind /home/var /var | |
| # update your /etc/fstab to make the bind-mount permanent. | |
| /etc/fstab | |
| /home/var /var none bind |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment