| Make sure that you have two physical disks connected to two different controllers. In laymans terms this means that each disk must be on it's own cable. If disks share one cable, both can be useles if one doesn't work. |
Installation
Start the regular install procedure, but when SUSE suggest a partitioning scheme, stop and choose partitioning. Chose "Make selfdefined setup", and "Self defined setup (for advanced users)" again.
In this example we will use the following partition scheme:
- /boot 100 MB
- /swap 1GB
- / 10 GB
- /home the rest of the hard disk"
Created the partitions on both hard disks (hda + hdb) as above (sizes optimized for two 200 GB disks). Chose "Create Custom Partition Setup".The following window will show you a blank partition setup(provided that you are installing on new hardware. If not just delete whatever is there. (Note: this wil destroy all data on your harddisk)
Press the button "Create" chose "primarary", but instead of ext3 as file system chose 0xFD Linux RAID, from the dropdownlist, for all 8 partitions (2 * 4.) That is for 4 partitions on each disk).
After you created these partitions with identical sizes on both drives, press the button called RAID. And select which setup of RAID you want. You can chose between RAID 0 , 1 or 5.
- For /swap we chose RAID 0 (faster but less secure, but as this is swap it won't matter)
- For /boot we have to chose RAID 1(only allows RAID 1)
- For / we chose Raid 1 (or 0 depending on if you want speed and more diskspace instead of stability)
- For /home we chose RAID 1 (or 0 depending on if you want speed instead of stability.)
If in doubt just read the information in the sidebar in YAST as you install.
You can use different sized disks and even mix and match SCSCI, IDE and SATA disks, but with RAID 1 total space of RAID will be equal to the smallest one. Adding more disks will increase chances against data loss, but it will not increase your storage space. |
After this you can install SUSE as you usual.
Monitoring your RAID
You can let SUSE monitor your disks by enabeling the SMART Disk Monitoring Daemon (smartd) Status notification is given throug "powesavenotify". Start YAST runlevel editor and check the smartd service. (YAST - System - System services runlevel)
Or You can check the status of your RAID by writing "cat /proc/mdstat" in a console.
You will then get a message looking something like this:
Personalities :
[raid1] [raid0] [raid5] [raid4] [linear]
md0 : active raid1 hdb2[0] hdd2[1]
194306048 blocks [2/2] [UU]
unused devices: <none>
If a disk has failed it will be marked by a (F) behind the drive volume in the second line of output.. In addition, after the number of blocks you can read how many of the total disks in the array are working e.g.: [1/2]
A failed disk could look something like this:
Personalities :
[raid1] [raid0] [raid5] [raid4] [linear]
md0 : active raid1 hdb2[0] hdd2[1](F)
194306048 blocks [1/2] [UU]
unused devices: <none>
Reconstruction
If a device fails and you want to replace it do the following:
* Power down the system
* Replace the failed disk(remember to check that it is big enough)
* Power up the system once again.
* /dev/mdX --add /dev/sdX. Replace 'X' with your particular device identifiers.
This integrates the hard disk automatically into the RAID system and fully reconstructs it.
* Have some organic tea while you watch the automatic reconstruction running
And that's it.
Backup
Remember, RAID is no substitute for good backups. No amount of redundancy in your RAID configuration is going to let you recover week or month old data, nor will a RAID survive fires, earthquakes, or other disasters.
It is imperative that you protect your data, not just with RAID, but with regular good backups. One excellent system for such backups, is the Amanda backup system.