Resizing Software RAID Arrays with mdadm

This section describes how to increase or reduce the size of a software RAID 1, 4, 5, or 6 device with the Multiple Device Administration (mdadm(8)) tool.

[Warning]Warning

Before starting any of the tasks described in this chapter, make sure that you have a valid backup of all of the data.

Understanding the Resizing Process

Resizing an existing software RAID device involves growing or shrinking the space contributed by each component partition.

Guidelines for Resizing a Software RAID

The mdadm(8) tool supports resizing only for software RAID levels 1, 4, 5, and 6. These RAID levels provide disk fault tolerance so that one component partition can be removed at a time for resizing. In principle, it is possible to perform a hot resize for RAID partitions, but you must take extra care for your data when doing so.

The file system that resides on the RAID must also be able to be resized in order to take advantage of the changes in available space on the device. In SUSE® Linux Enterprise Server 10 SP1, file system resizing utilities are available for file systems Ext2, Ext3, JFS, and ReiserFS. The utilities support growing and shrinking the size as follows:

Table 8.1. File System Support for Resizing

File System

Utility

Increase Size

Decrease Size

Ext2 or Ext3

resize2fs

Yes, offline only

Yes, offline only

JFS

mount -o remount,resize

Yes, online only

No

ReiserFS

resize_reiserfs

Yes, online or offline

Yes, offline only


Resizing any partition or file system involves some risks that can potentially result in losing data.

[Warning]Warning

To avoid data loss, make sure to back up your data before you begin any resizing task.

Overview of Tasks

Resizing the RAID involves the following tasks. The order in which these tasks is performed depends on whether you are increasing or decreasing its size.

Table 8.2. Tasks Involved in Resizing a RAID

Tasks

Description

Order If Increasing Size

Order If Decreasing Size

Resize each of the component partitions.

Increase or decrease the active size of each component partition. You remove only one component partition at a time, modify its size, then return it to the RAID.

1

2

Resize the software RAID itself.

The RAID does not automatically know about the increases or decreases you make to the underlying component partitions. You must inform it about the new size.

2

3

Resize the file system.

You must resize the file system that resides on the RAID. This is possible only for file systems that provide tools for resizing, such as Ext2, Ext3, JFS, and ReiserFS.

3

1



SUSE® Linux Enterprise Server Storage Administration Guide 10