Sei sulla pagina 1di 20

Sun Proprietary/Confidential

Mission Critical Solution Centre Sun Microsystems UK

Service CD
User Guide

Owner Document Revision Document Date

Justin Stringfellow 1.2 28th October 2003

Sun Proprietary/Confidential

1.

Document Revision History


Revision 0.1 DRAFT 1.0 1.1 DRAFT1.2 1.2 Date 12th July 2003 16th July 2003 17th July 2003 22nd Oct 2003 28th Oct 2003 Name J. Stringfellow J. Stringfellow J. Stringfellow J. Stringfellow J. Stringfellow Created Draft 1.0 released Update following feedback Updates for release 1.0 of SCD 1.2 release Description

Availability Services Sun Microsystems UK

Mission Critical Solution Centre Service CD User Guide

Page 2 of 20

Sun Proprietary/Confidential

Table of Contents
1.Document Revision History...........................................................................................2 2.Introduction.....................................................................................................................4 3.Basic Use...........................................................................................................................5 4.SCD layout.......................................................................................................................7 5.Applications.....................................................................................................................8 6.Network Boot...................................................................................................................9 7.Setting up a permanent Network Boot Server.........................................................13 8.Advanced Use................................................................................................................14 9.Getting more from SCD...............................................................................................20

Availability Services Sun Microsystems UK

Mission Critical Solution Centre Service CD User Guide

Page 3 of 20

Sun Proprietary/Confidential

2.

Introduction

The Service CD ('SCD') is a bootable Solaris CD which has been custom-built with the most commonly used diagnostic tools, up-to-date hardware patches, and unbundled drivers. The target audience for this document, and the SCD in general, is Sun-badged and partner engineers who are involved in troubleshooting Sun hardware. The SCD allows a machine to be booted and diagnosis or administrative duties to be performed, using the latest tools, and without need to access the OS or data disks in the machine. This document describes the basic use of the SCD, and goes on to describe some of the more subtle uses of the SCD in detail.

Availability Services Sun Microsystems UK

Mission Critical Solution Centre Service CD User Guide

Page 4 of 20

Sun Proprietary/Confidential

3.

Basic Use

SCD can be used on machines with a character-based console (e.g. dumb terminal) or a graphical console. SCD can be used on machines with no local CD-ROM drive -- this includes domain-based machines such as the E10000, Sun Fire x800, and Sun Fire 15000 -- however you should refer to the section titled 'Network Boot' for details on how to use SCD with these machines. Booting For machines with local CD-ROM drives, the boot command is:
ok boot cdrom

The SCD behaves in the same way as the standard Solaris install CDs - if you boot the machine using a serial console, the system will boot and you will be presented with a korn shell prompt. If you boot using a Sun black-on-white graphical console, you will by default boot into X11, and be presented with an xterm with a korn shell running in it. example boot commands:
ok ok ok ok ok ok boot boot boot boot boot boot cdrom cdrom cdrom cdrom cdrom cdrom -s - w -v - w kernel/unix -v kernel/sparcv9/unix

boot, start X11 windowing environment if possible boot as before; the -s flag has no effect on SCD boot with no X11 (note the space between ' -' andw' ') boot with no X11, verbose boot with 32-bit kernel, verbose boot with 64-bit kernel

The boot process is hands-off; you will be prompted for a terminal type (hit return unless you have problems with this default) and then you will be presented with a korn shell, and a welcome message. The shell is automatically setup with a suitable $PATH for all the applications on the SCD. Applications Above the basic Solaris environment, the following extra commands are available while booted from SCD:
# # # # # # # # # # # # stortools stortools4 sunvts linpack decode act storade slices ipsetup nfsshare findaft help

Availability Services Sun Microsystems UK

Mission Critical Solution Centre Service CD User Guide

Page 5 of 20

Sun Proprietary/Confidential

Simply type the name of the required tool, and it will be started. See below for more details on using each tool. Some other useful utilities can be found in /opt/scd/bin/. If you have booted into X11 mode, you will be presented with a X11 session using the TWM window manager. You will by default be presented with a terminal window and a console window which will display any errors being logged. Most applications and some useful tools are available from the TWM background menus: place the mouse pointer over the background image, and press the right hand mouse button for the menu. All applications can still be used in a terminal window if preferred. Shutting Down It's good practice to shutdown the machine once you've finished with the SCD. Any of the usual Solaris shutdown commands are fine:
# shutdown -y -g0 -i0 # init 0 # halt

