Add Volumes Digitalocean To /home Directadmin
1.Create Volume /Home In Digitalocean
2. Create /clone/home and mount
.Check disk:
df cd /dev/disk/by-id/ ls cd
Clone Home:
mkdir -p /clone/disk/home
rsync -av /home/* /clone/disk/home/
mount /dev/vda1 /clone/disk/
#diff -r /home /clone/disk
#du -hs /home/* | sort -rh | head -n 10
#cat /etc/fstab
Install rsync (if none)
rpm -qa | grep rsync
sudo apt-get install alien
sudo alien -i package_file.rpm
apt-get -y install rsync
.UMOUNT AND MOUNT FSTAB
umount /dev/disk/by-id/NAME_VOLUME_DISK
mount -o discard,defaults,noatime /dev/disk/by-id/NAME_VOLUME_DISK /home
echo '/dev/disk/by-id/NAME_VOLUME_DISK /home ext4 defaults,nofail,discard 0 0' | sudo tee -a /etc/fstab
rsync (copy data from /backup/home/ to /home)
Retore /BACKUP to /HOME
rsync -av /clone/disk/home/* /home/
RESIZE VOLUME DIGITALOCEAN
#CHECK:
cat /etc/fstab
#edit by nano: nano /etc/fstab
echo '/dev/disk/by-id/NAME_VOLUME_DISK /home ext4 defaults,nofail,discard 0 0' | sudo tee -a /etc/fstab
umount -f /dev/disk/by-id/NAME_VOLUME_DISK
e2fsck -f /dev/disk/by-id/NAME_VOLUME_DISK
resize2fs /dev/disk/by-id/NAME_VOLUME_DISK
mount -o discard,defaults,noatime /dev/disk/by-id/NAME_VOLUME_DISK /home