1

Prefacing this by saying I'm pretty new to Linux/Computers.

I'm working on doing a yum update on an outdated RHEL (7.2) system. I'm currently not able to install anything new or change the disk partition scheme, but it was sent to my team with only 2g of /var space, while /home has 50g, and root, for some reason, has 641g. I know it's not ideal, but nothing I can do about it at this time.

While trying to yum update, the var cache fills up. I've tried yum clear all , but there just isn't enough space in the folder to complete this update. I know you can use LVS to resize partitions, but was told this can be potentially dangerous and not always consistent. I also know I can do a symlink from the /var to /home or maybe root, but this feels like a band-aid and I want to make this solution long-term.

Is there a better way to handle this situation? And what is the best way to implement this symlink safely, if I have to use it?

1

A symlink does the job for a workaround but for a permanent solution you should resize your partitions. Resizing / via LVM should be done via the RHEL rescue console and before you resize anything make sure you have a current backup.

I resized many LVM volumes over time and never had a problem but you never know.

If you have far enough space on / you can also move the whole /var to the root logical volume, delete the /var logical volume and add the 2GB to the root logical volume.

To link the yum cache as a temporary workaround do something like:

mkdir /tmpvar
mv /var/cache/yum /tmpvar
ln -s /tmpvar/yum /var/cache/yum

To get a more detailed view on the resize process please add the output of lvs, pvs and fdisk -l

  • I ended up going with the symlink and it worked just fine. I know it's a temporary solution, but I don't currently have the authorization to resize the partitions. Thank you for the help!! – Stimulai Jun 27 '18 at 16:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.