Implementing Software Raid on openSUSE 11.2

RAID stand for a redundant array of inexpensive disks, a way of combining multiple disk drives into a single entity to improve performance and/or reliability. There are a variety of different types and implementations of RAID, each with its own advantages and disadvantages. Hardware RAID use the hardware feature while the software RAID using software capability. These are pros & cons about hardware RAID and software RAID, with an advantage and disadvantage for each approach.  Click here for more information about RAID.
Implementing software RAID on openSUSE just need a quick task by using YAST partitioner. Just remember that you should applying software RAID while installing system if you wish to make a RAID on your running partition (the partition where openSUSE resides). You may make a software RAID on different partition, something like a RAID for data partition, later at any time with YAST partitioner.
I’ll be show you how to make a RAID-1 so I have a mirror disk for my running system. You may choose different schema (RAID-0 AKA Stripping or RAID-5 AKA Array RAID) but don’t forget to adjust the setting according to your environment.
PREPARATION

  1. I’m using RAID-1 schema to make a mirror disk for running system so I prepared 2 disk with same size. In this tutorial, I prepare 2  disk, each disk has a 200 GB of disk size. You may also use a different size for mirroring but it’s not highly recommended.  RAID-1 will use the lower size as RAID size.
  2. openSUSE 11.2 DVD for installation
  3. Partition Schema. Here is my partition schema : 100 MB for /boot, 1 GB for swap and the rest for root partition. Adjust it with your own schema.
  4. BEWARE !!! I choose to remove all data and partition on my disk (I didn’t have any data on it) so don’t forget to backup your data before trying the tutorial.

MAKING A MIRROR DISK WHILE INSTALLING SYSTEM

  1. Pick your installation DVD and start installing openSUSE 11.2
  2. Choose Installation on first wizard display, click Next
    `
    Image 1 : openSUSE 11.2 Initial Installation Wizard
  3. Click Next on Installation Agreement
  4. Choose New Installation and then click Next
  5. Choose your Time Zone and your preferred Date/Time setting and then click Next
  6. Choose your preferred desktop environment. You may also choose Minimal Server Selection (Text Mode) for installing server by click Other on Desktop options. Click Next.
  7. On the Disk wizard, click Partition Based and then Edit Partition Setup
    `
    Image 2 : Choose Partition Schema
  8. Right click on first disk and then click Delete to remove all data & partition
    `
    Image 3 : Remove all partition
    `
    Image 4 : Confirmation Dialog while Deleting Partition
  9. Double click on first disk (/dev/sda)`
    Image 5 : Disk without partition
  10. Click Add
  11. Click Next to choose Primary Partition on Partition Type
  12. Choose Custom Size on Partition Size and type 100 MB on Size Text box. Click Next
  13. Choose Do Not Format Partition and pick the 0xFD Linux RAID from File System ID combo box`
    Image 6 : Choose RAID Partition
  14. Click Finish
  15. Repeat the above process (number 10-14) for swap and root partition. Set 1 GB for swap and Maximum Size for root partition
  16. We should have 3 RAID partition on first disk`
    Image 7 : RAID partition
  17. Click on second disk (/dev/sdb, look at on the left side pane)
  18. Repeat same process as we have done on first disk (number 10-15)
  19. Click on Hard Disk on left pane. We should have 6 RAID partition on all disk`
    Image 8 : All of RAID Partition
  20. Now we go to the RAID partition setup. Click on RAID on the left pane
  21. Click Add RAID
  22. Choose RAID-1 on RAID type and then click on first RAID partition on first disk (/dev/sda1 on Available Device). Click Add to move the partition as selected device. Do the same process to first RAID partition on second disk (/dev/sdb1) so we will have 4 RAID partition on available device pane and 2 partition on selected device pane.`
    Image 9 : Setting up RAID Disk
  23. Click Next on RAID Options (using default 4 kB on chunk size).
  24. Choose Format Partition and mount it as /boot.
  25. Click Finish. We have the first RAID disk
  26. Click Add RAID
  27. Choose RAID-1 on RAID type and then click on second RAID partition on first disk (/dev/sda2 on Available Device). Click Add to move the partition as selected device. Do the same process to second RAID partition on second disk (/dev/sdb1) so we will have 2 RAID partition on available device pane and 2 partition on selected device pane.
  28. Click Next on RAID Options (using default 4 kB on chunk size).
  29. Choose Format Partition and and choose Swap as file system type. Click Finish
  30. Repeat step 21-24 and mount the partition as root partition
  31. We should have 3 RAID partition and ready to use as disk for system installation.`
    Image 10 : All RAID disk
  32. Click Accept and then follow the rest of installation wizard

Beside RAID-1 as the above tutorial, we could also applying different RAID type by using similar procedure. I’m using openSUSE 11.2 as an example but it should works on previous version (openSUSE 11.1 and openSUSE 11.0). openSUSE 10.3 and it’s predecessor has a different layout than the above tutorial but the procedure should be similar.

6 thoughts on “Implementing Software Raid on openSUSE 11.2

  1. The default chunksize in new versions of mdadm (2009+) is 512K, so one should preferably pick that when it is not already the default in yast.

Leave a Reply

Your email address will not be published. Required fields are marked *