Set up software RAID on SUSE Linux Enterprise Server

This page has not been liked. Updated 4/11/13, 10:28 PM by jerberstarkTags: None

Notes

This document, along with all the screen shots, was written for SLES 10 SP3. These instructions should also work equally well for later versions, although the installer screens will look slightly different.


Background

Using software RAID on POWER is different from using it on Intel due to the different boot loader. Power uses the Yaboot boot loader which is loaded by Open Firmware after identifying the PReP or FAT16 boot partition on the disk. Only disks containing the PReP or FAT16 boot partition can be selected in SMS (user interface to the Open Firmware). Yaboot starts and scans all the primary disk partitions searching for its own configuration file (usually /etc/yaboot.conf) and the kernel image to load. Unfortunately Yaboot can not scan software mirrored md-devices or LVM logical volumes. It also contains a built in knowledge of only some file systems: ext2 , ext3, reiserfs and fat. For this example, we are going to use a FAT16 boot partition, which will contain a copy of the boot kernel, initrd, and yaboot.conf file.

Partitioning layout

We are going to create following partitions on our first disk:

Name Type Format Size Purpose
/dev/sda1 FAT16 / 0x06 No 64 MB FAT Boot partition, loaded by firmware
/dev/sda2 Linux Raid / 0xfd No > 16 GB (all space you have left) Raid device for LVM, will be used for md0

We will then create the same partitions on the second disk.

Raid layout

We will create a raid device /dev/md0 containing /dev/sda2 and /dev/sdb2

Name Include Format Mount point
/dev/md0 /dev/sda2, /dev/sdb2 LVM LVM

 

LVM layout

We will use our raid device /dev/md0 as a physical disk and include it in the volume group /dev/system. We will create following logical volumes in this volume group.

Name Format Size Mount point
rootlv ext3 > 16 GB /
swaplv swap 1 GB no

 


Step by step: manual installation

 


Start installation

Start your installation from CD or network. Power on your system or activate your LPAR and press 1 to enter the SMS menu. Press 5 to enter "Select Boot Options", and 1 in the next screen to select "Select Install or Boot device". Then select the boot device you are going to use.

 


Partitioning

Proceed with the install and stop when you get to the "Installation Settings" screen. Since we will be setting up software RAID, we must manually partition the disks. Select "Partitioning" from the "Installation Settings" screen.

 ┌────────────────────┐ Installation Settings                                   
 │Use Accept to       │ Click any headline to make changes or use the "Change   
 │perform a new       │ [Overview][Expert]                                      
 │installation with   │ ┌───────────────────────────────────────────────────┐   
 │the values          │ │┌─────────────────────────────────────────────────┐│   
 │displayed.          │ ││Keyboard Layout                                  ┬│   
 │                    │ ││                                                 ││   
 │Change the values by│ ││ *  English (US)                                 ││   
 │clicking on the     │ ││                                                 ││   
 │respective headline │ ││Partitioning                                     ┴│   
 │or by using the     │ ││                                                 ││   
 │Change... menu.     │ ││ *  Create partition /dev/sda1 (23.5 MB) with    ││   
 │                    │ ││    id=41                                        ││   
 │Your hard disk has  │ ││ *  Create swap partition /dev/sda2 (1.8 GB)     ││   
 │not been modified in│ ││ *  Create root partition /dev/sda3 (15.0 GB)    ││   
 │any way, so you can │ ││    with reiserfs                                ││   
 │still safely abort. │ ││                                                 ││   
 │                    │ │└─────────────────────────────────────────────────┘│   
 │                    │ └───────────────────────────────────────────────────┘   
 │                    │                     [Change....]                        
 └────────────────────┘ [ Back ]               [Abort]               [Accept]

 

