SUSE SLES9 SP2 SW-Raid

From Linux on Power wiki

(Redirected from SUSE SLE9 SP2 SW-Raid)
Jump to: navigation, search

See http://www-128.ibm.com/developerworks/eserver/library/es-conf-swraid2/ for a published document ver sion.


Contents

Prerequisites

  • Create a network installation source with SP2 (Service Pack 2) included or use CDs. Using CDs you will need to boot from the first SP2 CD. CD installation will substantialy improve your DJ qualities.
  • You will need at least 2 disks (otherwise software raid hardly make sense)


Start installation

If you are running CD installation provide following boot arguments "vnc=1 vncpassword=abc123", for network installation hardcode those using mkzimage_cmdline tool.

Partitioning

Partitioning Layout

Partitioning target

Using yast

Error creating thumbnail: convert: unable to open image `/usr/share/mediawiki/images/4/42/Custom-partitioning.png': /usr/lib/ImageMagick-6.6.0/modules-Q16/coders/png.la @ error/blob.c/OpenBlob/2489.
convert: unable to open image `/usr/share/mediawiki/images/4/42/Custom-partitioning.png': @ error/blob.c/OpenBlob/2489.
convert: unable to open file `/usr/share/mediawiki/images/4/42/Custom-partitioning.png' @ error/png.c/ReadPNGImage/2951.
convert: missing an image filename `/usr/share/mediawiki/images/thumb/4/42/Custom-partitioning.png/180px-Custom-partitioning.png' @ error/convert.c/ConvertImageCommand/2940.
Custom Partitioning

If you are installing on the disks which have been used before, it is recommended to delete old partition tables on the both disks. Go to Partitioning -> Create custom partition setup -> expert and select delete entire partition table. This will use dd to the partition table area and make it clean. You will need to go back and ignore the message about losing changes.


Now in the partitioning screen again, go to custom partitioning and create following partitions on each disk:

Name Type Format Size Purpose
/dev/sda1 PrePBoot / 41 No 24 MB PrepBoot partition, loaded by firmware
/dev/sda2 Linux Raid /fd No 9,9 GB (all place you have left) Raid device for LVM, will be used for md0

And on the second disk:

Name Type Format Size Purpose
/dev/sdb1 FAT16 / 6 No 24 MB PrepBoot partition, loaded by firmware
/dev/sdb2 Linux Raid /fd No 9,9 GB (all place you have left) Raid device for LVM, will be used for md0


Your resulting partitioning should look like this screenshot:
Error creating thumbnail: convert: unable to open image `/usr/share/mediawiki/images/d/dc/Partitioning-disks.png': /usr/lib/ImageMagick-6.6.0/modules-Q16/coders/png.la @ error/blob.c/OpenBlob/2489.
convert: unable to open image `/usr/share/mediawiki/images/d/dc/Partitioning-disks.png': @ error/blob.c/OpenBlob/2489.
convert: unable to open file `/usr/share/mediawiki/images/d/dc/Partitioning-disks.png' @ error/png.c/ReadPNGImage/2951.
convert: missing an image filename `/usr/share/mediawiki/images/thumb/d/dc/Partitioning-disks.png/180px-Partitioning-disks.png' @ error/convert.c/ConvertImageCommand/2940.
All disk partitions


Be carefull about the 24 MB setting for the first partition, on my disks I needed to set 23 MB which finally become 24. This is due to the fact, that SUSE tries to allign to the next cylinder boundary and still to fulfill your request. Bigger prepboot partition may make your system not bootable.

After creating the partitions on the disk, press the RAID button and create RAID1 device /dev/md0 containing the partitions /dev/sda2 and /dev/sdb2.


After creating the raid device, press the LVM button and create a volume group. Add the device /dev/md0 to the volume group.
Error creating thumbnail: convert: unable to open image `/usr/share/mediawiki/images/7/72/Creating-vg.png': /usr/lib/ImageMagick-6.6.0/modules-Q16/coders/png.la @ error/blob.c/OpenBlob/2489.
convert: unable to open image `/usr/share/mediawiki/images/7/72/Creating-vg.png': @ error/blob.c/OpenBlob/2489.
convert: unable to open file `/usr/share/mediawiki/images/7/72/Creating-vg.png' @ error/png.c/ReadPNGImage/2951.
convert: missing an image filename `/usr/share/mediawiki/images/thumb/7/72/Creating-vg.png/180px-Creating-vg.png' @ error/convert.c/ConvertImageCommand/2940.
Create Volume Group



Create all logical volumes you need. Do not forget to create a swaplv for swap.

