28.1. Objective 1: Configuring RAIDA RAID is a Redundant Array of Independent Disks. Sometimes it is more lovingly referred to as a Redundant Array of Inexpensive Disks, recalling RAID's roots in the search to create large disk storage from cheap, smaller-capacity hardware. While RAID is still used to maximize the use of inexpensive disks today, it is also used to achieve faster access speeds and data security. RAID makes multiple hard disk drives look like one drive to the user's filesystem. There are multiple types of RAID, which are indicated by the level number. They achieve their effects through various combinations of mirroring and striping. Mirroring data refers to having identical copies of data in separate locations (disks). Striping data refers to distributing data across multiple disks, which involves more than a simple copy. RAID level 5 (referred to as RAID 5) is the most common form of RAID. RAID 5 uses striping with parity across your RAID array. RAID 1 is used to mirror identical copies of data between disk pairs. RAID 0 is used for simply striping data across the disks in your array. Currently, the LPIC Level 2 Exams cover the software RAID tools mkraid, raidstop, and raidstart. These utilities use the /etc/raidtab configuration file. 28.1.1. The mkraid ToolsThe mkraid tools are included in almost every major Linux distribution. /etc/raidtab is the default configuration file for the raid tools. It defines how RAID devices are configured on a system.
28.1.2. How to Create RAID 1 (Mirroring)This procedure prepares one or more devices for redundancy. Firs,t set up the /etc/raidtab file to describe your configuration: raiddev /dev/md0 raid-level 1 nr-raid-disks 2 nr-spare-disks 0 persistent-superblock 1 device /dev/sdb1 raid-disk 0 device /dev/sdb2 raid-disk 1 Now issue the following command to construct the mirror: mkraid /dev/md0 Wait for whole process to finish. Check the estimated time (which depends on device sizes) and progression by looking inside of /proc/mdstat file. The process will happen online and the filesystem can be mounted. |