Select "Create Custom Partition Setup" from the "Suggested Partitioning" screen.

 
┌────────────────────┐ Suggested Partitioning                                  
 │Your hard disks have┬                                                         
 │been checked. The   │   ┌───────────────────────────────────────────────┐     
 │partition setup     │   │ *  Create partition /dev/sda1 (23.5 MB) with  │     
 │displayed is        │   │    id=41                                      │     
 │proposed for your   │   │ *  Create swap partition /dev/sda2 (1.8 GB)   │     
 │hard drive.         │   │ *  Create root partition /dev/sda3 (15.0 GB)  │     
 │                    │   │    with reiserfs                              │     
 │To accept these     ┴   │                                               │     
 │suggestions and     │   └───────────────────────────────────────────────┘     
 │continue, select    │                                                         
 │Accept Proposal.    │      ┌Partitioning─────────────────────────────┐        
 │                    │      │( ) Accept Proposal                      │        
 │To make only small  │      │( ) Base Partition Setup on This Proposal│        
 │adjustments to the  │      │(x) Create Custom Partition Setup        │        
 │proposed setup (like│      │( ) Create LVM Based Proposal            │        
 │e.g. changing       │      └─────────────────────────────────────────┘        
 │filesystem types),  │                                                         
 │choose Base         │                                                         
 │Partition Setup on  │                                                         
 └────────────────────┘ [Back]                 [Abort]                 [Next]

 

Select "Custom Partitioning" from the "Preparing Hard Disk: Step 1" screen.

 ┌────────────────────┐ Preparing Hard Disk: Step 1                             
 │All hard disks      ┬                                                         
 │automatically       │                                                         
 │detected on your    │                                                         
 │system are shown    │                                                         
 │here. Select the    │                                                         
 │hard disk on which  │  ┌Hard Disk────────────────────────────────────────┐    
 │to install          │  │( ) 1:    1. SCSI,   16.9 GB, /dev/sda, AIX-VDASD│    
 │SUSE_SLES_SP3.      │  │( ) 2:    2. SCSI,   16.9 GB, /dev/sdb, AIX-VDASD│    
 │                    │  │( ) 3:    3. SCSI,    8.4 GB, /dev/sdc, AIX-VDASD│    
 │You may select later│  │( ) 4:    4. SCSI,    8.4 GB, /dev/sdd, AIX-VDASD│    
 │which part of the   │  │                                                 │    
 │disk is used for    │  │(x) Custom Partitioning (for experts)            │    
 │SUSE_SLES_SP3.      ┴  └─────────────────────────────────────────────────┘    
 │                    │                                                         
 │The Custom          │                                                         
 │Partitioning option │                                                         
 │for experts allows  │                                                         
 │full control over   │                                                         
 │partitioning the    │                                                         
 └────────────────────┘ [Back]                 [Abort]                 [Next]

 