If a machine is forcibly stopped with stop/a or break, the CD-ROM drive will likely remain locked until the machine is reset, and any filesystems that may have been mounted will not be cleanly unmounted.

Availability Services Sun Microsystems UK

Mission Critical Solution Centre Service CD User Guide

Page 6 of 20

Sun Proprietary/Confidential

4.

SCD layout

The SCD layout is based on, and very similar to the Solaris CD 1 of 2 distributed in the standard media kit. There are 5 slices on the CD: slice 0 1 2 3 4 5 Slice 0 Slice 0 has very little in it. The only files of concern are these:
/cdrom/cdrom0/s0/Solaris_9/Tools: lrwxrwxrwx 1 root other -rwxr-xr-x 1 root other -rwxr-xr-x 1 root other -rwxr-xr-x 1 root bin 11 59586 18599 13045 Jun Jan Jan Apr 14 01:16 Boot -> ../../../s1 16 2003 add_install_client 15 2003 rm_install_client 15 2002 setup_install_server

contents hsfs filesystem containing docs, and netboot admin scripts ufs filesystem containing boot image and applications sun4c boot block (sun4c is not supported) sun4m boot block sun4d boot block sun4u boot block

Boot is a soft link to the root filesystem on the CD. This link depends on slice 1 being mounted at the correct place relative to slice 0. The Solaris volume management daemon vold does this for you.

The shell scripts add_install_client, rm_install_client and setup_install_server are discussed later on in this document. They allow setup and management of a SCD jumpstart server. Slice 1 Slice 1 has a Solaris root filesystem in it. The filesystem while superficially familiar is not identical to a normally installed Solaris machine's root, and some files are not in their normal location. For example, some files that are normally found in /etc can be found under /.tmp_proto. During boot these files are copied to their normal location. Other items may not be available at all (e.g. man pages) there is limited space in the SCD and some files have been removed to make space for others. The most important directory for SCD purposes is /opt this is where the majority of the application binaries and data are installed. /opt/scd/bin contains custom-written wrapper scripts for the applications on the SCD, and some useful binaries.

Availability Services Sun Microsystems UK

Mission Critical Solution Centre Service CD User Guide

Page 7 of 20

Sun Proprietary/Confidential

5.

Applications

Most applications on the CD work in the normal way, however there are some issues to be aware of: SunVTS VTS can be run in X11 mode or in terminal mode. To force terminal mode, use sunvts -t. STORade STORade is started by a wrapper script in /opt/scd/bin, which performs the necessary ras_install to configure the software for the current machine. Since it is necessary to administer STORade via a web browser, a netscape browser is also started if the machine is booted into an X11 session. Otherwise it is necessary to point a web browser at port 7654 on the machine running SCD if this is the case, SCD will provide the correct URL once STORade has been started. The user is prompted for a login and password before the STORade web page will load. These are:
login: passwd: ras agent

The STORade startup script starts inetd, which in turn allows FTP and telnet access to the machine if there is also a properly configured network interface. The root password on the SCD is set to suncore. Do not start STORade on a machine without consulting with the system owner first, otherwise you may risk compromising the security of the machine. STORtools STORtools 4.2 is included on the CD but its' use is discouraged where possible. STORtools 4.2 is based on an old version of SunVTS, and unfortunately the full version of SunVTS on the SCD is incompatible. The result is that SunVTS and STORtools cannot run simultaneously because of conflicts. STORtools 3.3 is also provided, and does not suffer from the same problems. Hence:
# stortools # stortools4

starts STORtools 3.3 starts STORtools 4.2

linpack linpack is provided in both UltraSPARC-II and UltraSPARC-III specific guises. Both versions will run on both types of CPU, however you should attempt to run the correct version in order to ensure the most thorough testing. The version of SunVTS on the SCD now includes linpack code within the CPU tests, and as such is a much more thorough test.

Availability Services Sun Microsystems UK

Mission Critical Solution Centre Service CD User Guide

Page 8 of 20

Sun Proprietary/Confidential

6.

Network Boot

