[CentOS] How to move /var to another partition

Sun Sep 25 20:33:21 UTC 2016
John R Pierce <pierce at hogranch.com>

On 9/25/2016 12:56 PM, Robert Nichols wrote:
> What I do is have a separate logical volume for /var/lib/libvirt,
> with /var/lib/libvirt/etc bind-mounted to /etc/libvirt. It keeps
> all the libvirt stuff together, since the backup requirements
> there are quite different from the rest of the system.


when I create a centos system, I let anaconda setup LVM, but I hugely 
shrink /home to something reasonable, and leave much of the physical 
disk space unassigned for future allocation.   then I'll create a new LV 
for /var/lib/whatever, mkfs_xfs and mount it (adding it to /etc/fstab) 
when I want to explore something new like a database server, setup a web 
server, or KVM...   if it turns out I need more space for /home, its as 
simple as..

     lvextend -L +20g /dev/mapper/vg_xxxx-lv_home && xfs_growfs /home

to add 20G (or whatever) to said file system...

john r pierce, recycling bits in santa cruz