Slightly older system, roughly 2 years old. Running CentOS
I'm noticing I have
/var using a lot of space, and it's all good stuff...so deleting space isn't the answer.
Is there any easy/safe way to move
/var to a newly-mounted disk without toasting the OS? I know how to add disks and format them properly, just never really tried moving
/var to a new destination before.
I've read articles on Server Fault and other websites, but they're vague in response as to exactly how to go about this. They generally suggest stopping processes, etc. But don't go into detail about how to do this safely, nor how to ensure that you've stopped everything correctly before moving data and mounting everything.
Checked this one already:
Didn't want to do something that would severely screw MySQL over. Thanks!
File system information:
# df -h Filesystem Size Used Avail Use% Mounted on /dev/mapper/vg_centos6-centos6_root 47G 41G 4.0G 92% / tmpfs 3.9G 500K 3.9G 1% /dev/shm /dev/vda1 276M 199M 64M 76% /boot /dev/vdb1 197G 119G 68G 64% /home /dev/vdd1 197G 95G 93G 51% /home2 /dev/vde1 99G 8.1G 86G 9% /home3 /usr/tmpDSK 2.0G 40M 1.8G 3% /tmp
# cat /etc/fstab /dev/vg_centos6/centos6_root / ext4 usrjquota=quota.user,jqfmt=vfsv0 1 1 /dev/vda1 /boot ext3 defaults 1 2 /dev/vdb1 /home ext4 usrjquota=quota.user,jqfmt=vfsv0 0 0 /dev/vdd1 /home2 ext4 usrjquota=quota.user,jqfmt=vfsv0 0 0 /dev/vde1 /home3 ext4 usrjquota=quota.user,jqfmt=vfsv0 0 0 tmpfs /dev/shm tmpfs defaults 0 0 devpts /dev/pts devpts gid=5,mode=620 0 0 sysfs /sys sysfs defaults 0 0 proc /proc proc defaults 0 0 /dev/mapper/vg_centos6-lv_swap swap swap defaults 0 0 /usr/tmpDSK /tmp ext3 defaults,noauto 0 0
From what I can see,
/var is definitely on the root partition. I'm hoping to change that.