To boot a machine with no local CD-ROM drive is a relatively simple task, and identical to the procedure for setting up a basic network jumpstart server. In short, you require a SPARC1 Solaris machine from which to share out the SCD (the 'boot server'), and which must be on the same subnet as the machine which is to be booted from the SCD (the 'boot client'). Setup Firstly, place the SCD in the CD-ROM drive on the chosen boot server and let vold automatically mount it. Once this has happened you should check that all the slices on the cd have been mounted:
# df -kl Filesystem kbytes used /dev/dsk/c0t0d0s0 1774722 1291471 /proc 0 0 mnttab 0 0 fd 0 0 swap 700224 40 swap 700232 48 /vol/dev/dsk/c0t2d0/scd_1.0/s5 114 4 /vol/dev/dsk/c0t2d0/scd_1.0/s4 114 4 /vol/dev/dsk/c0t2d0/scd_1.0/s3 114 4 /vol/dev/dsk/c0t2d0/scd_1.0/s2 114 4 /vol/dev/dsk/c0t2d0/scd_1.0/s1 576494 500815 /vol/dev/dsk/c0t2d0/scd_1.0/s0 192 192 avail capacity 430010 76% 0 0% 0 0% 0 0% 700184 1% 700184 1% 100 100 100 100 69915 0 4% 4% 4% 4% 88% 100% Mounted on / /proc /etc/mnttab /dev/fd /var/run /tmp /cdrom/scd_1.0/s5 /cdrom/scd_1.0/s4 /cdrom/scd_1.0/s3 /cdrom/scd_1.0/s2 /cdrom/scd_1.0/s1 /cdrom/scd_1.0/s0

If vold doesn't mount the SCD successfully, you can restart it thus:
# /etc/init.d/volmgt stop # ps -ef | grep vold # check vold has exited # /etc/init.d/volmgt start

Next, switch to superuser and change directory into the SCD utilities scripts directory on the boot server:
# cd /cdrom/cdrom0/s0/Solaris_9/Tools

In this directory you will find the add_install_client script. The syntax of this script is
# add_install_client [-e ethernet_address] [-i ip_address] hostname platform

8:0:20:c0:ff:ee:

e.g. To setup a E10K domain with hostname fred, ip address 192.168.0.3 and ethernet address
# add_install_client -e 8:0:20:c0:ff:ee -i 192.168.0.3 fred sun4u

Availability Services Sun Microsystems UK

Mission Critical Solution Centre Service CD User Guide

Page 9 of 20

Sun Proprietary/Confidential

It's not necessary to specify the ethernet or ip address if these are already present in the local files (or naming service) on the boot server. Once this is done, the boot client should be able to boot from the network:
ok boot net

Other useful boot commands:


ok ok boot net -v boot net -v - w

verbose network boot verbose boot from network with no X11

As with booting from cdrom, the -s flag is meaningless and is ignored. Tidying up Once you have finished with the SCD, you must run rm_install_client to clean up the boot configuration from the boot server, and to unshare the SCD. If the SCD is not unshared, it will not be unmountable, and therefore will be locked in the CD-ROM drive. The syntax of this script is
# rm_install_client hostname

e.g.:
# /cdrom/cdrom0/s0/Solaris_9/Tools/rm_install_client fred # eject cdrom

