I moved the
/var
directory to a new disk/partition, this part worked well, but I forgot to delete/move the old /var
path and it is still using space on /
(root) partition. How could I delete the old /var
without redo all the process? Any ideas?
This is what I did so far:
fdisk -l
mount /dev/sdb /mnt/newvar/
df -h /mnt/newvar/
rsync -aqxP /var/* /mnt/newvar/
umount /mnt/newvar/ /mnt/var/
umount /mnt/newvar/
umount /disk2/
umount /mnt/newvar/
ls -la /mnt/newvar/
df -h
vim /etc/fstab
fstab content:
UUID=c7c73822-b6e8-4aa4-a4b2-41a70c29568f /boot ext2 defaults 0 2
/dev/mapper/zabbix--vg-swap_1 none swap sw 0 0
/dev/fd0 /media/floppy0 auto rw,user,noauto,exec,utf8 0 0
UUID="3195ad53-3aaa-418c-bdc0-d341e33d76d3" /var ext3 defaults 0 2
Result of the above command:
df -P / /var
Filesystem 1024-blocks Used Available Capacity Mounted on
/dev/mapper/zabbix--vg-root 11758232 10103908 1033988 91% /
/dev/sdb 25671996 8720916 15640360 36% /var
Asked by Leonardo L. Southier
(49 rep)
Oct 6, 2021, 03:25 PM
Last activity: Oct 7, 2021, 08:41 AM
Last activity: Oct 7, 2021, 08:41 AM