I'd like to move /var directory to a new partition on the SAME disk. I'm not adding any new hard disk.
I tried the following commands to do so. Can someone help with the last 2 commands? Also, how do I make sure it doesn't use old /var anymore?
lsblk
mkdir /mnt/newvar
blkid
mount /dev/xvda1 /mnt/newvar
df -h /mnt/newvar/
rsync -aqxP /var/* /mnt/newvar/
umount /mnt/newvar/ /mnt/var/
the above command throws no mount point specified.
vi /etc/fstab
how to add the new partition in fstab?
I tried the following commands to do so. Can someone help with the last 2 commands? Also, how do I make sure it doesn't use old /var anymore?
lsblk
mkdir /mnt/newvar
blkid
mount /dev/xvda1 /mnt/newvar
df -h /mnt/newvar/
rsync -aqxP /var/* /mnt/newvar/
umount /mnt/newvar/ /mnt/var/
the above command throws no mount point specified.
vi /etc/fstab
how to add the new partition in fstab?