Managing RAID on Linux - Derek Vadala [68]
Options
raidhotremove has no command-line options. It takes an md device and a member disk as its only arguments.
Example usage
The following removes /dev/sdc1 from the array /dev/md0:
# raidhotremove /dev/md0 /dev/sdc1
* * *
Tip
raidhotremove and raidhotadd are merely software interfaces to the Linux kernel. They operate independently of any hardware connected to the system. Using these commands does not mean you can safely disconnect and reconnect drives from a powered-on system. Doing this with hardware that does not support hot-swap could result in a complete, unrecoverable system failure. For more information on hot-swap, consult the Hot-Swap and Single connector attachment (SCA) sections in Chapter 2 and the Managing Disk Failures section in Chapter 7.
* * *
Name
raidreconf
Synopsis
raidreconf [options] -m mddevice
raidreconf can reconfigure certain properties of a RAID-0 or RAID-5 without data loss.
First, it can be used to resize an existing array. Normally, if you wanted to add or remove a disk from an array, you would need to back up your data, create a new array, and then restore the data. raidreconf circumvents the backup and restore steps by inserting or removing a device and reorganizing the data so that it spans the remaining disks.
raidreconf can also be used to import or export data to or from an array. That means you can take a single block device and use raidreconf to transfer data block-by-block onto an already existing software RAID. You can also export data from an existing array onto a single block device, provided the target device has enough space. raidreconf can also convert between RAID-0 and RAID-5. Finally, raidreconf can alter the chunk-size of an array.
raidreconf does not support linear mode, RAID-1, or RAID-4 and should never be used with these RAID levels.
raidreconf was originally written by Jakob OEstergaard (he is also its current maintainer), but some critical bug fixes were implemented by Danny Cox. raidreconf is included with raidtools-1.0 and is also available from http://unthought.net/raidreconf/.
Be advised that raidreconf is still very much beta software, even though it looks like it could be widely distributed with raidtools in the near future. I strongly recommend checking its web site and version history for a list of known bugs. Take note of the following warning from http://unthought.net/raidreconf/:
Status is, that we do not currently know of any critical bugs in the software, it has already been used for both conversion and re-sizing of various arrays. However: it is very likely that there are serious bugs that will destroy your data, possibly even on disks not related directly to the array you are re-configuring.
raidreconf is also quite slow and requires that arrays be taken offline before any operations can be performed, which means your data won't be accessible for long periods of time. On my test system, for example, it took about three hours to add a disk to an existing five-disk RAID-0 (using 18 GB drives). The time it takes to perform operations is directly related to the size in blocks of the original array. For example, converting an existing two-disk RAID-0 to a six-disk RAID-5 took only 53 minutes on the same system, also using 18 GB drives. Despite all these caveats, raidreconf is still useful, simply because no alternative is available. Just be certain to make a backup before using it on an array with data (as you should always do when using beta software on critical data).
Options
-o raidtab
Specifies the raidtab file that contains the entry for the current (about to be reconfigured) array.
-n raidtab
Indicates the raidtab file that contains the entry for the new (post-reconfigured) array.
-m mdevice, --mddev mddevice
Specifies the array to reconfigure (for example, /dev/md0).
-i device, --import device
Imports data from a single block device into a new array.
-e device, --export device
Exports data from an