From the "Expert Partitioner" screen, we will begin creating disk partitions.

 ┌────────────────────┐ Expert Partitioner                                      
 │Partition your hard ┬                                                         
 │disks...            ┴ ┌───────────────────────────────────────────────────┐   
 │                    │ │Device  │    Size    │ F │Type     │ Mount │Mount B│   
 │This is intended for│ │/dev/sda│     16.9 GB│   │AIX-VDASD│       │       │   
 │experts. If you are │ │/dev/sdb│     16.9 GB│   │AIX-VDASD│       │       │   
 │not familiar with   │ │/dev/sdc│      8.4 GB│   │AIX-VDASD│       │       │   
 │the concepts of hard│ │/dev/sdd│      8.4 GB│   │AIX-VDASD│       │       │   
 │disk partitions and │ │                                                   │   
 │how to use them, you│ │                                                   │   
 │might want to go    │ │                                                   │   
 │back and select     │ │                                                   │   
 │automatic           │ │                                                   │   
 │partitioning.       │ │                                                   │   
 │                    │ │                                                   │   
 │Please note that    │ │                                                   │   
 │nothing will be     │ │                                                   │   
 │written to your hard│ └├───────────────────────┤──────────────────────────┘   
 │disk until you      │            [Create][Edit][Delete][Resize]               
 │confirm the entire  │ [LVM..[EVMS..[RAID...[Crypt File...][NFS...[Expert..]   
 └────────────────────┘ [ Back ]               [Abort]               [Finish]

 


Disk Partitions

Select "Create", select the first disk of the mirrored pair, choose "Primary Partition". Select "Do not format" and choose "0x06 FAT16 Boot" for the File System ID. Set "End" to be +64M, and clear out the mount point.

┌──────────────────────────────────────────────────────────────────────────────┐
│┌────────────────────┐        Create a Primary Partition on /dev/sdc          │
││First, choose the   ┬                                                        │
││type of the         │ ┌Format─────────────────┐ ┌Size─────────────────────┐  │
││partition and       │ │                       │ │Cylinder size: 7.84 M    │  │
││whether this        │ │(x) Do not format      │ │                         │  │
││partition should be │ │  File system ID:      │ │Start cylinder:          │  │
││formatted.          │ │  0x06 FAT16 Boot▒▒▒▒▒.│ │0▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒│  │
││                    ┴ │                       │ │                         │  │
││Then, enter the     │ │( ) Format             │ │End:  (9 or +9M or +3.2GB│  │
││mount point ( /,    │ │ File system           │ │+64M▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒│  │
││/boot, /usr, /var,  │ │ FAT▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒.│ └─────────────────────────┘  │
││etc.)               │ │ [      Options       ]│                              │
││                    │ │                       │ [      Fstab Options      ]  │
││Now, enter the      │ │ [ ] Encrypt file syste│                              │
││location of the new │ │                       │ Mount Point                  │
││partition on your   │ └───────────────────────┘ ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒.  │
││hard disk.          │                                                        │
│└────────────────────┘                     [OK][Cancel]                       │
└──────────────────────────────────────────────────────────────────────────────┘

 

Click "Create" again, choose the same disk, select "Primary Partition", select "Do not format", select "0xFD Linux RAID" for the File system ID.

┌──────────────────────────────────────────────────────────────────────────────┐
│┌────────────────────┐        Create a Primary Partition on /dev/sdc          │
││First, choose the   ┬                                                        │
││type of the         │ ┌Format─────────────────┐ ┌Size─────────────────────┐  │
││partition and       │ │                       │ │Cylinder size: 7.84 M    │  │
││whether this        │ │(x) Do not format      │ │                         │  │
││partition should be │ │  File system ID:      │ │Start cylinder:          │  │
││formatted.          │ │  0xFD Linux RAID ▒▒▒▒.│ │9▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒│  │
││                    ┴ │                       │ │                         │  │
││Then, enter the     │ │( ) Format             │ │End:  (9 or +9M or +3.2GB│  │
││mount point ( /,    │ │ File system           │ │1105▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒│  │
││/boot, /usr, /var,  │ │ Reiser▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒.│ └─────────────────────────┘  │
││etc.)               │ │ [      Options       ]│                              │
││                    │ │                       │ [      Fstab Options      ]  │
││Now, enter the      │ │ [ ] Encrypt file syste│                              │
││location of the new │ │                       │ Mount Point                  │
││partition on your   │ └───────────────────────┘ ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒.  │
││hard disk.          │                                                        │
│└────────────────────┘                     [OK][Cancel]                       │
└──────────────────────────────────────────────────────────────────────────────┘

Create identical partitions on the second disk.

 


Create RAID

We will next create the software RAID 1 pair. Select "Raid->Create RAID", choose "RAID 1 (Mirroring)", select the first newly created Linux RAID disk partition and click add, then select the second and click add.

 ┌────────────────────┐ RAID Wizard Step 2:                                     
 │Add partitions to   ┬                                                         
 │your RAID. According│  Current RAID: /dev/md0               Size:   8.4 GB    
 │to the RAID type,   │  ┌─────────────────────────────────────────────────┐    
 │the usable disk size│  │    Device    │    Size    │        Type        ││    
 │is the sum of these │  │/dev/sdc2     │      8.4 GB│     Linux RAID     ││    
 │partitions (RAID0), │  │/dev/sdd2     │      8.4 GB│     Linux RAID     ││    
 │the size of the     │  │                                                 │    
 │smallest partition  │  │                                                 │    
 │(RAID 1), or        │  │                                                 │    
 │(N-1)*smallest      │  │                                                 │    
 │partition (RAID 5). ┴  │                                                 │    
 │                    │  │                                                 │    
 │Generally, the      │  │                                                 │    
 │partitions should be│  │                                                 │    
 │on different drives,│  │                                                 │    
 │to get the          │  │                                                 │    
 │redundancy and      │  └├──────────────────────────────────┤─────────────┘    
 │performance you     │                     [Add][Remove]                       
 │want.               │                                                         
 └────────────────────┘ [Back]                 [Abort]                 [Next]

 

Then click "Next". Select "Do not format" (we will use LVM), and clear the mount point.

 ┌────────────────────┐ RAID Wizard Step 3:                                     
 │chunk size:         ┬                                                         
 │It is the smallest  │                                                         
 │"atomic" mass of    │                                                         
 │data that can be    │ ┌Format──────────────┐RAID Type                         
 │written to the      │ │                    │raid1▒▒▒.                         
 │devices. A          │ │(x) Do not format   │                                  
 │reasonable chunk    │ │                    │Chunk size in KB                  
 │size for RAID 5 is  │ │( ) Format          │4▒▒▒▒▒▒▒▒▒▒▒▒▒▒.                  
 │128KB. For RAID 0,  │ │File system         │                                  
 │32 KB is a good     │ │Reiser▒▒▒▒▒▒▒▒▒▒▒▒▒.│Parity algorithm (only for RAID   
 │starting point. For │ │[     Options      ]│left-asymmetric▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒.   
 │RAID 1, the chunk   │ │                    │                                  
 │size does not affect┴ │[ ] Encrypt file sys│[        Fstab Options        ]   
 │the array very much.│ │                    │                                  
 │                    │ └────────────────────┘Mount Point                       
 │parity algorithm:   │                       ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒.   
 │The parity algorithm│                                                         
 │to use with RAID5.  │                                                         
 │Left-symmetric is   │                                                         
 └────────────────────┘ [ Back ]               [Abort]               [Finish]

 


Create LVM

Next we will create a volume group for our root disk and create logical volumes. Select "LVM" to enter the Logical Volume Manager". Change the Volume Group Name if desired, then select OK. Select /dev/md0 from the list of devices, then select "Add Volume".

 ┌────────────────────┐ Logical Volume Manager: Physical Volume Setup           
 │Add partitions      ┬    Volume Group                      [Remove group]     
 │(called physical    │    system▒▒▒▒▒. Size:   8.4 GB       [ Add group  ]     
 │volumes) to your    │                                                         
 │volume group.       │    ┌──────────────────────────────────────────────┐     
 │                    │    │  Device  │   Size  │  Type  │ Volume Group   │     
 │The volume group    │    │/dev/md0  │   8.4 GB│MD Raid │    system      │     
 │forms the storage   │    │/dev/sda  │  16.9 GB│   --   │                │     
 │pool from which your┴    │/dev/sdb  │  16.9 GB│   --   │                │     
 │logical volumes,    │    │                                              │     
 │like virtual        │    │                                              │     
 │partitions, are     │    │                                              │     
 │allocated.          │    │                                              │     
 │                    │    │                                              │     
 │Under normal        │    │                                              │     
 │circumstances, there│    │                                              │     
 │is no need to have  │    └──────────────────────────────────────────────┘     
 │more than one volume│              [Add Volume][Remove Volume]                
 │group. If you need  │                                                         
 │more than one volume│                                                         
 └────────────────────┘ [Back]                 [Abort]                 [Next]

 

Select "Next". Next we will create two logical volumes. Select "Add". Select "Format", select "Swap" as the file system, set the Logical volume name to swaplv, set the Size to the desired size (1G in our example), and set the Mount Point to swap and select OK.

 ┌─────┌────────────────────────────────────────────────────────────────┐       
 │Here,│                     Create Logical Volume                      │       
 │logic│                                                                │       
 │to st│                              Logical volume name               │       
 │     │ ┌Format───────────────────┐  swaplv▒▒▒▒▒▒▒▒▒▒▒▒▒▒              │       
 │Logic│ │                         │  (e.g. var, opt)                   │ ──┐   
 │usabl│ │( ) Do not format        │  Size: (e.g.,    4.0 GB  210.0 MB) │   │   
 │every│ │                         │     1.0 GB▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ │   │   
 │disk │ │(x) Format               │  max =    8.4 GB             [max] │   │   
 │be us│ │  File system            │  Stripes                           │   │   
 │creat│ │  Swap▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒.│  1▒▒▒▒▒.                           │   │   
 │on lo│ │  [       Options       ]│  Stripe Size                       │   │   
 │and u│ │                         │  64▒▒▒▒▒▒▒▒.                       │   │   
 │examp│ │  [ ] Encrypt file system│                                    │   │   
 │as ra│ │                         │  [         Fstab Options         ] │   │   
 │for d│ └─────────────────────────┘                                    │   │   
 │     │                              Mount Point                       │ ──┘   
 │If th│                              swap▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒. │ lum   
 │unall│                                                                │       
 │stora│                          [OK][Cancel]                          │       
 └─────└────────────────────────────────────────────────────────────────┘ xt]

 

 

Select Add again. Format as reiserfs, set the logical volume name to rootlv, select "max" to use the remainder of the volume group storage, set the mount point to /, and select OK.

 ┌─────┌────────────────────────────────────────────────────────────────┐       
 │Here,│                     Create Logical Volume                      │       
 │logic│                                                                │       
 │to st│                              Logical volume name               │       
 │     │ ┌Format───────────────────┐  rootlv▒▒▒▒▒▒▒▒▒▒▒▒▒▒              │       
 │Logic│ │                         │  (e.g. var, opt)                   │ ──┐   
 │usabl│ │( ) Do not format        │  Size: (e.g.,    4.0 GB  210.0 MB) │ │ │   
 │every│ │                         │     7.4 GB▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ │ │ │   
 │disk │ │(x) Format               │  max =    7.4 GB             [max] │   │   
 │be us│ │  File system            │  Stripes                           │   │   
 │creat│ │  Reiser▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒.│  1▒▒▒▒▒.                           │   │   
 │on lo│ │  [       Options       ]│  Stripe Size                       │   │   
 │and u│ │                         │  64▒▒▒▒▒▒▒▒.                       │   │   
 │examp│ │  [ ] Encrypt file system│                                    │   │   
 │as ra│ │                         │  [         Fstab Options         ] │   │   
 │for d│ └─────────────────────────┘                                    │   │   
 │     │                              Mount Point                       │ ──┘   
 │If th│                              /▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒. │ lum   
 │unall│                                                                │       
 │stora│                          [OK][Cancel]                          │       
 └─────└────────────────────────────────────────────────────────────────┘ xt]

 

Select Next, then Finish.

 ┌────────────────────┐ Logical Volume Manager: Logical Volumes                 
 │Here, create the    ┬                                                         
 │logical volumes used│ Volume Group                                            
 │to store your data. │ system▒▒▒▒▒. Available Size:0 MB                        
 │                    │                                                         
 │Logical volumes are │ ┌───────────────────────────────────────────────────┐   
 │usable almost       │ │Device            │ Mount   │ Vol. Grp.│     Size│ │   
 │everywhere normal   │ │/dev/system/rootlv│    /    │  system  │   7.4 GB│ │   
 │disk partitions can ┴ │/dev/system/swaplv│  swap   │  system  │   1.0 GB│ │   
 │be used. You can    │ │                                                   │   
 │create file systems │ │                                                   │   
 │on logical volumes  │ │                                                   │   
 │and use them, for   │ │                                                   │   
 │example, as swap or │ │                                                   │   
 │as raw partitions   │ │                                                   │   
 │for databases.      │ │                                                   │   
 │                    │ └├───────────────────────────────────────────┤──────┘   
 │If there is still   │ [x] View all mount points, not just the current volum   
 │unallocated physical│                  [Add][Edit][Remove]                    
 │storage in a volume │                                                         
 └────────────────────┘ [Back]                 [Abort]                 [Next]

 


Bootloader Configuration

Before leaving the disk partitioning screen, we need to find the device ID's of the FAT16 boot partitions. From the "Expert Partitioner" screen, scroll down to highlight the second FAT16 boot partition. In our example, we have /dev/sdc1 and /dev/sdd1, so we want to look at /dev/sdd1. Then use the right arrow to scroll to the columns on the left until you get to "Device ID" column.

 ┌────────────────────┐ Expert Partitioner                                      
 │Partition your hard ┬                                                         
 │disks...            ┴ ┌───────────────────────────────────────────────────┐   
 │                    │ │y   │Label│Device ID                   │Device Path│   
 │This is intended for│ │    │     │scsi-3500507670ec04f39      │           │   
 │experts. If you are │ │    │     │scsi-3500507670ec04e36      │           │   
 │not familiar with   │ │    │     │scsi-3500507670cc05da0      │           │   
 │the concepts of hard│ │    │     │scsi-3500507670cc05da0-part1│           │   
 │disk partitions and │ │    │     │scsi-3500507670cc05da0-part2│           │   
 │how to use them, you│ │    │     │scsi-3500507670cc05cf7      │           │   
 │might want to go    │ │    │     │scsi-3500507670cc05cf7-part1│           │   
 │back and select     │ │    │     │scsi-3500507670cc05cf7-part2│           │   
 │automatic           │ │stem│     │                            │           │   
 │partitioning.       │ │    │     │                            │           │   
 │                    │ │    │     │                            │           │   
 │Please note that    │ │    │     │                            │           │   
 │nothing will be     │ │                                                   │   
 │written to your hard│ └──────────────────────────────├───────────────────┤┘   
 │disk until you      │            [Create][Edit][Delete][Resize]               
 │confirm the entire  │ [LVM..[EVMS..[RAID...[Crypt File...][NFS...[Expert..]   
 └────────────────────┘ [ Back ]               [Abort]               [Finish]

 

Copy/paste the Device ID somewhere for later. In the example above, we have scsi-3500507670cc05cf7-part1.

The disk partitioning is now complete, so select Accept. From the "Installation Settings" screen, select the Expert mode at the top of the screen, then select "Booting" and hit Enter.

 ┌────────────────────┐ Installation Settings                                   
 │Use Accept to       │ Click any headline to make changes or use the "Change   
 │perform a new       │ [Overview][Expert]                                      
 │installation with   │ ┌───────────────────────────────────────────────────┐   
 │the values          │ │┌─────────────────────────────────────────────────┐│   
 │displayed.          │ ││ *  + Print Server                               ││   
 │                    │ ││ *  + 64Bit Runtime Environment                  ││   
 │Change the values by│ ││ *  Size of Packages to Install: 1.8 GB          ││   
 │clicking on the     │ ││                                                 ││   
 │respective headline │ ││Booting                                          ││   
 │or by using the     │ ││                                                 ││   
 │Change... menu.     │ ││ *  Boot loader type: ppc                        ││   
 │                    │ ││ *  Location: /dev/sdc1                          ┬│   
 │Your hard disk has  │ ││ *  Sections: linux (default)                    ┴│   
 │not been modified in│ ││                                                 ││   
 │any way, so you can │ ││Time Zone                                        ││   
 │still safely abort. │ ││                                                 ││   
 │                    │ │└─────────────────────────────────────────────────┘│   
 │                    │ └───────────────────────────────────────────────────┘   
 │                    │                     [Change....]                        
 └────────────────────┘ [ Back ]               [Abort]               [Accept]

On the "Boot Loader Settings" screen, select "Boot Loader Installation" at the top of the screen.

 ┌────────────────────┐ Boot Loader Settings                                    
 │Boot Loader Type    ┬ [Section Management][=>  Boot Loader Installation]      
 │To select whether to│ ┌───────────────────────────────────────────────────┐   
 │install a boot      │ │                                                   │   
 │loader and which    │ │    ┌Type────────────────────────────────────┐     │   
 │bootloader to       │ │    │  Boot Loader                           │     │   
 │install, use Boot   │ │    │  ppc▒▒▒▒▒▒▒.    [Boot Loader Options]  │     │   
 │Loader.             │ │    └────────────────────────────────────────┘     │   
 │                    ┴ │                                                   │   
 │Boot Loader Options │ │    ┌Boot Loader Location────────────────────┐     │   
 │To adjust options of│ │    │(x) PReP or FAT Partition               │     │   
 │the boot loader,    │ │    │                         /de+.          │     │   
 │such as the         │ │    └────────────────────────────────────────┘     │   
 │time-out, click Boot│ │                                                   │   
 │Loader Options.     │ │        [Boot Loader Installation Details]         │   
 │                    │ │                                                   │   
 │Boot Loader Location│ │                                                   │   
 │                    │ │                                                   │   
 │Boot Loader         │ └───────────────────────────────────────────────────┘   
 │Installation Details│                                              [Other.]   
 └────────────────────┘ [ Back ]               [Abort]               [Finish]

 

 

From the "Boot Loader Installation" screen, select "Boot Loader Options". On the empty line below "Partition for Boot Loader Duplication", we need to enter the device name for the second FAT16 boot partition, so take the device ID that was recorder earlier and prefix that with /dev/disk/by-id/. For our example, the full device name would be /dev/disk/by-id/scsi-3500507670cc05cf7-part1.

 ┌────────────────────┐ Boot Loader Options                                     
 │Boot Menu           │                                                         
 │To show the boot    │                                                         
 │loader menu during  │   ┌Boot Menu──────────────────────────────────────┐     
 │the boot process,   │   │  [x] Change Boot Device in NV-RAM             │     
 │set Show Boot Menu. │   │  [ ] Install Boot Loader Even on Errors       │     
 │Otherwise the boot  │   │  [ ] Always Boot from FAT Partition           │     
 │loader menu will be │   │  Append Options for Kernel Command Line       │     
 │hidden. To specify  │   │  ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒  │     
 │the time-out after  │   │  Partition for Boot Loader Duplication        │     
 │which the default   │   │  /dev/disk/by-id/scsi-3500507670cc05+.        │     
 │kernel is loaded,   │   │  Default initrd Path                          │     
 │set Continue Booting│   │  ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒.[Browse...]  │     
 │after a Time-Out and│   │  Default Root Device                          │     
 │Boot Menu Time-Out. │   │  ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒.                          │     
 │                    │   │  Time-Out in Tenths of Seconds                │     
 │                    │   │                                        . 80-  │     
 │                    │   └───────────────────────────────────────────────┘     
 │                    │                                                         
 │                    │                                                         
 └────────────────────┘ [Back]                 [Abort]                 [ OK ]

Select OK, then select Finish. You are now ready to continue the Linux installation.

 


Post Installation Configuration

The following instructions are only needed if you skipped the Boot Loader configuration instructions above. If you followed all the previous instructions fully, you now have SuSE Linux Enterprise Server installed on a RAID 1 disk. Congratulations!

After the install completes, continue through the usual post installation menus. Once you are at a login prompt, log into the system. At this point, only one of the disks in the mirrored pair is capable of booting the logical partition. Lets setup the second disk.

 # cat /etc/lilo.conf
 # Modified by YaST2. Last modification on Thu Dec 16 19:48:59 UTC 2010
 activate
 timeout = 80
 boot = /dev/disk/by-id/scsi-3500507670cc05da0-part1
 default = linux

 image = /boot/vmlinux-2.6.16.60-0.54.5-ppc64
 ###Don't change this comment - YaST2 identifier: Original name: linux###
     label = linux
     optional
     initrd = /boot/initrd-2.6.16.60-0.54.5-ppc64
     root = /dev/system/rootlv

The important part to note is the "boot" line. This tells us which disk is currently setup to boot. Lets find the kernel device name for this device:

 # ls -l /dev/disk/by-id/scsi-3500507670cc05da0-part1
 lrwxrwxrwx 1 root root 10 2010-12-16 13:52 /dev/disk/by-id/scsi-3500507670cc05da0-part1 -> ../../sdc1

From this, we can see that /dev/sdc is the kernel device name for the device we are currently booting from. Lets now look at the RAID configuration.

 # cat /proc/mdstat
 Personalities : [raid1] [raid0] [raid5] [raid4] [linear]
 md0 : active raid1 sdc2[0] sdd2[1]
       8811584 blocks [2/2] [UU]

 unused devices: <none>

Looking at the md0 line, we can see that it is constructed of sdc2 and sdd2. Since we are booting from sdc1, we now know we need to find the by-id name for sdd1.

 # ls -l /dev/disk/by-id/ | grep sdd1
 lrwxrwxrwx 1 root root 10 2010-12-16 13:52 scsi-3500507670cc05cf7-part1 -> ../../sdd1

We are now ready to update /etc/lilo.conf. Using vi, lets edit /etc/lilo.conf and add a "clone" line to point to the second boot device, which we just discovered to be /dev/disk/by-id/scsi-3500507670cc05cf7-part1. Our /etc/lilo.conf now looks like this:

 # Modified by YaST2. Last modification on Thu Dec 16 19:48:59 UTC 2010
 activate
 timeout = 80
 boot = /dev/disk/by-id/scsi-3500507670cc05da0-part1
 clone = /dev/disk/by-id/scsi-3500507670cc05cf7-part1
 default = linux

 image = /boot/vmlinux-2.6.16.60-0.54.5-ppc64
 ###Don't change this comment - YaST2 identifier: Original name: linux###
     label = linux
     optional
     initrd = /boot/initrd-2.6.16.60-0.54.5-ppc64
     root = /dev/system/rootlv

We now run the lilo command to write the boot configuration to the second disk and update the boot device order in Open Firmware to point to both devices.

 # lilo

We now have a fully redundant software RAID configuration!