Friday, March 22, 2013

Jump start a RAID configuration Solaris10

logo-solarisJump start a RAID configuration Solaris 10






Contents


  •  Introduction

    • 1.1 Purpose

    • 1.2 Scope

    • 1.3 Acronyms

    • 1.4 References



  • 2 Steps

  • 3 Examples

    • 3.1 begin.sh

    • 3.2 finish.sh

    • 3.3 rules

    • 3.4 sysidcfg

    • 3.5 Output



  • 4 Discussion

  • 1





Introduction


Purpose


Describing how to jumpstart a box so that it boot with RAID.

Scope


Foremost describe how to do this on Solaris 10 6/06.

This howto is for people that are familiar with jumpstart configuration, but new to getting RAID jumpstarted onto a box.

Acronyms


RAID
Redundant Array of Inexpensive Disks.
RAID-0
Striping, useing multiple disks as one volume.
RAID-1
Mirror, two or three disks looks exactly alike.
RIAD-Z
The true raid, with Suns new ZFS.
ZFS
Zetabyte File System.

References


Steps


You need to add instructions to three of the Jumpstart files: rules/rules.ok, begin.sh, finish.sh.
The profile is generated in the begin.sh, this is done to enable it to support both on and two disks.

Examples


begin.sh


#!/usr/bin/sh # ---------------------------------------------------------------------------- #****f* /single_disk_layout # NAME # single_disk_layout # FUNCTION # # # # INPUTS # * -- . # # OUTPUT # # # # RETURN VALUE # # # NOTES # # Ideally we could extract the name of the disks from $SI_DISKLIST # # # SOURCE single_disk_layout() { echo "metadb c1t0d0s7 count 3" >> ${SI_PROFILE} echo "" >> ${SI_PROFILE} echo "#--- Single-disk install:" >> ${SI_PROFILE} echo "filesys mirror:d10 c1t0d0s0 32000 / logging" >> ${SI_PROFILE} echo "filesys mirror:d20 c1t0d0s1 517 swap logging" >> ${SI_PROFILE} echo "filesys mirror:d30 c1t0d0s3 32000 unnamed logging" >> ${SI_PROFILE} echo "filesys mirror:d40 c1t0d0s4 free unnamed logging" >> ${SI_PROFILE} } # end single_disk_layout #**** # ---------------------------------------------------------------------------- #****f* /dual_disk_layout # NAME # dual_disk_layout # FUNCTION # # # # INPUTS # * -- . # # OUTPUT # # # # RETURN VALUE # # # NOTES # # Ideally we could extract the name of the disks from $SI_DISKLIST # # # SOURCE dual_disk_layout() { echo "metadb c1t0d0s7 count 3" >> ${SI_PROFILE} echo "metadb c1t1d0s7 count 3" >> ${SI_PROFILE} echo "" >> ${SI_PROFILE} echo "#--- Dual-disk install:" >> ${SI_PROFILE} echo "filesys mirror:d10 c1t0d0s0 c1t1d0s0 32000 / logging" >> ${SI_PROFILE} echo "filesys mirror:d20 c1t0d0s1 c1t1d0s1 517 swap logging" >> ${SI_PROFILE} echo "filesys mirror:d30 c1t0d0s3 c1t1d0s3 32000 unnamed logging" >> ${SI_PROFILE} echo "filesys mirror:d40 c1t0d0s4 c1t1d0s4 free unnamed logging" >> ${SI_PROFILE} } # end dual_disk_layout #**** # ---------------------------------------------------------------------------- #****f* /disk_layout # NAME # disk_layout # FUNCTION # # # # INPUTS # * -- . # # OUTPUT # # # # RETURN VALUE # # # NOTES # # WARNING: this requires the "probe disks" in the rules file! # # # SOURCE disk_layout() { case $SI_NUMDISKS in 1) single_disk_layout  ;; 2) dual_disk_layout  ;; *) echo "The probe has reported that the system has $SI_NUMDISKS installed," echo "but this profile only supports one or two disks!" exit 1 esac } # end disk_layout ################################################################################ # # FUNCTION_NAME # create_derived_profile # # FUNCTION_DESCRIPTION # Create a machine profile based on: # - logical device number of hard drive # - platform type # - box type (provided by user) # - size of hard drive # - amount of physical memory # # FUNCTION_ARGUMENTS # None # # FUNCTION_RETURN_CODES # None # # PRECONDITIONS # kernel architecture is sun4u # # POSTCONDITIONS # derived profile is written to SI_PROFILE (/tmp/install.input) # ################################################################################ create_derived_profile () { # Set install_type to initial_install. The other possible value for this # keyword is upgrade. echo "install_type initial_install" > ${SI_PROFILE} # Set system_type to 'standalone'. The other possible value for this keyword # is 'server', meaning OS server for diskless clients. This box will not act # as an OS server for diskless clients. Therefore set this to 'standalone'. # Also, our minimalist install consisting primarily of the Solaris core cluster # does not support operation as an OS server. echo "system_type standalone" >> ${SI_PROFILE} echo "" >> ${SI_PROFILE} ## Single Disk Partitioning Scheme # Note: the keyword "logging" enables journaling for the specified partition # echo "partitioning explicit" >> ${SI_PROFILE} disk_layout echo "" >> ${SI_PROFILE} # Core OS # Core System Support # A pre-defined small software configuration consisting of the software for a networked system. echo "cluster SUNWCreq" >> ${SI_PROFILE} # System Accounting # System accounting utilities echo "cluster SUNWCacc" >> ${SI_PROFILE} # Live Upgrade Software echo "cluster SUNWClu" >> ${SI_PROFILE} # Network Time Protocol echo "cluster SUNWCntp" >> ${SI_PROFILE} # core software for resource pools echo "cluster SUNWCpool" >> ${SI_PROFILE} # Volume Management echo "cluster SUNWCvol" >> ${SI_PROFILE} # Solaris Zones echo "cluster SUNWCzone" >> ${SI_PROFILE} ############################################################################ # Packages that are installed in addition to the Core Cluster ############################################################################ # System administration core libraries echo "package SUNWadmc" >> ${SI_PROFILE} # System & Network Administration Framework Configuration echo "package SUNWadmfr" >> ${SI_PROFILE} # System & Network Administration Framework echo "package SUNWadmfw" >> ${SI_PROFILE} # BIND Name server Manifest echo "package SUNWbindr" >> ${SI_PROFILE} # BIND DNS Name server and tools echo "package SUNWbind" >> ${SI_PROFILE} # CCS tools bundled with SunOS echo "package SUNWbtool" >> ${SI_PROFILE} # utility for writing to CD-R/RW and DVD{+-}R/RW disks echo "package SUNWcdrw" >> ${SI_PROFILE} # Portable layout services for Complex Text Layout support echo "package SUNWctpls" >> ${SI_PROFILE} # Documentation Tools echo "package SUNWdoc" >> ${SI_PROFILE} # The GNU Zip (gzip) compression utility echo "package SUNWgzip" >> ${SI_PROFILE} # SunOS Header Files echo "package SUNWhea" >> ${SI_PROFILE} # Install Software echo "package SUNWinst" >> ${SI_PROFILE} # Interprocess Communications echo "package SUNWipc" >> ${SI_PROFILE} # The GNU pager (less) echo "package SUNWless" >> ${SI_PROFILE} # On-Line Manual Pages echo "package SUNWman" >> ${SI_PROFILE} # CD creation utilities echo "package SUNWmkcd" >> ${SI_PROFILE} # Source Compatibility, (Root) echo "package SUNWscpr" >> ${SI_PROFILE} # Source Compatibility, (Usr) echo "package SUNWscpu" >> ${SI_PROFILE} # Solaris Bundled tools echo "package SUNWsprot" >> ${SI_PROFILE} # Programming Tools echo "package SUNWtoo" >> ${SI_PROFILE} # XCU4 Utilities echo "package SUNWxcu4" >> ${SI_PROFILE} echo "package SUNWbash" >> ${SI_PROFILE} echo "package SUNWtcsh" >> ${SI_PROFILE} echo "package SUNWj5rt" >> ${SI_PROFILE} echo "package SUNWxwplt" >> ${SI_PROFILE} echo "package SUNWi15rf" >> ${SI_PROFILE} ############################################################################ # Packages from the Core Cluster that are removed ############################################################################ # No packages are removed. } # end create_derived_profile #=============================================================================== #============================== Main Program ================================= #=============================================================================== # Generate the appropriate machine profile based on the platform type create_derived_profile echo "Make it possible to reboot." # from http://www.sunmanagers.org/pipermail/summaries/2002-February/000988.html /usr/sbin/eeprom "diag-switch?=false" # Nobody will check the return value exit 0

