-
-
Save randika/7688057 to your computer and use it in GitHub Desktop.
EC2 Ubuntu Attache EBS volume and move /home
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
lsblk | |
xvdb 202:16 0 15G 0 disk | |
xvda1 202:1 0 8G 0 disk / | |
sudo mkfs.ext4 /dev/xvdb | |
sudo mkdir /mnt/tmp | |
sudo mount /dev/xvdb/ /mnt/tmp | |
sudo rsync -avx /home/ /mnt/tmp | |
sudo umount /home | |
rm -rf /home/* | |
sudo nano /etc/fstab #or any other editor | |
UUID=8106e848-4dc4-4261-b396-XXXXXXX /home ext4 defaults 0 2 | |
xvdb 202:16 0 15G 0 disk /home | |
xvda1 202:1 0 8G 0 disk / |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment