0

I have two virtual disks sda and sdb on an rhel7 VM. My /var and /var/log folders are both constrained by the sizes of their initial provisioned logical volumes.

sda is partitioned into an xfs filesystem: /dev/sda1 mounted at /boot and a physical volume: /dev/sda2 named rhel. There is a volume group: rhel with several logical volumes, specifically the ones of concern to this question are mounted at /var, /var/log, /var/log/audit/ and /var/tmp.

The disk sdb is new and I was thinking of creating a single pv/vg out of the drive and moving /var, /var/log and /var/log/audit/ (keeping /var/tmp on it's own lvm on sda2) to it.

  1. Would it just be better/possible to just grow the current logical volumes from space allocated from the new disk, if so, how does that work?
  2. Is there a good reason NOT to just have /var, /var/log and /var/log/audit/ on the same logical volume?
  3. Is there a way to do this online, meaning this is a web server and I would like to have it continue serving?
  4. If this is unable to be done online, what steps would I need to take to reboot into a mode I can ssh into the server but no other services running that would prevent me from unmounting/moving the /var folder's contents?
Tyler Clendenin
  • 197
  • 1
  • 1
  • 10
  • Please add output of pvs;vgs;lvs – davidgo Apr 15 '20 at 22:48
  • Of you are using Logical volume management, and don't intend to shrink the volume back in the future this can, I believe, be done online without a reboot. (I have not grown an xfs volume, but have done this kind of thing often with ext4 volumes) – davidgo Apr 15 '20 at 22:51

0 Answers0