Error creating thumbnail: convert: unable to open image `/usr/share/mediawiki/images/f/ff/Logical-volumes.png': /usr/lib/ImageMagick-6.6.0/modules-Q16/coders/png.la @ error/blob.c/OpenBlob/2489.
convert: unable to open image `/usr/share/mediawiki/images/f/ff/Logical-volumes.png': @ error/blob.c/OpenBlob/2489.
convert: unable to open file `/usr/share/mediawiki/images/f/ff/Logical-volumes.png' @ error/png.c/ReadPNGImage/2951.
convert: missing an image filename `/usr/share/mediawiki/images/thumb/f/ff/Logical-volumes.png/180px-Logical-volumes.png' @ error/convert.c/ConvertImageCommand/2940.
Create logical volumes


Your partitioning results should look similar to this "Partitioning results" screenshot.
Error creating thumbnail: convert: unable to open image `/usr/share/mediawiki/images/7/73/Partitioning-results.png': /usr/lib/ImageMagick-6.6.0/modules-Q16/coders/png.la @ error/blob.c/OpenBlob/2489.
convert: unable to open image `/usr/share/mediawiki/images/7/73/Partitioning-results.png': @ error/blob.c/OpenBlob/2489.
convert: unable to open file `/usr/share/mediawiki/images/7/73/Partitioning-results.png' @ error/png.c/ReadPNGImage/2951.
convert: missing an image filename `/usr/share/mediawiki/images/thumb/7/73/Partitioning-results.png/180px-Partitioning-results.png' @ error/convert.c/ConvertImageCommand/2940.
Partitioning Results

After finishing, just let the installation run. No changes or rescue reboots are required anymore.

Post Installation Tasks

After reboot the system will come up with following partitioning settings:

Disk /dev/sda: 10.7 GB, 10737418240 bytes
64 heads, 32 sectors/track, 10240 cylinders
Units = cylinders of 2048 * 512 = 1048576 bytes
  Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1          24       24560    6  FAT16
/dev/sda2              25       10240    10461184   fd  Linux raid autodetect
Disk /dev/sdb: 10.7 GB, 10737418240 bytes
64 heads, 32 sectors/track, 10240 cylinders
Units = cylinders of 2048 * 512 = 1048576 bytes
  Device Boot      Start         End      Blocks   Id  System
/dev/sdb1               1          24       24560    6  FAT16
/dev/sdb2              25       10240    10461184   fd  Linux raid autodetect

Mirror boot partition

Copy /dev/sda1 to /dev/sdb1 using dd:

dd if=/dev/sda1 of=/dev/sdb1

or change /dev/sda1 to /dev/sdb1 in /etc/lilo.conf and run lilo command. If you want to keep the /dev/sda1 your default boot disk, change it back to /dev/sda1 and run lilo command again.

Setting the bootlist

  • If you did used lilo command your boot list should show both disks. In this case you can skip this step manually adding the second disc to the boot list.

Check your bootlist:

# bootlist -m normal -o
ofpathname: Could not retrieve logical device name for Open Firmware path  
  "/vdevice/v-scsi@30000004/disk@8000000000000000:1,yaboot"
sda 
sdb

The bootlist only contains the openfirmware path to the first disk. The entry sda and sdb will not work, as we want to boot a fat partition. We need to get the openfirmware path to the second disk (/dev/sdb) and add it to the bootlist:

# show_of_path.sh /dev/sdb
/vdevice/v-scsi@30000005/disk@8000000000000000

and set now both disks to the bootlist, including :1,yaboot on the end of each line:

bootlist -m normal /vdevice/v-scsi@30000004/disk@8000000000000000:1,yaboot  /vdevice/v-scsi@30000005/disk@8000000000000000:1,yaboot

Check md-status

~ # cat /proc/mdstat

Personalities : [raid1]
md0 : active raid1 sdb2[1] sda2[0]
     10461120 blocks [2/2] [UU]
     [==========>..........]  resync = 53.0% (5546740/10461120) finish=78.7min speed=1038K/sec
unused devices: <none>

Autoyast installation for Software Raid

      • Only for SP2
<?xml version="1.0"?>
<!DOCTYPE profile SYSTEM "/usr/share/autoinstall/dtd/profile.dtd">
<profile xmlns="http://www.suse.com/1.0/yast2ns" xmlns:config="http://www.suse.com/1.0/configns">
 <configure>
   <files config:type="list">
   </files>
   <inetd>
     <last_created config:type="integer">0</last_created>
     <netd_service config:type="symbol">xinetd</netd_service>
     <netd_status config:type="integer">-1</netd_status>
   </inetd>
   <ldap-server>
     <commonServerCertificateAvailable>0</commonServerCertificateAvailable>
     <configureCommonServerCertificate>0</configureCommonServerCertificate>
     <loglevel>256</loglevel>
     <serviceEnabled>0</serviceEnabled>
   </ldap-server>
   <networking>