finish.sh


#!/usr/bin/sh echo "Starting OS Post Install Phase"; # Disable power management autoshutdown feature. ${TOUCH} /a/noautoshutdown; # Avoid the NFS4 question. #/usr/bin/touch /a/etc/.NFS4inst_state.domain echo "Add disk1 as secondary boot." # RAID-1 Stuff. # if disk(0) doesn't work, try disk1. /usr/sbin/eeprom "boot-device=disk disk1" echo "Make the mirror disk bootable." # Make the mirror disk bootable. /usr/sbin/installboot /usr/platform/`/usr/bin/uname -i`/lib/fs/ufs/bootblk /dev/rdsk/c1t1d0s0 # Enable boot when one of the disks are gone. echo "set md:mirrored_root_flag=1" >> /a/etc/system # Inform the user that Post OS install is done echo "OS Post Install Phase Complete"; exit 0

rules


probe rootdisk probe disks probe karch probe memsize probe model karch sun4u begin.sh = finish.sh any - shutdown.sh - -

sysidcfg


This is a minimal sysidcfg, just in case you don't have your own.
# Specify that no name service will be used. name_service=NONE # Do not specify the network interface. This will be set up by App Install. network_interface='NONE'{hostname=mirrorbox} # Do not use Kerberos security security_policy=NONE # Use the english language. system_locale=en_US # Set the terminal type terminal=vt100 # Specify that Universal Time Coordinates (also known as Greenwich Mean Time) # be used. timezone=UTC # Use the box being installed as the timekeeper. timeserver=localhost

