How can I reduce or shrink the size of a GFS or GFS2 filesystem on RHEL 5 or RHEL 6?
Environment
- Red Hat Enterprise Linux Server 5 (with the High Availability and Resilient Storage Add Ons)
- Red Hat Enterprise Linux Server 6 (with the High Availability and Resilient Storage Add Ons)
Issue
- How can I reduce or shrink the size of a
GFSorGFS2filesystem? - How to resize a GFS2 filesystem to a lower size?
Resolution
A GFS or GFS2 cannot be shrunk to a smaller size. There is no supported tool that will shrink a GFS or GFS2 filesystem after it is created with mkfs.gfs2.
- The only way to decrease a
GFSorGFS2filesystem is to do the following;- Create a new
GFSorGFS2filesystem to your preferred size. - Copy the contents of the original
GFSorGFS2filesystem to the newGFSorGFS2filesystem.
- Create a new
Root Cause
- Red Hat Enterprise Linux does not provide a command which can be used to reduce the size of a
GFSorGFS2filesystem.
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