<dhcp_options>
       <dhclient_hostname_option>AUTO</dhclient_hostname_option>
     </dhcp_options>
     <dns>
       <dhcp_hostname config:type="boolean">false</dhcp_hostname>
       <dhcp_resolv config:type="boolean">false</dhcp_resolv>
       <domain>domain.local</domain>
       <hostname>node1</hostname>
       <nameservers config:type="list">
         <nameserver>192.168.1.100</nameserver>
         <nameserver></nameserver>
       </nameservers>
       <searchlist config:type="list">
         <search>sub.domain.local</search>
         <search>domain.local</search>
       </searchlist>
     </dns>
<interfaces config:type="list">
       <interface>
         <bootproto>static</bootproto>
         <broadcast>192.168.1.255</broadcast>
         <device>eth0</device>
         <ipaddr>192.168.1.15</ipaddr>
         <netmask>255.255.255.0</netmask>
         <network>192.168.1.0</network>
         <startmode>onboot</startmode>
       </interface>
     </interfaces>
     <routing>
       <ip_forward config:type="boolean">false</ip_forward>
       <routes config:type="list">
         <route>
           <destination>default</destination>
           <device>-</device>
           <gateway>192.168.1.1</gateway>
           <netmask>-</netmask>
         </route>
       </routes>
     </routing>