It is advisable to check that the chosen boot server is not already setup to provide a jumpstart for the boot client, so that existing configuration is not overwritten. add_install_client modifes or creates the following files:
/etc/ethers /etc/hosts /etc/bootparams /etc/dfs/dfstab /tftpboot/*

Troubleshooting Network boot can be troublesome when the configuration of the two machines involved is not fully understood. It's important to know the correct ethernet, IP and netmask addresses of the two machines involved, and have an idea of the network topology between the two machines. The verbose flag is the most useful tool in deciding what has happened to a failed network boot. Here is an example of a the console output during a successful boot where the server has hostname 'tweek' and the client 'nibbler':
ok boot net -v Boot device: /pci@1f,0/pci@1,1/network@1,1 24000 Using RARP/BOOTPARAMS... Internet address is: 192.168.0.82 File and args: -v

Availability Services Sun Microsystems UK

Mission Critical Solution Centre Service CD User Guide

Page 10 of 20

Sun Proprietary/Confidential

hostname: nibbler Found 192.168.0.81 @ 8:0:20:a7:14:4e root server: tweek (192.168.0.81) root directory: /tmp/s0/Solaris_9/Tools/Boot Size: 59e41+14622+0x24952 Bytes SunOS Release 5.9 Version Generic_112233-05 64-bit Copyright 1983-2002 Sun Microsystems, Inc. All rights reserved.

...

The boot process in simple terms is this: 1) RARP broadcast to broadcast address - client broadcasts it's ethernet address via RARP - in.rarpd on the boot server should receive the RARP packet and respond to the boot client, telling it what the boot clients' IP address is. - in.rarpd can be placed in debug mode with in.rarpd -da - failure at this stage results in timeout waiting for ARP/RARP 2) TFTP read of boot image - this is always downloaded from machine that responded to RARP first. - failure at this stage can result in: Retrying ... Check TFTP server and network setup (file does not exist in /tftpboot) The file just loaded does not appear to be executable (junk in /tftpboot) Memory Address not Aligned (junk in /tftpboot) - try setting up the client again with rm_install_client followed by another add_install_client if you get problems 3) BPARAM broadcast - boot client broadcasts to find its hostname - rpc.bootparamd on the boot server should receive the BPARAM packet and respond to the boot client with the hostname - boot client broadcasts to find its root filesystem location - rpc.bootparamd on the boot server should receive a BPARAM packet and respond to the boot client with details of the location of the root filesystem. - rpc.bootparamd can be placed in debug mode with rpc.bootparamd -d - failure at this stage results in boot hanging 4) NFS mount of root filesystem - boot client attempts a mount of root filesystem - failure at this stage results in panic - boot: Could not mount filesystem. As with all network problems, snoop is the definitive way to see what is happening. Here is a example of a snoop of a successful network boot:
1 2 3 4 5 6 7 0.00000 0.00204 0.00368 0.03827 0.00720 0.00065 0.00950 BROADCAST tweek nibbler tweek nibbler tweek nibbler -> -> -> -> -> -> -> (broadcast) nibbler tweek nibbler tweek nibbler tweek RARP RARP TFTP TFTP TFTP TFTP TFTP C Who is 8:0:20:a6:b4:af ? R 8:0:20:a6:b4:af is 192.168.0.82, nibbler Read "C0A80052" (octet) Data block 1 (512 bytes) Ack block 1 Data block 2 (512 bytes) Ack block 2

Availability Services Sun Microsystems UK

Mission Critical Solution Centre Service CD User Guide

Page 11 of 20

Sun Proprietary/Confidential

...
516 0.00042 tweek -> nibbler 517 0.00526 nibbler -> tweek 518 1.75078 OLD-BROADCAST -> (broadcast) 519 0.00183 tweek -> nibbler 520 0.03893 nibbler -> BROADCAST 521 0.00856 tweek -> nibbler 522 0.02971 nibbler -> (broadcast) 523 0.00009 tweek -> nibbler 524 0.04331 nibbler -> tweek 525 0.00172 tweek -> nibbler File=/tmp/s0/Solaris_9/Tools/Boot 526 0.09641 nibbler -> tweek proto=UDP 527 0.00166 tweek -> nibbler 528 0.01365 nibbler -> tweek 529 0.00386 tweek -> nibbler 530 0.01178 nibbler -> tweek 531 0.00403 tweek -> nibbler TFTP Data block 257 (352 bytes) (last block) TFTP Ack block 257 RARP C Who is 8:0:20:a6:b4:af ? RARP R 8:0:20:a6:b4:af is 192.168.0.82, nibbler BPARAM C WHOAMI? 192.168.0.82 BPARAM R WHOAMI? nibbler in ARP C Who is 192.168.0.81, tweek ? ARP R 192.168.0.81, tweek is 8:0:20:a7:14:4e BPARAM C GETFILE root BPARAM R GETFILE PORTMAP C GETPORT prog=100005 (MOUNT) vers=1 PORTMAP R GETPORT port=32784 MOUNT1 C Mount /tmp/s0/Solaris_9/Tools/Boot MOUNT1 R Mount OK FH=024C NFS C LOOKUP2 FH=024C platform NFS R LOOKUP2 OK FH=73CE

If you find that it is necessary to use snoop to diagnose your network boot, consider carefully which host you run snoop on. If the chosen boot server is connected to a switched network, you may not receive all of the traffic that the boot client is receiving - such as other jumpstart servers replies to the boot client's requests. Using a hub or even a direct connection with a ethernet crossover cable can simplify troubleshooting considerably.

Solaris x86 machines do not use the same disk format and therefore cannot read the SCD.

Availability Services Sun Microsystems UK

Mission Critical Solution Centre Service CD User Guide

Page 12 of 20

Sun Proprietary/Confidential

7.

Setting up a permanent Network Boot Server

It is possible to setup a permanent boot server using the SCD. In broad terms, this is achieved by copying the SCD image to disk, and configuring the chosen boot server to provide network boot services for the desired boot client machines. Typically this could be done on a SSP, SMS, or other administration workstation, to provide a quickly bootable diagnostic environment. There are really very few requirements of a machine to perform this function the main points to consider are:

enough disk space - you will need about 600MB of free space

network location - the machine must have an interface on the same subnet as the machines you wish to provide the boot service for; otherwise it just won't work.

root access - you need root access to perform this task

To install the SCD image to your chosen boot server, first insert the SCD in the cdrom drive of the boot server, and allow vold to auto mount the various slices on the disk. Once this has happened, you simply need to run the utility script ' setup_install_server' to copy the image across. For example, to install the image to /export/SCD type the following:
# /cdrom/cdrom0/s0/Solaris_9/Tools/setup_install_server -b /export/SCD

You can now eject the SCD.


# eject cdrom

Next, you need to configure a client. This is a very similar procedure to that of setting up a network boot direct from the SCD, however it is necessary to specify a dummy install server with the -s flag. Once again, assuming the image is installed in /export/SCD, and that the client has hostname ' fred' , has ip address 192.168.0.3 and ethernet address 08:00:20:c0:ff:ee:
# cd /export/SCD/Solaris_9/Tools # ./add_install_client -e 08:00:20:c0:ff:ee -i 192.168.0.3 -s dummy:/null fred sun4u

The client is now completely set up and you can boot net at will. You can run add_install_client for many boot clients on the same jumpstart server and boot them simultaneously if necessary.

Availability Services Sun Microsystems UK

Mission Critical Solution Centre Service CD User Guide

Page 13 of 20

Sun Proprietary/Confidential

8.

Advanced Use

Beyond the basic usage, there are a few ways to maximise the effectiveness of the SCD. The topics covered here include:

quick identification of OS & data disk slices setting up an NFS share adding a real swap device recovering a crash & analyzing it configuring network interfaces customising a net boot image using Dynamic Reconfiguration

Identifying disk slices SCD provides a tool to display a summary of disk slices. The output of this is based upon the VTOC tags for each disk. Slices displayed are root, swap, usr, and also Veritas Volume Manager private and public regions. The command syntax is simply:
# slices

Example output:
# slices interesting slices on c0t0d0: slice 0 is tagged as root slice 6 is tagged as usr /dev/rdsk/c0t2d0s2 unreadable: maybe a cdrom drive? interesting slices on c0t1d0: slice 0 is tagged as swap

The output reports on only the slices that fall into the aforementioned categories. Note that there is no guarantee that a VTOC tag is correct - you should use fstyp to double check the contents of the slice before attempting to mount or modify the slice. Adding a real swap device It is desirable to add a real swap slice to a system booted from SCD to facilitate collection of a crash dump, and also to avoid smaller machines running out of virtual memory. If you are considering putting a large file into /tmp it would be advisable to add a physical swap device to ensure you don't run into trouble. From the output of slices, it is simple to identify a swap device. Confirm that the slice in question has no filesystem on it:
# fstyp /dev/rdsk/c0t0d0s1 Unknown_fstyp (no matches)

Availability Services Sun Microsystems UK

Mission Critical Solution Centre Service CD User Guide

Page 14 of 20

Sun Proprietary/Confidential

The version of fstyp on the SCD currently prints information about hsfs, ufs and pcfs filesystems only. Check for unbundled filesystems (e.g. SAMFS/QFS, vxfs) in use that fstyp doesn'tknow about the System Administrator should know what slices are available for swap. If in any doubt, don't swap on a device - Solaris can destroy all data on that device. Recovering a crash dump & analyzing it Normally when Solaris panics, a dump is written to the primary swap device. During the following reboot, savecore is executed during run level 2, and the crash files are recovered to In the event that the machine panics while booted from SCD, and the above procedure for adding a real swap device has been followed, a crash dump will be written to the swap device. At this point there are two options for recovering the dump with savecore: 1) boot from hard disk and allow savecore to automatically run 2) boot from SCD, add a swap device, mount the root filesystem, and manually run savecore to save files to the mounted root filesystem Option 1) seems easier but is quite likely to fail. It's safest to run savecore under the same OS and kernel (i.e. 32-bit or 64-bit) as that which produced the dump. The basic procedure for enabling crash dumping, and recoving a dump is this: 1) 2) 3) 4) 5) 6) boot from SCD swap -a real swap slice panic machine boot from SCD mount root fs savecore to mounted root fs
/var/crash/<hostname>

The recommended syntax for savecore is:


# savecore -v -f /dev/dsk/<swapdev> /mnt/var/crash/<hostname>

An example recovery of a crash dump:

# slices interesting slices on c0t0d0: slice 0 is tagged as root slice 1 is tagged as swap # mount /dev/dsk/c0t0d0s0 /mnt # savecore -v -f /dev/dsk/c0t0d0s1 /mnt/var/crash/stringfellow System dump time: Tue Jul 15 13:00:32 2003 Jul 15 13:07:03 localhost savecore: saving system crash /mnt/var/crash/stringfellow/*.0 Constructing namelist /mnt/var/crash/stringfellow/unix.0 Constructing corefile /mnt/var/crash/stringfellow/vmcore.0 100% done: 5204 of 5204 pages saved # cd /mnt/var/crash/stringfellow # act unix.0 vmcore.0 > /tmp/act.0 # cd / # umount /mnt

dump

in

Availability Services Sun Microsystems UK

Mission Critical Solution Centre Service CD User Guide

Page 15 of 20

Sun Proprietary/Confidential

The file act.0 will contain a good summary of the crash. Alternatively you may need to submit the crash files saved in /var/crash/<hostname> for analysis. Configuring network interfaces SCD provides a basic tool for configuring up interfaces called ipsetup.
ipsetup prompts the user for IP address, netmask, optionally a default router and the name of the

interface. You may accept the default answers to each prompt by just typing <return>. Some validation is performed of any responses entered, however ipsetup is not foolproof. If you are unsure of anything that ipsetup asks you, you should consider mounting the machine'sreal root filesystem and having a look at the contents of /etc/hostname.<interface>, /etc/hosts, /etc/defaultrouter and /etc/netmasks for clues. Here's an example of an ipsetup session:
# ipsetup Type in the IP address [10.0.0.2]: 192.168.0.81 Type in the netmask [255.255.255.0]: do you want to configure a default router? [default=no] [y,n,?] y Type in the router address [192.168.0.1]: plumbed interfaces available: hme0 enter interface to configure [hme0]: configuring hme0 with inet = 192.168.0.81, netmask = 255.255.255.0 add net default: gateway 192.168.0.1 running inetd allows telnet and FTP access to the machine. would you like to start inetd? [default=no] [y,n,?] y #

If inetd is started, it becomes possible to telnet directly to the machine, and several other services will become available - e.g. FTP. The root password is set to 'suncore' when booted from the SCD, so you should not start inetd unless you are confident that the machine will not be abused, and have the system owner's permission to do so. Setting up an NFS share SCD provides a simple tool for exporting a directory across the network - ' nfsshare'. To export a directory, simply type:
# nfsshare /full_path_to_dir

e.g.
# nfsshare /export/home

You must specify a full pathname from the root directory. i.e. ' nfsshare ./home'will not work. You can confirm that the filesystem is shared with the command ' dfshares'.

Availability Services Sun Microsystems UK

Mission Critical Solution Centre Service CD User Guide

Page 16 of 20

Sun Proprietary/Confidential

It's important to remember that it's not possible to nfsshare a directory that is itself mounted from an NFS server (e.g. the root filesystem, while booted from the network). Bear in mind also that some filesystems are mounted readonly while booted from CD. This tool is most useful for sharing /tmp or real filesystems that have been manually mounted after booting from the CD. Finally, don'tforget to setup a network interface - ipsetup will do this for you. Customising a net boot image Once SCD has been permanently installed on a boot server (see section above on creating a permanent boot server), it is possible to customise the SCD environment by applying patches or adding packages to the image. e.g. To add Solaris 9 Kernel Update 6, which has been unpacked in /var/tmp, to a SCD image installed in /export/SCD:
# patchadd -R /export/SCD/Solaris_9/Tools/Boot -M /var/tmp 112233-06

..or to interactively install a group of packages in the current directory:


# pkgadd -R /export/SCD/Solaris_9/Tools/Boot -d .

Unfortunately some unbundled packages are poorly constructed and can corrupt a OS image's /var directory when applied with pkgadd -R, so you may want to consider taking a backup of the image before proceeding. If you wish to add a binary to the image, simply copy it to the SCD bin directory. e.g. To install a binary called ' foo' to an image in /export/SCD:
# cp -p foo /export/SCD/Solaris_9/Tools/Boot/opt/scd/bin

Configuration changes to the SCD image (e.g. updates to /etc/system) can be simply done by editing the required file in place on the boot filesystem image. Using Dynamic Reconfiguration By default, SCD boots with a caged kernel, which enables DR to be used. In order for DR to work completely, you may need to disable memory interleaving at the OBP ok prompt. e.g. To turn off memory interleaving on an Enterprise server, type the following at the ok prompt, before booting:
# setenv memory-interleave min # reset-all

The SCD provides a read-only /etc, which can present a problem when usingg DR functionality since some of the commands used for reconfiguring hardware may attempt to update files under /etc. In most cases there is a workaround possible you should consult the manpage for the relevant command. e.g. In the case of adding a new CPU/Memory board to a Enterprise server, it is necessary to run ' drvconfig -i ac', which fails because it cannot write to /etc/path_to_inst. The workaround for this is to instead use ' drvconfig -b -i ac',which only updates the kernel'scopy of path_to_inst held in memory.

Availability Services Sun Microsystems UK

Mission Critical Solution Centre Service CD User Guide

Page 17 of 20

Sun Proprietary/Confidential

Below is an example of a DR session, where CPU/Memory board 7 is removed from a running Enterprise 3500, and re-added. Note that there is still a warning displayed by drvconfig, however the DR operation is entirely successful.
# cfgadm -c unconfigure ac3:bank0 ac3:bank1 sysctrl0:slot7 Oct 29 20:14:15 localhost ac: NOTICE: unconfiguring memory bank 0 in slot 7 Oct 29 20:14:15 localhost ac: NOTICE: memory bank 0 in slot 7 is unconfigured Oct 29 20:14:15 localhost ac: NOTICE: unconfiguring memory bank 1 in slot 7 Oct 29 20:14:15 localhost ac: NOTICE: memory bank 1 in slot 7 is unconfigured Oct 29 20:14:16 localhost sysctrl: NOTICE: unconfiguring cpu board in slot 7 Oct 29 20:14:16 localhost fhc: NOTICE: Processor 14 powered off. Oct 29 20:14:17 localhost fhc: NOTICE: Processor 15 powered off. Oct 29 20:14:17 localhost sysctrl: NOTICE: cpu board in slot 7 is unconfigured # cfgadm -c disconnect sysctrl0:slot7 Oct 29 20:14:24 localhost sysctrl: NOTICE: disconnecting cpu board in slot 7 # Oct 29 20:14:25 localhost sysctrl: NOTICE: cpu board in slot 7 is disconnected Oct 29 20:14:25 localhost sysctrl: NOTICE: board 7 is ready to remove # prtconf | grep Mem Memory size: 256 Megabytes # mpstat CPU minf mjf xcal intr ithr 18 2 1 215 405 302 19 2 1 11 131 129 #

csw icsw migr smtx 18 0 0 0 22 0 0 0

srw syscl 0 34 0 14

usr sys 0 2 0 1

wt idl 7 91 5 94

At this point the board is physically removed, and then reinserted.


# Oct 29 19:49:39 localhost sysctrl: NOTICE: cpu board has been inserted into slot 7 Oct 29 19:49:39 localhost fhc: NOTICE: board 7 can be removed # cfgadm -al Ap_Id Type Receptacle Occupant Condition ac0:bank0 memory connected configured ok ac0:bank1 memory empty unconfigured unknown c3 scsi-bus connected configured unknown c3::dsk/c3t6d0 CD-ROM connected configured unknown c5 scsi-bus connected unconfigured unknown c6 scsi-bus connected unconfigured unknown c7 scsi-bus connected unconfigured unknown sysctrl0:slot1 dual-sbus connected configured ok sysctrl0:slot3 dual-sbus connected configured ok sysctrl0:slot5 unknown empty unconfigured unknown sysctrl0:slot7 cpu/mem disconnected unconfigured unknown sysctrl0:slot9 cpu/mem connected configured ok # cfgadm -v -c configure sysctrl0:slot7 system will be temporarily suspended to connect a board: proceed (yes/no)? yes Oct 29 19:53:05 localhost sysctrl: NOTICE: connecting cpu board in slot 7 Oct 29 19:53:08 localhost scsi: /sbus@2,0/SUNW,socal@1,0/sf@0,0 (sf0): Oct 29 19:53:08 localhost Forcing lip Oct 29 19:53:08 localhost scsi: /sbus@2,0/SUNW,socal@1,0/sf@1,0 (sf1): Oct 29 19:53:08 localhost Forcing lip Oct 29 19:53:08 localhost scsi: /sbus@2,0/SUNW,socal@2,0/sf@0,0 (sf2): Oct 29 19:53:08 localhost Forcing lip Oct 29 19:53:08 localhost scsi: /sbus@2,0/SUNW,socal@2,0/sf@1,0 (sf3): Oct 29 19:53:08 localhost Forcing lip Oct 29 19:54:49 localhost fhc: NOTICE: found lost system interrupt, resetting.. Oct 29 19:55:05 localhost sysctrl: NOTICE: cpu board in slot 7 is connected Oct 29 19:55:05 localhost sysctrl: NOTICE: configuring cpu board in slot 7 Oct 29 19:55:05 localhost sysctrl: NOTICE: cpu board in slot 7 is configured # drvconfig -b -i ac

Availability Services Sun Microsystems UK

Mission Critical Solution Centre Service CD User Guide

Page 18 of 20

Sun Proprietary/Confidential

drvconfig: modctl failed to add major number binding. # psrinfo 14 powered-off since 10/29/2003 19:55:05 15 powered-off since 10/29/2003 19:55:05 18 on-line since 10/29/2003 19:38:55 19 on-line since 10/29/2003 19:39:05 # psradm -n 14 15 # cfgadm -l Ap_Id Type Receptacle Occupant Condition ac0:bank0 memory connected configured ok ac0:bank1 memory empty unconfigured unknown ac3:bank0 memory connected unconfigured unknown ac3:bank1 memory connected unconfigured unknown c3 scsi-bus connected configured unknown c5 scsi-bus connected unconfigured unknown c6 scsi-bus connected unconfigured unknown c7 scsi-bus connected unconfigured unknown sysctrl0:slot1 dual-sbus connected configured ok sysctrl0:slot3 dual-sbus connected configured ok sysctrl0:slot5 unknown empty unconfigured unknown sysctrl0:slot7 cpu/mem connected configured ok sysctrl0:slot9 cpu/mem connected configured ok # cfgadm -o quick -t ac3:bank0 # cfgadm -o quick -t ac3:bank1 # cfgadm -c configure ac3:bank0 Oct 29 20:01:01 localhost ac: NOTICE: configuring memory bank 0 in slot 7 Oct 29 20:01:03 localhost ac: NOTICE: memory bank 0 in slot 7 is configured # cfgadm -c configure ac3:bank1 Oct 29 20:01:11 localhost ac: NOTICE: configuring memory bank 1 in slot 7 Oct 29 20:01:12 localhost ac: NOTICE: memory bank 1 in slot 7 is configured # prtconf | grep Mem Memory size: 768 Megabytes # mpstat CPU minf mjf xcal intr ithr csw icsw migr smtx srw syscl usr sys wt idl 14 1 0 8 114 102 3 0 0 0 0 224 0 2 1 97 15 2 0 5 104 101 10 2 0 0 0 1845 4 15 1 81 18 4 2 163 407 303 28 0 0 0 0 55 0 3 10 87 19 3 1 17 148 146 27 0 0 0 0 22 0 1 7 91 #

The DR configuration is held entirely in /etc/system on the SCD. There is an alternate system file called /etc/system.nodr which does not enable DR on the machine. To boot with DR explicitly disabled, use the -a flag thus:
# boot cdrom -a # boot net -v -a

and when prompted, enter /etc/system.nodr for the name of the system file. Accept the defaults for all other prompts by typing enter.

Availability Services Sun Microsystems UK

Mission Critical Solution Centre Service CD User Guide

Page 19 of 20

Sun Proprietary/Confidential

9.

Getting more from SCD

The latest version of SCD and related documentation is available for download at
http://openproject.eng.sun.com/projects/scd

If you discover a bug, or have an idea for an enhancement of the SCD, please log a bug or RFE at: http://openproject.eng.sun.com/projects/scd (click on bugs => submit new) Feedback, comments or requests? Please mail the SCD team at scd@sun.com

Availability Services Sun Microsystems UK

Mission Critical Solution Centre Service CD User Guide

Page 20 of 20

Potrebbero piacerti anche