Software RAID (md) Operation

The Multiple Device driver (md) is currently the standard Linux software RAID product included with all of the major Linux distributions. Linux software RAID allows multiple physical disks and/or disk partitions to be grouped together to form virtual devices. Virtual devices are accessed as regular block devices, and as such may be used by file systems or any application that can operate directly with a block device.

Software RAID is principally used to provide data redundancy where hardware RAID (or storage replication) is not practical or feasible. The following diagram shows the relationship of the software RAID entities. File systems or applications use virtual devices. Virtual devices consist of the aggregation of one or more physical disk partitions or disks.

Figure 1: Software RAID Entity Relationships

In Figure 2 below, writes are written to both arrays in this single-path mirror. This is MDs prime function, replacing expensive storage replication.

Figure 2: Single-Path MD Configuration

LifeKeeper for Linux Software RAID (md) Recovery Kit

The LifeKeeper Software RAID (md) Recovery Kit provides the support needed to allow other LifeKeeper recovery kits to operate properly with Linux software RAID virtual devices. To accomplish this support, the Software RAID Recovery Kit installs two new resource types: md and mdComponent that correspond to virtual devices and each partition or disk configured in the virtual device. The md and mdComponent resources exist solely for internal use so that other LifeKeeper resources can operate.

The mdComponent resource allows the Software RAID Recovery Kit to present the state of each individual component in the virtual device.

ISP – the component is configured properly in the virtual device and operating normally.

ISU – the component is a spare device. Note that when a device is hot added to a virtual device it will respond as a spare while the device is being restored.

OSU – the component is not configured in the virtual device. This may be a result of the component being removed from the virtual device. If a virtual device has a failed component and is unconfigured (stopped) and reconfigured (assembled), the failed component will no longer appear as a configured device, i.e., it will not show up as failed but as unconfigured.

OSF – the component has failed. Note: To receive an email notification when in this state, enable this option using lk_confignotifyalias(8).

As shown in Figure 1, the virtual device md0 is composed of 2 disk partitions, sda1 and c1d0p1. This could reflect a RAID-1 mirror. A typical LifeKeeper hierarchy containing a virtual device looks much like the relationships shown in Figure 1. Refer to Figure 4 in the LifeKeeper Software RAID Hierarchy Creation and Administration section for an example of an actual LifeKeeper hierarchy.

The Software RAID Recovery Kit uses the mdadm(8) command provided by the mdadm package to manage the virtual device resources in a LifeKeeper hierarchy. The virtual device is configured (or assembled) when a hierarchy is being brought in-service during a failover or switchover operation, and is unconfigured (or stopped) when a hierarchy is being taken out of service.


Was this helpful?

Yes No
You indicated this topic was not helpful to you ...
Could you please leave a comment telling us why? Thank you!
Thanks for your feedback.

Post your comment on this topic.

Post Comment