If you have two or more hard drives in your computer, one way to preserve files is to have one drive act as a mirror for another. This is the principle behind the RAID concept. There are several levels of RAID arrays implemented in Linux.
It's important to note here that RAID can be implemented in two ways:
SUSE Linux will support either type of RAID implementation. In fact, setting up a software RAID array on SUSE Linux is quite simple with the YaST Expert Partitioner. Caution It is always best to set up a RAID array when first installing SUSE Linux so that nothing can happen to your existing data when you're working with the Expert Partitioner. The steps outlined here apply when you have purchased a drive to serve as your mirror drive after your initial installation. Be sure to back up critical files before starting this process. You will be changing the partition table for your system as part of the setup. Before installing the new drive, you should convert your Root partition to change the SystemID. Start Expert Partitioner by going to YaST, System, Partitioner. Select your Root partition (marked Linux Native /) and click Edit. In the resulting dialog box, click Do Not Format. Use the drop-down menu to change the File System ID to 0xFD Linux RAID. Click OK to confirm. Click Apply to convert the File System ID. When the conversion is complete, shut down the system and install the new drive. SUSE Linux should recognize the new hardware and ask how to format it. At this point, you want to create your RAID array (see Figure 20.7). Figure 20.7. Define the RAID type in the first screen.Caution Although it's technically possible to create a software RAID array using two partitions on the same hard disk drive, you should never do this. The mirrored or striped partitions should always be located on different disks. You will create a mirror. Click Next to continue. The second screen (see Figure 20.8) allows you to define the drives you want to mirror. For this example, we created a dummy drive. In a real scenario, the mirror should be at least as large as the active drive. Select both partitions and click Add to create the mirror. Click Next to continue. Figure 20.8. Add partitions to mirror each other in this screen.The final screen in the RAID Wizard sets options for the mirror (see Figure 20.9). For a mirroring (RAID 1) operation, there's no reason to shift from the defaults. To confirm the settings and return to the main Expert Partitioner screen, click Finish. Figure 20.9. Set options for the mirror drive in the final RAID screen.When you have finished with the RAID Wizard, click Apply to create the RAID array. If you chose to use a hardware-based RAID array, you won't have to complete any of these steps. The RAID board will present the array to SUSE Linux as a single hard disk drive. Simply partition and format the logical drive just as you would a physical hard disk drive. |