</networking>
   <runlevel>
     <default>3</default>
   </runlevel>
   <users config:type="list">
     <user>
       <encrypted config:type="boolean">true</encrypted>
       <user_password>lnEzeBlnyrHZc</user_password>
       <username>root</username>
     </user>
   </users>
 </configure>
 <install>
   <bootloader>
     <activate config:type="boolean">true</activate>
     <board_type>chrp</board_type>
     <default>linux</default>
     <global config:type="list">
       <global_entry>
         <key>default</key>
         <value>linux</value>
       </global_entry>
       <global_entry>
         <key>timeout</key>
         <value config:type="integer">100</value>
       </global_entry>
       <global_entry>
         <key>boot</key>
         <value>/dev/sda1</value>
       </global_entry>
       <global_entry>
         <key>activate</key>
         <value config:type="boolean">true</value>
       </global_entry>
     </global>
     <initrd_modules config:type="list">
       <initrd_module>
         <module>ipr</module>
       </initrd_module>
       <initrd_module>
         <module>lpfcdd</module>
       </initrd_module>
       <initrd_module>
         <module>ibmveth</module>
       </initrd_module>
       <initrd_module>
         <module>raid1</module>
       </initrd_module>
     </initrd_modules>
     <loader_device>/dev/sda1</loader_device>
     <loader_type>ppc</loader_type>
     <location>custom</location>
     <of_defaultdevice config:type="boolean">true</of_defaultdevice>
     <prep_boot_partition>/dev/sda1</prep_boot_partition>
     <sections config:type="list">
       <section config:type="list">
         <section_entry>
           <key>image</key>
           <value>/boot/vmlinux</value>
         </section_entry>
         <section_entry>
           <key>label</key>
           <value>linux</value>
         </section_entry>
         <section_entry>
           <key>root</key>
           <value>/dev/systemvg/rootlv</value>
         </section_entry>
         <section_entry>
           <key>initrd</key>
           <value>/boot/initrd</value>
         </section_entry>
         <section_entry>
           <key>append</key>
           <value>selinux=0 elevator=cfq</value>
         </section_entry>
       </section>
     </sections>
   </bootloader>
   <general>
     <clock>
       <hwclock>UTC</hwclock>
       <timezone>Europe/Berlin</timezone>
     </clock>
     <keyboard>
       <keymap>english-us</keymap>
     </keyboard>
     <language>en_US</language>
     <mode>
       <confirm config:type="boolean">false</confirm>
       <forceboot config:type="boolean">false</forceboot>
     </mode>
     <mouse>
       <id>none</id>
     </mouse>
   </general>
   <partitioning config:type="list">
     <drive>
       <device>/dev/sda</device>
       <partitions config:type="list">
         <partition>
           <format config:type="boolean">false</format>
           <partition_id config:type="integer">65</partition_id>
           <partition_nr config:type="integer">1</partition_nr>
           <partition_type>primary</partition_type>
           <size>23M</size>
         </partition>
         <partition>
           <format config:type="boolean">false</format>
           <partition_id config:type="integer">253</partition_id>
           <partition_nr config:type="integer">2</partition_nr>
           <raid_name>/dev/md0</raid_name>
           <raid_type>raid</raid_type>
           <size>max</size>
         </partition>
       </partitions>
       <use>all</use>
     </drive>
     <drive>
       <device>/dev/sdb</device>
       <partitions config:type="list">
         <partition>
           <format config:type="boolean">false</format>
           <partition_id config:type="integer">131</partition_id>
           <partition_nr config:type="integer">1</partition_nr>
           <partition_type>primary</partition_type>
           <size>23M</size>
         </partition>
         <partition>
           <format config:type="boolean">false</format>
           <partition_id config:type="integer">253</partition_id>
           <partition_nr config:type="integer">3</partition_nr>
           <raid_name>/dev/md0</raid_name>
           <raid_type>raid</raid_type>
           <size>max</size>
         </partition>
       </partitions>
       <use>all</use>
     </drive>
     <drive>
       <device>/dev/md</device>
       <partitions config:type="list">
         <partition>
           <lvm_group>systemvg</lvm_group>
           <partition_id config:type="integer">142</partition_id>
           <partition_nr config:type="integer">0</partition_nr>
           <raid_options>
             <persistent_superblock config:type="boolean">true</persistent_superblock>
             <raid_type>raid1</raid_type>
           </raid_options>
           <region config:type="list">
             <region_entry config:type="integer">0</region_entry>
             <region_entry config:type="integer">69444</region_entry>
           </region>
           <size>max</size>
         </partition>
       </partitions>
       <use>all</use>
     </drive>
     <drive>
       <device>/dev/systemvg</device>
       <is_lvm_vg config:type="boolean">true</is_lvm_vg>
       <lvm2 config:type="boolean">true</lvm2>
       <partitions config:type="list">
         <partition>
           <filesystem config:type="symbol">jfs</filesystem>
           <format config:type="boolean">true</format>
           <lv_name>rootlv</lv_name>
           <mount>/</mount>
           <partition_id config:type="integer">142</partition_id>
           <size>512MB</size>
         </partition>
         <partition>
           <filesystem config:type="symbol">jfs</filesystem>
           <format config:type="boolean">true</format>
           <lv_name>usrlv</lv_name>
           <mount>/usr</mount>
           <partition_id config:type="integer">142</partition_id>
           <size>1024MB</size>
         </partition>
         <partition>
           <filesystem config:type="symbol">jfs</filesystem>
           <format config:type="boolean">true</format>
           <lv_name>optlv</lv_name>
           <mount>/opt</mount>
           <partition_id config:type="integer">142</partition_id>
           <size>256MB</size>
         </partition>
         <partition>
           <filesystem config:type="symbol">jfs</filesystem>
           <format config:type="boolean">true</format>
           <lv_name>varlv</lv_name>
           <mount>/var</mount>
           <partition_id config:type="integer">142</partition_id>
           <size>512MB</size>
         </partition>
         <partition>
           <filesystem config:type="symbol">jfs</filesystem>
           <format config:type="boolean">true</format>
           <lv_name>tmplv</lv_name>
           <mount>/tmp</mount>
           <partition_id config:type="integer">142</partition_id>
           <size>512MB</size>
         </partition>
         <partition>
           <filesystem config:type="symbol">jfs</filesystem>
           <format config:type="boolean">true</format>
           <lv_name>homelv</lv_name>
           <mount>/home</mount>
           <partition_id config:type="integer">142</partition_id>
           <size>256MB</size>
         </partition>
         <partition>
           <filesystem config:type="symbol">swap</filesystem>
           <format config:type="boolean">true</format>
           <lv_name>swaplv</lv_name>
           <mount>swap</mount>
           <partition_id config:type="integer">142</partition_id>
           <size>512MB</size>
         </partition>
       </partitions>
       <pesize>32M</pesize>
       <use>all</use>
     </drive>
   </partitioning>
   <report>
     <errors>
       <log config:type="boolean">true</log>
       <show config:type="boolean">true</show>
       <timeout config:type="integer">0</timeout>
     </errors>
     <messages>
       <log config:type="boolean">true</log>
       <show config:type="boolean">true</show>
       <timeout config:type="integer">10</timeout>
     </messages>
     <warnings>
       <log config:type="boolean">true</log>
       <show config:type="boolean">true</show>
       <timeout config:type="integer">30</timeout>
     </warnings>
     <yesno_messages>
       <log config:type="boolean">true</log>
       <show config:type="boolean">true</show>
       <timeout config:type="integer">0</timeout>
     </yesno_messages>
   </report>
   <software>
     <addons config:type="list">
       <addon>Base-System</addon>
       <addon>X11</addon>
       <addon>YaST2</addon>
     </addons>
     <base>Minimal X11</base>
     <packages config:type="list">
       <package>iprutils</package>
       <package>lvm2</package>
       <package>ppc64-utils</package>
       <package>IBMJava2-SDK</package>
       <package>IBMJava2-JRE</package>
       <package>nfs-utils</package>
       <package>wget</package>
       <package>compat</package>
       <package>rdist</package>
       <package>findutils-locate</package>
       <package>bridge-utils</package>
     </packages>
   </software>
 </install>
</profile>



--bautt 14:52, 22 Jul 2005 (CEST)

Personal tools