How to Setup Software RAID 0, 1 or 5 with LVM using GUI on OpenSUSE 11.1 (GNOME)

Posted by admin on September 29, 2009 at 1:13 am
Filed under: Uncategorized
1 Launch Partitioner
Step 1.1 Open YaST

Click on “Computer” and then click on “YaST”

01 start yast

Step 1.2 Enter administrator password

02 type password

Step 1.3 Go to system section

Once in YaST click on “System” on the left hand side of the screen.

03 system

Step 1.4 Start partitioner

In the System section of YaST click on “Partitioner”.

04 partitioner

Step 1.5 Warning about partitioning

Click “Yes” to get to the partitioning program.

05 warning

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.

06a initializing

06 partitioner

2 Partitioning the drives as “Linux RAID”
Step 2.1 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.

07 hard disks

Step 2.2 Choose a partition size

Make sure to check the “Maximum Size” radio button.

09 partition size

Step 2.3 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.

10 partition format

3 Creating RAID devices
Step 3.1 Adding a RAID device

Go to the “RAID” section of the partitioning program. Once in the RAID view click the “Add RAID…” button.

11 RAID

Step 3.2 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.

12 RAID type

Step 3.3 RAID options

Select the desired RAID options. I just left the default options.

13 RAID options

Step 3.4 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.

14 RAID formatting

Step 3.5 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”.

15 RAID devices

Review the changes in partitioning and then click “Finish” to apply the changes.

16 changes in partitioning

17 partitioning

4 Making logical volumes out of the RAID devices
Step 4.1 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”.

18 open in terminal

Step 4.2 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

Step 4.3 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”

20 volume management

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”.

21 add volume group

Step 4.4 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.

22 logical volumes

Step 4.5 Give the logical volume a name

When giving the logical volume a name make sure to only use letters, numbers and/or dashes.

23 logical volume name

Step 4.6 Logical volume size and stripes

Select the size of the logical volume. For the “Stripes” option I left the default value.

24 logical volume size

Step 4.7 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.

25 logical volume formating and mounting options

Step 4.8 Apply partitioning changes

Click next to apply the changes.

26 logical volumes

Review the summary and than click “Finish” to start applying the changes. Once the partitioner is finished it will automatically quit.

27 changes in partitioning

2 Comments »
  1. Very nice, but i need to know how i can do it for command…? can i help me…?

    Comment by Amancio — December 15, 2009 @ 6:38 pm

  2. WELL DONE! An excellent primer on creating RAIDs in OpenSuse.

    I’m using OpenSuse 11.2 and one thing has changed. When you first format the partitions you have to select one of the options and Linux RAID is not available. It isn’t available in the do not format drop down box either until after you create the partitions. It didn’t matter. I just formatted with ext4 and when I went to add the raid the drives were there.

    THANKS!

    Comment by kirm — February 20, 2010 @ 2:48 am

TrackBack URL

Leave a comment

Powered by WordPress