Setup Software RAID 0, 1 or 5 with LVM using GUI on OpenSUSE 11.1 (GNOME)
Old version notice
Note that this version of OpenSUSE is outdated, the current version is OpenSUSE 11.3. The steps to create a RAID array in OpenSUSE 11.3 should be roughly the same but there are no guarantees. If somebody can create a new tutorial showing how to setup RAID on OpenSUSE 11.3 that would be great.
Prerequisites for Setting Up RAID on OpenSUSE
- Install OpenSUSE
- What type of RAID do you want?
Launch Partitioner
Open YaST
Click on “Computer” and then click on “YaST”.
Enter administrator password
Enter the Administrator password and click Continue.
Go to system section
Once in YaST click on “System” on the left hand side of the screen.
Start partitioner
In the System section of YaST click on “Partitioner”.
Warning about partitioning
Click “Yes” to get to the partitioning program.
Give the partition editor at least a minute to load. If the partition editor gets stuck “Initializing…”, try restarting the system and then try to start the partition editor again.
Partitioning the drives as Linux RAID
Hard Disks section
Once in the partition editor go to the “Hard Disks” section. Once in the hard disks section go to one of the hard drives that is going to be included in a RAID array, then click the “Add…” button.
Formatting and mounting options
Check the “Do not format partition” radio button and then select the partition type “0xFD Linux RAID”. Also, check the “Do not mount partition” radio button. Finally, click on the “Finish” button. Repeat steps 2.1 through 2.3 for all of the hard drives that are going to be included in RAID arrays.
Choose a partition size
Check the “Do not format partition” radio button and then select the partition type “0xFD Linux RAID”. Also, check the “Do not mount partition” radio button. Finally, click on the “Finish” button. Repeat steps 3.1 through 3.3 for all of the hard drives that are going to be included in RAID arrays.
Creating RAID devices
Adding a RAID device
Go to the “RAID” section of the partitioning program. Once in the RAID view click the “Add RAID…” button.
Selecting RAID type and used devices
Select the radio button for the desired RAID type and then add the drives that are to be included in the RAID array.
RAID options
Select the desired RAID options. I just left the default options.
Formatting and mounting options
Make sure to check the “Do not format partition” radio button. Also, make sure the “Do not mount partition” radio button is also selected.
Finish partitioning the drives
If you are creating more than one RAID device repeat steps 3.1 throught 3.4 until you have all of the desired RAID devices. Once all of the RAID devices have been made write down the device names. The names should be something like /dev/md0. Once the names of the devices have been written down click “Next”.
Making logical volumes out of the RAID devices
Adding a RAID device
Go to the “RAID” section of the partitioning program. Once in the RAID view click the “Add RAID…” button.
Launch terminal
After the partitions are done formatting the partitioning program should automatically close. Once the partitioner is closed right click anywhere on the desktop and click “Open In Terminal”.
Create physical volumes
Once in Terminal type the following command
su root
and hit enter. This will make the text
Password:
pop up in terminal. Type your password and hit enter. Note that when typing your password no characters will appear on the screen. This is a security feature built into Linux to prevent somebody watching your screen seeing the length of your password. After typing in your password, type in the command bellow. Replacing /dev/md0 with the names of the RAID devices that were written down in step 3.5. Make sure to run this command once for every RAID device you want to be included in LVM.
pvcreate /dev/md0
Adding a volume group
Start the partitioning program again (Steps 1.1 through 1.5) and then go to the “Volume Manager” section. Once in Volume Management click “Add Volume Group”
When giving the “Volume Group Name” be sure to only use letters, numbers and dashes, no spaces or weird characters. I just left the “Physical Extent Size” the default value. Lastly, be sure to add all of the devices that you want to be included in the logical volume. When everything is done click “Finish”.
Creating a logical volume
Click on the group that was created in step 4.3, click on the “Logical Volumes” tab and then click the “Add” button.
Give the logical volume a name
When giving the logical volume a name make sure to only use letters, numbers and/or dashes.
Logical volume size and stripes
Select the size of the logical volume. For the “Stripes” option I left the default value.
Logical volume formatting options and mounting options
Check the “Format partition” radio button and then select a file system. I would recommend “Ext3″ for the file system. Also, make sure to check the “Mount partition” radio button. Note, when selecting a mount point be sure to start it with a / and to not use any spaces or special characters. If you want to create more than one logical volume repeat steps 4.4 through 4.7.
Apply partitioning changes
Click next to apply the changes.
Review the summary and than click “Finish” to start applying the changes. Once the partitioner is finished it will automatically quit.