Shrink RAID

You can shrink RAID by using the --grow option of the mdadm utility. The XFS file system does not support shrinking. For more information, see the mdadm(8) man page on your system.

Before you begin

  • The parted package is installed.

Procedure

  1. Shrink the file system. For more information, see Managing file systems.
  2. Decrease the RAID to the size, for example to 512 MB:
    # mdadm --grow --size=524228 /dev/md0

    Write the --size parameter in kB.

  3. Shrink the partition to the size you need.