Output


ok boot net - install SC Alert: Host System has Reset SC Alert: CRITICAL ALARM is set Probing system devices Probing memory Probing I/O buses Netra 240, No Keyboard Copyright 2005 Sun Microsystems, Inc. All rights reserved. OpenBoot 4.18.5, 2048 MB memory installed, Serial #xxxxxxxx. Ethernet address xx:xx:xx:xx:xx:xx, Host ID: xxxxxxxx. Rebooting with command: boot net - install Boot device: /pci@1f,700000/network@2 File and args: - install 100 Mbps FDX Link up Requesting Internet Address for xx:xx:xx:xx:xx:xx Requesting Internet Address for xx:xx:xx:xx:xx:xx Requesting Internet Address for xx:xx:xx:xx:xx:xx Requesting Internet Address for xx:xx:xx:xx:xx:xx 100 Mbps FDX Link up Requesting Internet address for xx:xx:xx:xx:xx:xx SunOS Release 5.10 Version Generic_118833-17 64-bit Copyright 1983-2005 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms. whoami: no domain name Hardware watchdog enabled Configuring devices. Using RPC Bootparams for network configuration information. Attempting to configure interface bge3... Skipped interface bge3 Attempting to configure interface bge2... Skipped interface bge2 Attempting to configure interface bge1... Skipped interface bge1 Attempting to configure interface bge0... Configured interface bge0 Beginning system identification... Searching for configuration file(s)... Using sysid configuration file xxx.xxx.xxx.xxx:/export/install/Mirror/Jumpstart/sysidcfg Search complete. Discovering additional network configuration... Completing system identification... Starting remote procedure call (RPC) services: done. System identification complete. Starting Solaris installation program... Searching for JumpStart directory... Using rules.ok from xxx.xxx.xxx.xxx:/export/install/Mirror/Jumpstart Checking rules.ok file... Using begin script: begin.sh Using derived profile: begin.sh Using finish script: finish.sh Executing JumpStart preinstall phase... Executing begin script "begin.sh"... Make it possible to reboot. Begin script begin.sh execution completed. Searching for SolStart directory... Checking rules.ok file... Using begin script: install_begin Using finish script: patch_finish Executing SolStart preinstall phase... Executing begin script "install_begin"... Begin script install_begin execution completed. Processing default locales - Specifying default locale (en_US.ISO8859-1) Processing profile - Selecting cluster (SUNWCreq) - Selecting cluster (SUNWCacc) - Selecting cluster (SUNWClu) - Selecting cluster (SUNWCntp) - Selecting cluster (SUNWCpool) - Selecting cluster (SUNWCvol) - Selecting cluster (SUNWCzone) - Selecting package (SUNWadmc) - Selecting package (SUNWadmfr) - Selecting package (SUNWadmfw) - Selecting package (SUNWbindr) - Selecting package (SUNWbind) - Selecting package (SUNWbtool) - Selecting package (SUNWcdrw) - Selecting package (SUNWctpls) - Selecting package (SUNWdoc) - Selecting package (SUNWgzip) - Selecting package (SUNWhea) - Selecting package (SUNWinst) - Selecting package (SUNWipc) - Selecting package (SUNWless) - Selecting package (SUNWman) - Selecting package (SUNWmkcd) - Selecting package (SUNWscpr) - Selecting package (SUNWscpu) - Selecting package (SUNWsprot) - Selecting package (SUNWtoo) - Selecting package (SUNWxcu4) - Selecting package (SUNWbash) - Selecting package (SUNWtcsh) - Selecting package (SUNWj5rt) - Selecting package (SUNWxwplt) - Selecting package (SUNWi15rf) - Selecting locale (en_US.ISO8859-1) WARNING: SUNWxwplt depends on SUNWxwplr, which is not selected WARNING: SUNWxwplt depends on SUNWxwrtl, which is not selected WARNING: SUNWxwplt depends on SUNWxwice, which is not selected WARNING: SUNWxwplt depends on SUNWxwfnt, which is not selected WARNING: SUNWj5rt depends on SUNWxwice, which is not selected WARNING: SUNWj5rt depends on SUNWxwrtl, which is not selected WARNING: SUNWj5rt depends on SUNWmfrun, which is not selected WARNING: SUNWi15rf depends on SUNWeurf, which is not selected - Selecting all disks - Configuring boot device - Configuring SVM State Database Replica on (c1t0d0s7) - Configuring SVM State Database Replica on (c1t1d0s7) - Configuring SVM Mirror Volume d10 on / (c1t0d0s0) - Configuring SVM Mirror Volume d10 on (c1t1d0s0) - Configuring SVM Mirror Volume d20 on swap (c1t0d0s1) - Configuring SVM Mirror Volume d20 on SWAP_MIRROR (c1t1d0s1) - Configuring SVM Mirror Volume d30 on (c1t0d0s3) - Configuring SVM Mirror Volume d30 on (c1t1d0s3) - Configuring SVM Mirror Volume d40 on (c1t0d0s4) - Configuring SVM Mirror Volume d40 on (c1t1d0s4) Verifying disk configuration - WARNING: Changing the system's default boot device in the EEPROM Verifying space allocation - Total software size: 443.74 Mbytes Preparing system for Solaris install Configuring disk (c1t0d0) - Creating Solaris disk label (VTOC) Configuring disk (c1t1d0) - Creating Solaris disk label (VTOC) Creating and checking UFS file systems - Creating / (c1t0d0s0) - Creating (c1t1d0s0) - Creating (c1t1d0s1) - Creating (c1t1d0s3) - Creating (c1t1d0s4) Creating SVM Meta Devices. Please wait ... - Creating SVM State Replica on disk c1t0d0s7 - metadb: tcpbox: network/rpc/meta:default: failed to enable/disable SVM service - Creating SVM State Replica on disk c1t1d0s7 - metadb: waiting on /etc/lvm/lock - Creating SVM Mirror Volume d10 (/) - Creating SVM Mirror Volume d20 (swap) - Creating SVM Mirror Volume d30 () - Creating SVM Mirror Volume d40 () Beginning Solaris software installation Starting software installation SUNWcsu..........................done. 429.96 Mbytes remaining. ... SUNWsolnm........................done. 1.00 Mbytes remaining. Completed software installation Solaris 10 software installation succeeded Customizing system files - Mount points table (/etc/vfstab) - Network host addresses (/etc/hosts) - Network host addresses (/etc/hosts) - Environment variables (/etc/default/init) Cleaning devices Customizing system devices - Physical devices (/devices) - Logical devices (/dev) Installing boot information - Installing boot blocks (c1t0d0s0) - Updating system firmware for automatic rebooting Installation log location - /a/var/sadm/system/logs/install_log (before reboot) - /var/sadm/system/logs/install_log (after reboot) Installation complete - Making SVM Mirror Volume as boot device (/dev/md/dsk/d10) Executing SolStart postinstall phase... Executing finish script "patch_finish"... Finish script patch_finish execution completed. Executing JumpStart postinstall phase... Executing finish script "finish.sh"... Starting OS Post Install Phase /tmp/install_config/finish.sh: /a/noautoshutdown: not found Add disk1 as secondary boot. Make the mirror disk bootable. OS Post Install Phase Complete Finish script finish.sh execution completed. The begin script log 'begin.log' is located in /var/sadm/system/logs after reboot. The finish script log 'finish.log' is located in /var/sadm/system/logs after reboot. syncing file systems... done rebootin SC Alert: CRITICAL ALARM is set g... SC Alert: Host System has Reset SC Alert: CRITICAL ALARM is set Probing system devices Probing memory Probing I/O buses Netra 240, No Keyboard Copyright 2005 Sun Microsystems, Inc. All rights reserved. OpenBoot 4.18.5, 2048 MB memory installed, Serial #xxxxxxxx. Ethernet address xx:xx:xx:xx:xx:xx, Host ID: xxxxxxxx. Rebooting with command: boot Boot device: disk File and args: SunOS Release 5.10 Version Generic_118833-17 64-bit Copyright 1983-2005 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms. Hardware watchdog enabled Hostname: tcpbox Configuring devices.

No comments:

Post a Comment