I run a cloud VPS with Centos 7 installed. Unfortunately, I could not customize disk partitions during installation so now I have no free space in the volume group automatically created because it is completely used by two logical volumes: swap and root. I would like to reduce root size and create some space for managing LVM snapshots but I know that on XFS file systems there are no chances to shrink a partition. Can I do anything?

The server is currently in production, so I cannot reinstall the system, but even so, I could not customize partitions because it is an automatic procedure.

Thank you.

  • df -h, free -m? – frostschutz Mar 8 at 14:45
  • I don't know what flexibility you have with your provider, but this may work: endpoint.com/blog/2015/01/29/… – Jonathan Mar 8 at 14:49
  • Is your swap LV large enough to contain the files in your rootfs? Do you have enough RAM to go without swap for a little while? If so, you can: temporarily disable swap, delete the swap LV, create a new LV, copy your rootfs to it, reboot using the new LV as your rootfs, enlarge the new LV and the rootfs, recreate the swap LV and activate it. – Emmanuel Rosa Mar 9 at 12:54
  • @EmmanuelRosa negative Sir, root lv is used for about 9GB while swap is only roughly 2GB. – R99Photography Mar 9 at 12:56

Your Answer

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

Browse other questions tagged or ask your own question.