Sunteți pe pagina 1din 55

compiled by Jim Clark

% prtconf -vp | grep bootpath

How To Force a Resync of an SVM Mirror


Share 0

Sometimes Solaris Volume Manager (SVM) reports that a submirror on a disk needs
maintenance.
# metastat d0
d0: Mirror
Submirror 0: d10
State: Okay
Submirror 1: d20
State: Needs maintenance
Pass: 1
Read option: roundrobin (default)
Write option: parallel (default)
Size: 20972736 blocks (10 GB)

d10: Submirror of d0
State: Okay
Size: 20972736 blocks (10 GB)
Stripe 0:
Device Start Block Dbase State Reloc Hot Spare
c0t0d0s0 0 No Okay Yes
d20: Submirror of d0
State: Needs maintenance
Invoke: metareplace d0 c0t1d0s0 <new device>
Size: 20972736 blocks (10 GB)
Stripe 0:
Device Start Block Dbase State Reloc Hot Spare
c0t1d0s0 0 No Maintenance Yes
In some cases, this does not require replacement of the whole disk forcing a resync of the

mirror may fix the problem. But when is a replacement recommended and when is it safe to
simply do a resync?
If the disk is in a production server then just replace it. Playing around with a production system
just isnt worth it.
If the disk has other metadevices in it and only one is coming up as needing maintenance,
# metastat
c0t1d0s5 0
c0t1d0s4 0
c0t1d0s3 0
c0t1d0s1 0
c0t1d0s0 0
c0t1d0s6 0
c0t1d0 Yes

| grep c0t1d0
No Okay Yes
No Okay Yes
No Okay Yes
No Okay Yes
No Maintenance Yes
No Okay Yes
id1,sd@n500000e014639cb0

and if iostat does not report any errors on the disk,


# iostat -En c0t1d0
c0t1d0 Soft Errors: 0 Hard Errors: 0 Transport Errors: 0
Vendor: FUJITSU Product: MAY2073RCSUN72G Revision: 0501 Serial No: 0706S08F0W
Size: 73.40GB <73400057856 bytes>
Media Error: 0 Device Not Ready: 0 No Device: 0 Recoverable: 0
Illegal Request: 0 Predictive Failure Analysis: 0

then chances are its safe to do a resync. This command will force a resync on an SVM mirror:
metareplace -e mirror component

For example, if a mirror d0 consists of two submirrors d10 (c0t0d0s0) and d20 (c0t1d0s0), and
d20 is reported as needing maintenance, then this command will force a resync on submirror
d20.
# metareplace -e d0 c0t1d0s0

Keep an eye on d0 until d20 finishes resyncing.


# metastat d0
d0: Mirror
Submirror 0: d10
State: Okay
Submirror 1: d20
State: Resyncing
Resync in progress: 86 % done
Pass: 1

Read option: roundrobin (default)


Write option: parallel (default)
Size: 20972736 blocks (10 GB)

d10: Submirror of d0
State: Okay
Size: 20972736 blocks (10 GB)
Stripe 0:
Device Start Block Dbase State Reloc Hot Spare
c0t0d0s0 0 No Okay Yes
d20: Submirror of d0
State: Resyncing
Size: 20972736 blocks (10 GB)
Stripe 0:
Device Start Block Dbase State Reloc Hot Spare
c0t1d0s0 0 No Resyncing Yes
Device Relocation Information:
Device Reloc Device ID
c0t0d0 Yes id1,sd@n500000e014639ee0
c0t1d0 Yes id1,sd@n500000e014639cb0
Once d20 comes up as Okay then the problem is fixed.
# metastat d0
d0: Mirror
Submirror 0: d10
State: Okay
Submirror 1: d20
State: Okay
Pass: 1
Read option: roundrobin (default)
Write option: parallel (default)
Size: 20972736 blocks (10 GB)

d10: Submirror of d0
State: Okay
Size: 20972736 blocks (10 GB)
Stripe 0:
Device Start Block Dbase State Reloc Hot Spare
c0t0d0s0 0 No Okay Yes

d20: Submirror of d0
State: Okay
Size: 20972736 blocks (10 GB)
Stripe 0:
Device Start Block Dbase State Reloc Hot Spare
c0t1d0s0 0 No Okay Yes
Device Relocation Information:
Device Reloc Device ID
c0t0d0 Yes id1,sd@n500000e014639ee0
c0t1d0 Yes id1,sd@n500000e014639cb0
If the resync does not work then you will need to log a call to have the disk replaced.

How To Force SVM To Boot Even If A Majority Of State


Database Replicas Are Not Available
Share 0

Solaris Volume Managers default behaviour is to prevent a server from booting up unless a
majority of all state database replicas are available and synchronized. The directive below
overides this requirement for a quorum and forces SVM to start if any valid state database
replicas are available.
echo set md:mirrored_root_flag=1 >> /etc/system

Note that SVM will use the replicas even if they are not up-to-date. Also note that this directive
must be in place before the actual reboot for it to have the desired effect.

Solaris 10: Zone creation for dummies


About Zones
In its simple form, a zone is a virtual operating system environment created within a single
instance of the Solaris operating system. Efficient resource utilization is the main goal of this
technology.
Solaris 10's zone partitioning technology can be used to create local zones that behave like
virtual servers. All local zones are controlled from the system's global zone. Processes running in
a zone are completely isolated from the rest of the system. This isolation prevents processes that
are running in one zone from monitoring or affecting processes that are running in other zones.
Note that processes running in a local zone can be monitored from global zone; but the processes
running in a global zone or even in another local zone cannot be monitored from a local zone.

As of now, the upper limit for the number of zones that can be created/run on a system is 8192;
of course, depending on the resource availability, a single system may or may not run all the
configured zones effectively.
Global Zone
When we install Solaris 10, a global zone gets installed automatically; and the core operating
system runs under global zone. To list all the configured zones, we can use zoneadm command:
% zoneadm list -v
ID NAME
0 global

STATUS
running

PATH
/

Global zone is the only one:

bootable from the system hardware

to be used for system-wide administrative control, such as physical devices, routing, or


dynamic reconfiguration (DR). ie., global zone is the only zone that is aware of all
devices and all file systems

from which a non-global zone can be configured, installed, managed, or uninstalled. ie.,
global zone is the only zone that is aware of the existence of non-global (local) zones and
their configurations. It is not possible to create local zones, within a local zone

Steps to create a Local Zone


Prerequisites:

Plenty of disk space to hold the newly installed zone. It needs at least 2G space to copy
the essential files to the local zone, and of course the disk space needed by the
application(s) you are planning to run, in this zone; and

A dedicated IP, for network connectivity

Basic Zone creation steps, with examples:


1. Check the disk space & network configuration
% df -h /
Filesystem
/dev/dsk/c1t1d0s0

size
29G

used
22G

avail capacity
7.1G
76%

% ifconfig -a
lo0: flags=2001000849 mtu 8232 index 1

Mounted on
/

inet 127.0.0.1 netmask ff000000


eri0: flags=1000843 mtu 1500 index 2
inet 192.168.74.217 netmask fffffe00 broadcast 192.168.75.255

2. Since there is more than 5G free space, I've decided to install a local zone under /zones.
% mkdir /zones

3. Next step is to define/create the zone root. This is the path to zone's root directory that is
relative to the global zone's root directory. Zone root must be owned by root user with the
mode 700. This will be used in setting the zonepath property, during the zone creation
process
% cd /zones
% mkdir appserver
% chmod 700 appserver
% ls -l
total 2
drwx------

2 root

root

512 Feb 17 12:46 appserver

4. Create & configure a new 'sparse root' local zone, with root privileges
% zonecfg -z appserv
appserv: No such zone configured
Use 'create' to begin configuring a new zone.
zonecfg:appserv> create
zonecfg:appserv> set zonepath=/zones/appserver
zonecfg:appserv> set autoboot=true
zonecfg:appserv> add net
zonecfg:appserv:net> set physical=eri0
zonecfg:appserv:net> set address=192.168.175.126
zonecfg:appserv:net> end
zonecfg:appserv> add fs
zonecfg:appserv:fs> set dir=/repo2
zonecfg:appserv:fs> set special=/dev/dsk/c2t40d1s6
zonecfg:appserv:fs> set raw=/dev/rdsk/c2t40d1s6
zonecfg:appserv:fs> set type=ufs
zonecfg:appserv:fs> set options noforcedirectio
zonecfg:appserv:fs> end
zonecfg:appserv> add inherit-pkg-dir
zonecfg:appserv:inherit-pkg-dir> set dir=/opt/csw
zonecfg:appserv:inherit-pkg-dir> end
zonecfg:appserv> info
zonepath: /zones/appserver
autoboot: true

pool:
inherit-pkg-dir:
dir: /lib
inherit-pkg-dir:
dir: /platform
inherit-pkg-dir:
dir: /sbin
inherit-pkg-dir:
dir: /usr
inherit-pkg-dir:
dir: /opt/csw
net:
address: 192.168.175.126
physical: eri0
zonecfg:appserv> verify
zonecfg:appserv> commit
zonecfg:appserv> exit

Sparse Root Zone Vs Whole Root Zone(Updated 05/07/2008)


In a Sparse Root Zone, the directories /usr, /sbin, /lib and /platform will be
mounted as loopback file systems. That is, although all those directories appear as normal
directories under the sparse root zone, they will be mounted as read-only file systems.
Any change to those directories in the global zone can be seen from the sparse root zone.
However if you need the ability to write into any of those directories listed above, you
may need to configure a Whole Root Zone. For example, softwares like ClearCase need
write permissions to /usr directory. In that case configuring a Whole Root Zone is the
way to go. The steps for creating and configuring a new 'Whole Root' local zone are as
follows:
% zonecfg -z appserv
appserv: No such zone configured
Use 'create' to begin configuring a new zone.
zonecfg:appserv> create
zonecfg:appserv> set zonepath=/zones/appserver
zonecfg:appserv> set autoboot=true
zonecfg:appserv> add net
zonecfg:appserv:net> set physical=eri0
zonecfg:appserv:net> set address=192.168.175.126
zonecfg:appserv:net> end
zonecfg:appserv> add inherit-pkg-dir
zonecfg:appserv:inherit-pkg-dir> set dir=/opt/csw
zonecfg:appserv:inherit-pkg-dir> end
zonecfg:appserv> remove inherit-pkg-dir dir=/usr
zonecfg:appserv> remove inherit-pkg-dir dir=/sbin
zonecfg:appserv> remove inherit-pkg-dir dir=/lib
zonecfg:appserv> remove inherit-pkg-dir dir=/platform
zonecfg:appserv> info
zonepath: /zones/appserver
autoboot: true
pool:

inherit-pkg-dir:
dir: /opt/csw
net:
address: 192.168.175.126
physical: eri0
zonecfg:appserv> verify
zonecfg:appserv> commit
zonecfg:appserv> exit

Brief explanation of the properties that I added:


zonepath=/zones/appserver

Local zone's root directory, relative to global zone's root directory. ie., local zone will
have all the bin, lib, usr, dev, net, etc, var, opt etc., directories physically
under /zones/appserver directory
autoboot=true

boot this zone automatically when the global zone is booted


physical=eri0
eri0 card is used for the physical interface
address=192.168.175.126

192.168.175.126 is the IP address. It must have all necessary DNS entries


[Added 08/25/08] The whole add fs section adds the file system to the zone. In this
example, the file system that is being exported to the zone is an existing UFS file system.
set dir=/repo2
/repo2 is the mount

point in the local zone

set special=/dev/dsk/c2t40d1s6
set raw=/dev/rdsk/c2t40d1s6
Grant access to the block (/dev/dsk/c2t40d1s6)

and raw (/dev/rdsk/c2t40d1s6)


devices so the file system can be mounted in the non-global zone. Make sure the block
device is not mounted anywhere right before installing the non-global zone. Otherwise,
the zone installation may fail with ERROR: file system check

</usr/lib/fs/ufs/fsck> of </dev/rdsk/c2t40d1s6> failed: exit status


<33>: run fsck manually. In that case, unmount the file system that is being exported,
uninstall the partially installed zone (zoneadm -z <zone> uninstall) then install the

zone from the scratch (no need to re-configure the zone, just do a re-install).
set type=ufs

The file system is of type UFS


set options noforcedirectio

Mount the file system with the option noforcedirectio[/Added 08/25/08]


dir=/opt/csw

read-only path, will be lofs'd (loop back mounted) from global zone. Note: it works for

sparse root zone only -- whole root zone cannot have any shared file systems
commands verify and commit, verifies and commits the zone configuration for
the zone, respectively. Note that it is not necessary to commit the zone configuration; it
will be done automatically when we exit from zonecfg tool. info displays information
about the current configuration
zonecfg

5. Check the state of the newly created/configured zone


% zoneadm list -cv
ID NAME
0 global
- appserv

STATUS
running
configured

PATH
/
/zones/appserver

6. Next step is to install the configured zone. It takes a while to install the necessary
packages
% zoneadm -z appserv install
/zones must not be group writable.
could not verify zonepath /zones/appserver because of the above errors.
zoneadm: zone appserv failed to verify
% ls -ld /zones
drwxrwxr-x
3 root

root

512 Feb 17 12:46 /zones

Since /zones must not be group writable, let's change the mode to 700.
% chmod 700 /zones
% ls -ld /zones
drwx-----3 root

root

512 Feb 17 12:46 /zones

% zoneadm -z appserv install


Preparing to install zone .
Creating list of files to copy from the global zone.
Copying <2658> files to the zone.
Initializing zone product registry.
Determining zone package initialization order.
Preparing to initialize <1128> packages on the zone.
Initialized <1128> packages on zone.
Zone is initialized.
Installation of these packages generated errors:
Installation of <2> packages was skipped.
Installation of these packages generated warnings: <CSWbdb3 CSWtcpwrap
CSWreadline CSWlibnet CSWlibpcap CSWjpeg CSWzlib CSWcommon CSWpkgget
SMCethr CSWxpm
SMClsof SMClibgcc SMCossld OpenSSH SMCtar SUNWj3dmx CSWexpat CSWftype2
CSWfconfig
CSWiconv CSWggettext CSWlibatk CSWpango CSWpng CSWtiff CSWgtk2
CSWpcre CSWlibmm
CSWgsed CSWlibtool CSWncurses CSWunixodbc CSWoldap CSWt1lib

CSWlibxml2 CSWbzip2
CSWlibidn CSWphp>
The file contains a log of the zone installation.

7. Verify the state of the appserv zone, one more time


% zoneadm list -cv
ID NAME
0 global
- appserv

STATUS
running
installed

PATH
/
/zones/appserver

8. Boot up the appserv zone. Let's note down the ifconfig output to see how it changes after
the local zone boots up. Also observe that there is no answer from the server yet, since it
is not up
% ping 192.168.175.126
no answer from 192.168.175.126
% ifconfig -a
lo0: flags=2001000849 mtu 8232 index 1
inet 127.0.0.1 netmask ff000000
eri0: flags=1000843 mtu 1500 index 2
inet 192.168.74.217 netmask fffffe00 broadcast 192.168.75.255
ether 0:3:ba:2d:0:84
% zoneadm -z appserv boot
zoneadm: zone 'appserv': WARNING: eri0:1: no matching subnet found in
netmasks(4) for 192.168.175.126;
using default of 255.255.0.0.
% zoneadm list -cv
ID NAME
0 global
1 appserv

STATUS
running
running

PATH
/
/zones/appserver

% ping 192.168.175.126
192.168.175.126 is alive
% ifconfig -a
lo0: flags=2001000849 mtu 8232 index 1
inet 127.0.0.1 netmask ff000000
lo0:1: flags=2001000849 mtu 8232 index 1
zone appserv
inet 127.0.0.1 netmask ff000000
eri0: flags=1000843 mtu 1500 index 2
inet 192.168.74.217 netmask fffffe00 broadcast 192.168.75.255
ether 0:3:ba:2d:0:84
eri0:1: flags=1000843 mtu 1500 index 2
zone appserv
inet 192.168.175.126 netmask ffff0000 broadcast 192.168.255.255

Observe that the zone appserv has it's own virtual instance of lo0, the system's loopback
interface and the zone's IP address is also being served by the eri0 network interface
9. Login to the Zone {console} and performing the internal zone configuration. zlogin
utility can be used to enter a zone. The first time we log in to the console, we get a chance
to answer a series of questions for the desired zone configuraton. -C option of zlogin can
be used to log in to the Zone console.
% zlogin -C -e [ appserv
[Connected to zone 'appserv' console]
Select a Language
0. English
1. es
2. fr
Please make a choice (0 - 2), or press h or ? for help: 0
Select a Locale
0.
1.
2.
3.
4.
5.
6.

English (C - 7-bit ASCII)


Canada (English) (UTF-8)
Canada-English (ISO8859-1)
U.S.A. (UTF-8)
U.S.A. (en_US.ISO8859-1)
U.S.A. (en_US.ISO8859-15)
Go Back to Previous Screen

Please make a choice (0 - 6), or press h or ? for help: 0


...
Enter the host name which identifies this system on the network. The
name
must be unique within your domain; creating a duplicate host name
will cause
problems on the network after you install Solaris.
A host name must have at least one character; it can contain letters,
digits, and minus signs (-).
Host name for eri0:1 appserv v440appserv
...
...
System identification is completed.
...
rebooting system due to change(s) in /etc/default/init
[NOTICE: Zone rebooting]
SunOS Release 5.11 Version snv_23 64-bit

Copyright 1983-2005 Sun Microsystems, Inc.


Use is subject to license terms.
Hostname: v440appserv

All rights reserved.

v440appserv console login: root


Password:
Feb 17 15:15:30 v440appserv login: ROOT LOGIN /dev/console
Sun Microsystems Inc.
SunOS 5.11
snv_23 October 2007
%

That is all there is in the creation of a local zone. Now simply login to the newly created zone,
just like connecting to any other system in the network.
[New 08/27/2008] Mounting file systems in a non-global zone
Sometimes it might be necessary to export file systems or create new file systems when the zone
is already running. This section's focus is on exporting block devices and the raw devices in such
situations i.e., when the local zone is already configured.
Exporting the Raw Device(s) to a non-global zone
If the file system does not exist on the device, raw devices can be exported as they are, so the file
system can be created inside the non-global zone using the normal newfs command.
The following example shows how to export the raw device to a non-global zone when the zone
is already configured.
# zonecfg -z appserv
zonecfg:appserv> add device
zonecfg:appserv:device> set match=/dev/rdsk/c5t0d0s6
zonecfg:appserv:device> end
zonecfg:appserv> verify
zonecfg:appserv> commit
zonecfg:appserv> exit

In this example /dev/rdsk/c5t0d0s6 is being exported.


After the zonecfg step, reboot the non-global zone to make the raw device visible inside the nonglobal zone. After the reboot, check the existence of the raw device.
# hostname
v440appserv
# ls -l /dev/rdsk/c5t0d0s6
crw-r----1 root
sys

118, 126 Aug 27 14:33 /dev/rdsk/c5t0d0s6

Now that the raw device is accessible within the non-global zone, we can use the regular Solaris
commands to create any file system like UFS.

eg.,
# newfs -v c5t0d0s6
newfs: construct a new file system /dev/rdsk/c5t0d0s6: (y/n)? y
mkfs -F ufs /dev/rdsk/c5t0d0s6 1140260864 -1 -1 8192 1024 251 1 120 8192 t 0
-1 8 128 n
Warning: 4096 sector(s) in last cylinder unallocated
/dev/rdsk/c5t0d0s6: 1140260864 sectors in 185590 cylinders of 48 tracks, 128
sectors
556768.0MB in 11600 cyl groups (16 c/g, 48.00MB/g, 5824 i/g)
super-block backups (for fsck -F ufs -o b=#) at:
32, 98464, 196896, 295328, 393760, 492192, 590624, 689056, 787488, 885920,
Initializing cylinder groups:
..............................................................................
.
..............................................................................
.
.........................................................................
super-block backups for last 10 cylinder groups at:
1139344160, 1139442592, 1139541024, 1139639456, 1139737888, 1139836320,
1139934752, 1140033184, 1140131616, 1140230048

Exporting the Block Device(s) to a non-global zone


If the file system exists on the device, block devices can be exported as they are, so the file
system can be mounted inside the non-global zone using the normal Solaris command, mount.
The following example shows how to export the block device to a non-global zone when the
zone is already configured.
# zonecfg -z appserv
zonecfg:appserv> add device
zonecfg:appserv:device> set match=/dev/dsk/c5t0d0s6
zonecfg:appserv:device> end
zonecfg:appserv> verify
zonecfg:appserv> commit
zonecfg:appserv> exit

In this example /dev/dsk/c5t0d0s6 is being exported.


After the zonecfg step, reboot the non-global zone to make the block device visible inside the
non-global zone. After the reboot, check the existence of the block device; and mount the file
system within the non-global zone.
# hostname
v440appserv
# ls -l /dev/dsk/c5t0d0s6
brw-r----1 root
sys
# fstyp /dev/dsk/c5t0d0s6

118, 126 Aug 27 14:40 /dev/dsk/c5t0d0s6

ufs
# mount /dev/dsk/c5t0d0s6 /mnt
# df -h /mnt
Filesystem
/dev/dsk/c5t0d0s6

size
535G

used
64M

avail capacity
530G
1%

Mounted on
/mnt

Mounting a file system from the global zone into the non-global zone
Sometimes it is desirable to have the flexibility of mounting a file system in the global zone or
non-global zone on-demand. In such situations, rather than exporting the file systems or block
devices into the non-global zone, create the file system in the global zone and mount the file
system directly from the global zone into the non-global zone. Make sure to unmount that file
system in the global zone if mounted, before attempting to mount it in the non-global zone.
eg.,
In the non-global zone:
# mkdir /repo1

In the global zone:


# df -h /repo1
/dev/dsk/c2t40d0s6

134G

64M

133G

1%

/repo1

# umount /repo1
# ls -ld /zones/appserv/root/repo1
drwxr-xr-x
2 root
root
/zones/appserv/root/repo1

512 Aug 27 14:45

# mount /dev/dsk/c2t40d0s6 /zones/appserv/root/repo1

Now go back to the non-global zone and check the mounted file systems.
# hostname
v440appserv
# df -h /repo1
Filesystem
/repo1

size
134G

used
64M

avail capacity
133G
1%

Mounted on
/repo1

To unmount the file system from the non-global zone, run the following command from the
global zone.
# umount /zones/appserv/root/repo1

Removing the file system from the non-global zone

eg.,
Earlier in the zone creation step, the block device /dev/dsk/c2t40d1s6 was exported and
mounted on the mount point /repo2 inside the non-global zone. To remove the file system
completely from the non-global zone, run the following in the global zone.
# zonecfg -z appserv
zonecfg:appserv> remove fs dir=/repo2
zonecfg:appserv> verify
zonecfg:appserv> commit
zonecfg:appserv> exit

Reboot the non-global zone for this setting to take effect.


[New: 08/27/2008]
Shutting down and booting up the local zones (Updated 01/15/2008)
1. To bring down the local zone:
% zlogin appserv shutdown -i 0

2. To boot up the local zone:


% zoneadm -z appserv boot

Just for the sake of completeness, the following steps show how to remove a local zone.
Steps to delete a Local Zone
1. Shutdown the local zone
% zoneadm -z appserv halt
% zoneadm list -cv
ID NAME
0 global
- appserv

STATUS
running
installed

PATH
/
/zones/appserver

2. Uninstall the local zone -- remove the root file system


% zoneadm -z appserv uninstall
Are you sure you want to uninstall zone appserv (y/[n])? y
zoneadm list -cv
ID NAME

STATUS

PATH

0 global
- appserv

running
configured

/
/zones/appserver

3. Delete the configured local zone


% zonecfg -z appserv delete
Are you sure you want to delete zone appserv (y/[n])? y
zoneadm list -cv
ID NAME
0 global

STATUS
running

PATH
/

[New: 07/14/2009]
Cloning a Non-Global Zone
The following instructions are for cloning a non-global zone on the same system. The example
shown below clones the siebeldb zone. After the cloning process, a brand new zone oraclebi
emerges as a replica of siebeldb zone.
eg.,
# zoneadm list -cv
ID NAME
0 global
shared
- siebeldb

STATUS

PATH

BRAND

running

native

installed

/zones/dbserver

native

IP

excl

1. Export the configuration of the zone that you want to clone/copy


# zonecfg -z siebeldb export > /tmp/siebeldb.config.cfg

2. Change the configuration of the new zone that differ from the existing one -- for example,
IP address, data set names, network interface etc. To make these changes, edit
/tmp/siebeldb.config.cfg

3. Create the zone root directory for the new zone being created
# mkdir /zones3/oraclebi
# chmod 700 /zones3/oraclebi
# ls -ld /zones3/oraclebi
drwx-----2 root
root

512 Mar 12 15:41 /zones3/oraclebi

4. Create a new (empty, non-configured) zone in the usual manner with the edited
configuration file as an input
# zonecfg -z oraclebi -f /tmp/siebeldb.config.cfg
#

zoneadm list -cv


ID NAME

IP

0 global
shared
- siebeldb
excl
- oraclebi
excl

STATUS

PATH

BRAND

running

native

installed

/zones/dbserver

native

configured /zones3/oraclebi

native

5. Ensure that the zone you intend to clone/copy is not running


# zoneadm -z siebeldb halt

6. Clone the existing zone


# zoneadm -z oraclebi clone siebeldb
Cloning zonepath /zones/dbserver...

This step takes at least 5 minutes to clone the whole zone. Larger zones may take longer
to complete the cloning process.
7. Boot the newly created zone
# zoneadm -z oraclebi boot

Bring up the halted zone (the source zone) as well, if wish.


8. Login to the console of the new zone to configure IP, networking, etc., and you are done.
# zlogin -C oraclebi

[New: 07/15/2009]
Migrating a Non-Global Zone from One Host to Another
Keywords: Solaris, Non-Global Zone, Migration, Attach, Detach

The following instructions demonstrate how to migrate the non-global zone, orabi to another
server with examples.
# zoneadm list -cv
ID NAME

STATUS

PATH

BRAND

0 global
shared
4 siebeldb

running

native

running

/zones/dbserver

native

- orabi
shared

installed

/zones3/orabi

native

IP

excl

1. Halt the zone to be migrated, if running


# zoneadm -z orabi halt

2. Detach the zone. Once detached, it will be in the configured state


# zoneadm -z orabi detach
# zoneadm list -cv
ID NAME
IP
0 global
shared
4 siebeldb
excl
- orabi
shared

STATUS

PATH

BRAND

running

native

running

/zones/dbserver

native

configured /zones3/orabi

native

3. Move the zonepath for the zone to be migrated from the old host to the new host.
Do the following on the old host:
# cd /zones3
# tar -Ecf orabi.tar orabi
# compress orabi.tar
# sftp newhost
Connecting to newhost...
sftp> cd /zones3
sftp> put orabi.tar.Z
Uploading orabi.tar.Z to /zones3/orabi.tar.Z
sftp> quit

On the newhost:

# cd /zones3
# uncompress orabi.tar.Z
# tar xf orabi.tar

4. On the new host, configure the zone.


Create the equivalent zone orabi on the new host -- use the zonecfg command with the
-a option and the zonepath on the new host. Make any required adjustments to the
configuration and commit the configuration.
# zonecfg -z orabi
orabi: No such zone configured
Use 'create' to begin configuring a new zone.
zonecfg:orabi> create -a /zones3/orabi
zonecfg:orabi> info
zonename: orabi
zonepath: /zones3/orabi
brand: native
autoboot: false
bootargs:
pool:
limitpriv: all,!sys_suser_compat,!sys_res_config,!sys_net_config,!
sys_linkdir,!sys_devices,!sys_config,!proc_zone,!dtrace_kernel,!
sys_ip_config
scheduling-class:
ip-type: shared
inherit-pkg-dir:
dir: /lib
inherit-pkg-dir:
dir: /platform
inherit-pkg-dir:
dir: /sbin
inherit-pkg-dir:
dir: /usr
net:
address: IPaddress
physical: nxge1
defrouter not specified
zonecfg:orabi> set capped-memory
zonecfg:orabi:capped-memory> set physical=8G
zonecfg:orabi:capped-memory> end
zonecfg:orabi> commit
zonecfg:orabi> exit

5. Attach the zone on the new host with a validation check and update the zone to match a
host running later versions of the dependent packages
# ls -ld /zones3
drwxrwxrwx
5 root

root

512 Jul 15 12:30 /zones3

# chmod g-w,o-w /zones3


# ls -ld /zones3
drwxr-xr-x
5 root
root

512 Jul 15 12:30 /zones3

# zoneadm -z orabi attach -u


Getting the list of files to remove
Removing 1740 files
Remove 607 of 607 packages
Installing 1878 files
Add 627 of 627 packages
Updating editable files
The file within the zone contains a log of the zone update.
# zoneadm list -cv
ID NAME
IP
0 global
shared
- orabi
shared

STATUS

PATH

BRAND

running

native

installed

/zones3/orabi

native

Note:
It is possible to force the attach operation without performing the validation. You can do
so with the help of -F option
# zoneadm -z orabi attach -F

Be careful when using this option because it could lead to an incorrect configuration; and
an incorrect configuration could result in undefined behavior

[New: 07/19/2009]
Tip: How to find out whether connected to the primary OS instance or the virtual instance?
If the command zonename returns global, then you are connected to the OS instance that was
booted from the physical hardware. If you see any string other than global, you might have
connected to the virtual OS instance.
Alternatively try running prstat -Z or zoneadm list -cv commands. If you see exactly one
non-zero Zone ID, it is an indication that you are connected to a non-global zone.

How To Replace A Failing SVM Disk


Share 0

In this example, two disks, c1t0d0 and c1t1d0, are mirrored to each other using Solaris Volume
Manager. c1t1d0 is showing signs of impending failure and has to be replaced.
solaris_1# tail /var/adm/messages
Jan 1 03:11:19 solaris_1 scsi: [ID 107833 kern.warning] WARNING:
/pci@1c,600000/scsi@2/sd@1,0 (sd1):
Jan 1 03:11:19 solaris_1 Error for Command: write(10)
Error
Level: Retryable
Jan 1 03:11:19 solaris_1 scsi: [ID 107833 kern.notice]
Requested Block:
37782714
Error Block: 37782714
Jan 1 03:11:19 solaris_1 scsi: [ID 107833 kern.notice]
Vendor: SEAGATE
Serial Number: 0344A6E4EG
Jan 1 03:11:19 solaris_1 scsi: [ID 107833 kern.notice]
Sense Key: Unit
Attention
Jan 1 03:11:19 solaris_1 scsi: [ID 107833 kern.notice]
ASC: 0x29 (bus
device reset message occurred), ASCQ: 0x3, FRU: 0x4
solaris_1#
solaris_1# iostat -En c1t1d0
c1t1d0
Soft Errors: 0 Hard Errors: 28473 Transport Errors: 107662
Vendor: SEAGATE Product: ST336607LSUN36G Revision: 0307 Serial No:
0344A6E4EG
Size: 36.42GB <36418595328 bytes>
Media Error: 0 Device Not Ready: 0 No Device: 28473 Recoverable: 0
Illegal Request: 0 Predictive Failure Analysis: 0

Find out if the failing disk contains SVM metadatabase replicas and delete them.
solaris_1# metadb
flags
first blk
a m p luo
16
a
p luo
8208
a
p luo
16400
a
u
16
a
u
8208
a
u
16400
solaris_1#
solaris_1# metadb | grep c1t1d0
a
u
16
a
u
8208
a
u
16400
solaris_1#

block count
8192
8192
8192
8192
8192
8192

/dev/dsk/c1t0d0s7
/dev/dsk/c1t0d0s7
/dev/dsk/c1t0d0s7
/dev/dsk/c1t1d0s7
/dev/dsk/c1t1d0s7
/dev/dsk/c1t1d0s7

8192
8192
8192

/dev/dsk/c1t1d0s7
/dev/dsk/c1t1d0s7
/dev/dsk/c1t1d0s7

solaris_1# metadb -d c1t1d0s7


solaris_1#
solaris_1# metadb
flags
first blk\tblock count
a m p luo
16
8192
a
p luo
8208
8192
a
p luo
16400
8192
solaris_1#

Detach the submirrors in the failing disk.


solaris_1# metastat -p
d0 -m d10 d20 1
d10 1 1 c1t0d0s0
d20 1 1 c1t1d0s0
d6 -m d16 d26 1
d16 1 1 c1t0d0s6
d26 1 1 c1t1d0s6
d5 -m d15 d25 1
d15 1 1 c1t0d0s5
d25 1 1 c1t1d0s5
d4 -m d14 d24 1
d14 1 1 c1t0d0s4
d24 1 1 c1t1d0s4
d3 -m d13 d23 1
d13 1 1 c1t0d0s3
d23 1 1 c1t1d0s3
d1 -m d11 d21 1
d11 1 1 c1t0d0s1
d21 1 1 c1t1d0s1
solaris_1#
solaris_1# metastat -p | grep c1t1d0
d20 1 1 c1t1d0s0
d26 1 1 c1t1d0s6
d25 1 1 c1t1d0s5
d24 1 1 c1t1d0s4
d23 1 1 c1t1d0s3
d21 1 1 c1t1d0s1
solaris_1#
solaris_1# metadetach d0 d20
d0: submirror d20 is detached
solaris_1# metadetach d6 d26
d6: submirror d26 is detached
solaris_1# metadetach d5 d25
d5: submirror d25 is detached
solaris_1# metadetach d4 d24
d4: submirror d24 is detached
solaris_1# metadetach d3 d23
d3: submirror d23 is detached
solaris_1# metadetach d1 d21
d1: submirror d21 is detached
solaris_1#
solaris_1# metastat -p
d0 -m d10 1
d10 1 1 c1t0d0s0
d6 -m d16 1
d16 1 1 c1t0d0s6

/dev/dsk/c1t0d0s7
/dev/dsk/c1t0d0s7
/dev/dsk/c1t0d0s7

d5 -m d15 1
d15 1 1 c1t0d0s5
d4 -m d14 1
d14 1 1 c1t0d0s4
d3 -m d13 1
d13 1 1 c1t0d0s3
d1 -m d11 1
d11 1 1 c1t0d0s1
d20 1 1 c1t1d0s0
d26 1 1 c1t1d0s6
d25 1 1 c1t1d0s5
d24 1 1 c1t1d0s4
d23 1 1 c1t1d0s3
d21 1 1 c1t1d0s1
solaris_1#

Remove the detached submirrors from the SVM metadatabase.


solaris_1# metaclear d20
d20: Concat/Stripe is cleared
solaris_1# metaclear d26
d26: Concat/Stripe is cleared
solaris_1# metaclear d25
d25: Concat/Stripe is cleared
solaris_1# metaclear d24
d24: Concat/Stripe is cleared
solaris_1# metaclear d23
d23: Concat/Stripe is cleared
solaris_1# metaclear d21
d21: Concat/Stripe is cleared
solaris_1#
solaris_1# metastat -p
d0 -m d10 1
d10 1 1 c1t0d0s0
d6 -m d16 1
d16 1 1 c1t0d0s6
d5 -m d15 1
d15 1 1 c1t0d0s5
d4 -m d14 1
d14 1 1 c1t0d0s4
d3 -m d13 1
d13 1 1 c1t0d0s3
d1 -m d11 1
d11 1 1 c1t0d0s1
solaris_1#

Verify that all SVM objects have been removed from the failing disk.
solaris_1# metastat -p | grep c1t1d0
solaris_1#
solaris_1# metadb | grep c1t1d0
solaris_1#

Unconfigure the failing disk


solaris_1# cfgadm -al
Ap_Id
Condition

Type

Receptacle

Occupant

c0
scsi-bus
connected
configured
c0::dsk/c0t0d0
CD-ROM
connected
configured
c1
scsi-bus
connected
configured
c1::dsk/c1t0d0
disk
connected
configured
c1::dsk/c1t1d0
disk
connected
configured
c2
scsi-bus
connected
unconfigured
usb0/1
unknown
empty
unconfigured
usb0/2
unknown
empty
unconfigured
solaris_1#
solaris_1# cfgadm -c unconfigure c1::dsk/c1t1d0
cfgadm: Component system is busy, try again: failed to offline:
Resource
Information
------------------ ------------------------/dev/dsk/c1t1d0s2
Device being used by VxVM
solaris_1#

unknown
unknown
unknown
unknown
unknown
unknown
ok
ok

Note: This host uses SVM to manage the internal disks and Veritas Volume Manager (VxVM) to
manage the SAN disks. VxVM keeps track of the internal disks even if it doesnt actually
manage them. In such a case, you may need to forcibly unconfigure the failing disk by specifying
-f to cfgadm.
solaris_1# cfgadm -f -c unconfigure c1::dsk/c1t1d0
solaris_1#
solaris_1# cfgadm -al
Ap_Id
Type
Receptacle
Condition
c0
scsi-bus
connected
c0::dsk/c0t0d0
CD-ROM
connected
c1
scsi-bus
connected
c1::dsk/c1t0d0
disk
connected
c1::dsk/c1t1d0
disk
connected
c2
scsi-bus
connected
usb0/1
unknown
empty
usb0/2
unknown
empty
solaris_1#

Occupant
configured
configured
configured
configured
unconfigured
unconfigured
unconfigured
unconfigured

unknown
unknown
unknown
unknown
unknown
unknown
ok
ok

Verify that the failing disk is marked unconfigured as above. Sun servers with hot-swappable
disks will also have the disks blue ready to remove LED lit.
Pull the failing disk out of the drive bay. You will see a message similar to this if you tail
-f /var/adm/messages.
Jan 6 12:24:14 solaris_1 rmclomv: [ID 545013 kern.error] DISK @ HDD1 has been
removed.

Insert the new disk. The following message will come up in /var/adm/messages.
Jan 6 12:24:50 solaris_1 rmclomv: [ID 978967 kern.error] DISK @ HDD1 has been
inserted.

Configure the new disk.


solaris_1# cfgadm -al
Ap_Id
Condition

Type

Receptacle

Occupant

c0
c0::dsk/c0t0d0
c1
c1::dsk/c1t0d0
c1::dsk/c1t1d0
c2
usb0/1
usb0/2
solaris_1#
solaris_1# cfgadm -c configure
solaris_1#
solaris_1# cfgadm -al
Ap_Id
Condition
c0
c0::dsk/c0t0d0
c1
c1::dsk/c1t0d0
c1::dsk/c1t1d0
c2
usb0/1
usb0/2
solaris_1#

scsi-bus
CD-ROM
scsi-bus
disk
disk
scsi-bus
unknown
unknown

connected
connected
connected
connected
connected
connected
empty
empty

configured
configured
configured
configured
unconfigured
unconfigured
unconfigured
unconfigured

unknown
unknown
unknown
unknown
unknown
unknown
ok
ok

c1::dsk/c1t1d0
Type

Receptacle

Occupant

scsi-bus
CD-ROM
scsi-bus
disk
disk
scsi-bus
unknown
unknown

connected
connected
connected
connected
connected
connected
empty
empty

configured
configured
configured
configured
configured
unconfigured
unconfigured
unconfigured

unknown
unknown
unknown
unknown
unknown
unknown
ok
ok

Verify that the new disk has been configured as above.


Copy the volume table of contents (VTOC) from the other disk in the mirror set, c1t0d0, onto the
new disk.
solaris_1# prtvtoc /dev/rdsk/c1t0d0s2 | fmthard -s - /dev/rdsk/c1t1d0s2
fmthard: New volume table of contents now in place.
solaris_1#
If prtvtoc returns with an error similar to this, /dev/rdsk/c1t1d0s2: Cannot get disk
geometry,

you will need to run format to label the disk.

solaris_1# format
Searching for disks...done
c1t1d0: configured with capacity of 136.71GB
AVAILABLE DISK SELECTIONS:
0. c1t0d0
/pci@780/pci@0/pci@9/scsi@0/sd@0,0
1. c1t1d0
/pci@780/pci@0/pci@9/scsi@0/sd@1,0
2. c1t2d0
/pci@780/pci@0/pci@9/scsi@0/sd@2,0
3. c1t3d0
/pci@780/pci@0/pci@9/scsi@0/sd@3,0
Specify disk (enter its number): 1
selecting c1t1d0
[disk formatted]
Disk not labeled. Label it now? y
FORMAT MENU:

disk
- select a disk
type
- select (define) a disk type
partition - select (define) a partition table
current
- describe the current disk
format
- format and analyze the disk
repair
- repair a defective sector
label
- write label to the disk
analyze
- surface analysis
defect
- defect list management
backup
- search for backup labels
verify
- read and display labels
save
- save new disk/partition definitions
inquiry
- show vendor, product and revision
volname
- set 8-character volume name
!
- execute , then return
quit
format> q
solaris_1#

Recreate the metadatabase replicas on the new disk.


solaris_1# metadb -a -c 3 c1t1d0s7
solaris_1#
solaris_1# metadb
flags
first blk
a m p luo
16
a
p luo
8208
a
p luo
16400
a
u
16
a
u
8208
a
u
16400
solaris_1#

Initialize the SVM submirrors on the new disk.


solaris_1# metainit d21 1 1
d21: Concat/Stripe is setup
solaris_1# metainit d23 1 1
d23: Concat/Stripe is setup
solaris_1# metainit d24 1 1
d24: Concat/Stripe is setup
solaris_1# metainit d25 1 1
d25: Concat/Stripe is setup
solaris_1# metainit d26 1 1
d26: Concat/Stripe is setup
solaris_1# metainit d20 1 1
d20: Concat/Stripe is setup
solaris_1#
solaris_1# metastat -p
d0 -m d10 1
d10 1 1 c1t0d0s0
d6 -m d16 1
d16 1 1 c1t0d0s6
d5 -m d15 1
d15 1 1 c1t0d0s5
d4 -m d14 1

c1t1d0s1
c1t1d0s3
c1t1d0s4
c1t1d0s5
c1t1d0s6
c1t1d0s0

block count
8192
8192
8192
8192
8192
8192

/dev/dsk/c1t0d0s7
/dev/dsk/c1t0d0s7
/dev/dsk/c1t0d0s7
/dev/dsk/c1t1d0s7
/dev/dsk/c1t1d0s7
/dev/dsk/c1t1d0s7

d14 1 1 c1t0d0s4
d3 -m d13 1
d13 1 1 c1t0d0s3
d1 -m d11 1
d11 1 1 c1t0d0s1
d20 1 1 c1t1d0s0
d26 1 1 c1t1d0s6
d25 1 1 c1t1d0s5
d24 1 1 c1t1d0s4
d23 1 1 c1t1d0s3
d21 1 1 c1t1d0s1
solaris_1#

Attach the new submirrors.


solaris_1# metattach d1 d21
d1: submirror d21 is attached
solaris_1# metattach d3 d23
d3: submirror d23 is attached
solaris_1# metattach d4 d24
d4: submirror d24 is attached
solaris_1# metattach d5 d25
d5: submirror d25 is attached
solaris_1# metattach d6 d26
d6: submirror d26 is attached
solaris_1# metattach d0 d20
d0: submirror d20 is attached
solaris_1#
solaris_1# metastat -p
d0 -m d10 d20 1
d10 1 1 c1t0d0s0
d20 1 1 c1t1d0s0
d6 -m d16 d26 1
d16 1 1 c1t0d0s6
d26 1 1 c1t1d0s6
d5 -m d15 d25 1
d15 1 1 c1t0d0s5
d25 1 1 c1t1d0s5
d4 -m d14 d24 1
d14 1 1 c1t0d0s4
d24 1 1 c1t1d0s4
d3 -m d13 d23 1
d13 1 1 c1t0d0s3
d23 1 1 c1t1d0s3
d1 -m d11 d21 1
d11 1 1 c1t0d0s1
d21 1 1 c1t1d0s1
solaris_1#

Update the new disks device ID entry in SVM. This step may not be required but its a good
idea to do it just in case.
solaris_1# metadevadm -u c1t1d0
Updating Solaris Volume Manager device relocation information for c1t1d0
Old device reloc information:
id1,sd@SSEAGATE_ST336607LSUN36G_3JAX5SL30000731858TJ
New device reloc information:

id1,sd@SSEAGATE_ST336607LSUN36G_3JAX5SL30000731858TJ
solaris_1#

SVM will resync the submirrors in the new disk as soon as they are attached. This is done in the
background and may take a fair amount of time depending on the size of the submirrors. Now is
a good time to go for a cup of coffee. Dont forget to check the progress of the resync when you
return.

How To Replace A Failed SVM Disk


Share 0

Before you replace a disk, determine if its in the process of failing or if it has failed already. See
this article for details: How To Tell The Difference Between A Failed Disk And A Failing Disk.
Find out if the failed disk contains SVM metadatabase replicas and delete them.
solaris_1# metadb
flags
first blk
a m p luo
16
a
p luo
8208
a
p luo
16400
W
p l
16
W
p l
8208
W
p l
16400
solaris_1#
solaris_1# metadb | grep c1t1d0
W
p l
16
W
p l
8208
W
p l
16400
solaris_1#
solaris_1# metadb -d c1t1d0s7
solaris_1#
solaris_1# metadb
flags
first blk
a m p luo
16
a
p luo
8208
a
p luo
16400

block count
8192
8192
8192
8192
8192
8192

/dev/dsk/c1t0d0s7
/dev/dsk/c1t0d0s7
/dev/dsk/c1t0d0s7
/dev/dsk/c1t1d0s7
/dev/dsk/c1t1d0s7
/dev/dsk/c1t1d0s7

8192
8192
8192

/dev/dsk/c1t1d0s7
/dev/dsk/c1t1d0s7
/dev/dsk/c1t1d0s7

block count
8192
8192
8192

/dev/dsk/c1t0d0s7
/dev/dsk/c1t0d0s7
/dev/dsk/c1t0d0s7

solaris_1#

Unconfigure the failed disk


solaris_1# cfgadm -al
Ap_Id
Type
Receptacle
Occupant
Condition
c0
scsi-bus
connected
configured
c0::dsk/c0t0d0
CD-ROM
connected
configured
c1
scsi-bus
connected
configured
c1::dsk/c1t0d0
disk
connected
configured
c1::dsk/c1t1d0
disk
connected
configured
c1::dsk/c1t2d0
disk
connected
configured
c1::dsk/c1t3d0
disk
connected
configured
c2
scsi-bus
connected
unconfigured
c3
fc-fabric
connected
configured
c3::5006016239a02018
disk
connected
configured
c3::5006016b39a02018
disk
connected
configured
c3::5006048452a70c17
disk
connected
configured
c3::5006048c52a70c07
disk
connected
configured
c4
fc-fabric
connected
configured
c4::5006016339a02018
disk
connected
configured
c4::5006016a39a02018
disk
connected
configured
c4::5006048452a70c18
disk
connected
configured
c4::5006048c52a70c08
disk
connected
configured
usb0/1
unknown
empty
unconfigured
usb0/2
unknown
empty
unconfigured
usb1/1
unknown
empty
unconfigured
usb1/2
unknown
empty
unconfigured
solaris_1#
solaris_1# cfgadm -c unconfigure c1::dsk/c1t1d0
cfgadm: Component system is busy, try again: failed to offline:
Resource
Information
------------------ ------------------------/dev/dsk/c1t1d0s2
Device being used by VxVM
solaris_1#

unknown
unknown
unknown
unknown
unknown
unknown
unknown
unknown
unknown
unknown
unknown
unknown
unknown
unknown
unknown
unknown
unknown
unknown
ok
ok
ok
ok

Note: This host uses SVM to manage the internal disks and Veritas Volume Manager (VxVM) to
manage the SAN disks. VxVM keeps track of the internal disks even if it doesnt actually
manage them. In such a case, you may need to forcibly unconfigure the failed disk by specifying
-f to cfgadm.
solaris_1# cfgadm -f -c unconfigure c1::dsk/c1t1d0
solaris_1#
solaris_1# cfgadm -al
Ap_Id
Type
Receptacle
Condition
c0
scsi-bus
connected
c0::dsk/c0t0d0
CD-ROM
connected
c1
scsi-bus
connected
c1::dsk/c1t0d0
disk
connected
c1::dsk/c1t1d0
disk
connected
c1::dsk/c1t2d0
disk
connected
c1::dsk/c1t3d0
disk
connected
c2
scsi-bus
connected
c3
fc-fabric
connected

Occupant
configured
configured
configured
configured
unconfigured
configured
configured
unconfigured
configured

unknown
unknown
unknown
unknown
unknown
unknown
unknown
unknown
unknown

c3::5006016239a02018
c3::5006016b39a02018
c3::5006048452a70c17
c3::5006048c52a70c07
c4
c4::5006016339a02018
c4::5006016a39a02018
c4::5006048452a70c18
c4::5006048c52a70c08
usb0/1
usb0/2
usb1/1
usb1/2
solaris_1#

disk
disk
disk
disk
fc-fabric
disk
disk
disk
disk
unknown
unknown
unknown
unknown

connected
connected
connected
connected
connected
connected
connected
connected
connected
empty
empty
empty
empty

configured
configured
configured
configured
configured
configured
configured
configured
configured
unconfigured
unconfigured
unconfigured
unconfigured

unknown
unknown
unknown
unknown
unknown
unknown
unknown
unknown
unknown
ok
ok
ok
ok

Verify that the failed disk is marked unconfigured as above. Sun servers with hot-swappable
disks will also have the disks blue ready to remove LED lit.
Pull the failed disk out of the drive bay. Insert the new disk. The following message will come up
in /var/adm/messages.
Jul 20 14:46:09 eap52 rmclomv: [ID 978967 kern.error] DISK @ HDD1 has been
inserted.

Configure the new disk.


solaris_1# cfgadm -al
Ap_Id
Condition
c0
c0::dsk/c0t0d0
c1
c1::dsk/c1t0d0
c1::dsk/c1t1d0
c1::dsk/c1t2d0
c1::dsk/c1t3d0
c2
c3
c3::5006016239a02018
c3::5006016b39a02018
c3::5006048452a70c17
c3::5006048c52a70c07
c4
c4::5006016339a02018
c4::5006016a39a02018
c4::5006048452a70c18
c4::5006048c52a70c08
usb0/1
usb0/2
usb1/1
usb1/2
solaris_1#
solaris_1# cfgadm -c configure
solaris_1#
solaris_1# cfgadm -al

Type

Receptacle

Occupant

scsi-bus
CD-ROM
scsi-bus
disk
disk
disk
disk
scsi-bus
fc-fabric
disk
disk
disk
disk
fc-fabric
disk
disk
disk
disk
unknown
unknown
unknown
unknown

connected
connected
connected
connected
connected
connected
connected
connected
connected
connected
connected
connected
connected
connected
connected
connected
connected
connected
empty
empty
empty
empty

configured
configured
configured
configured
unconfigured
configured
configured
unconfigured
configured
configured
configured
configured
configured
configured
configured
configured
configured
configured
unconfigured
unconfigured
unconfigured
unconfigured

c1::dsk/c1t1d0

unknown
unknown
unknown
unknown
unknown
unknown
unknown
unknown
unknown
unknown
unknown
unknown
unknown
unknown
unknown
unknown
unknown
unknown
ok
ok
ok
ok

Ap_Id
Condition
c0
c0::dsk/c0t0d0
c1
c1::dsk/c1t0d0
c1::dsk/c1t1d0
c1::dsk/c1t2d0
c1::dsk/c1t3d0
c2
c3
c3::5006016239a02018
c3::5006016b39a02018
c3::5006048452a70c17
c3::5006048c52a70c07
c4
c4::5006016339a02018
c4::5006016a39a02018
c4::5006048452a70c18
c4::5006048c52a70c08
usb0/1
usb0/2
usb1/1
usb1/2
solaris_1#

Type

Receptacle

Occupant

scsi-bus
CD-ROM
scsi-bus
disk
disk
disk
disk
scsi-bus
fc-fabric
disk
disk
disk
disk
fc-fabric
disk
disk
disk
disk
unknown
unknown
unknown
unknown

connected
connected
connected
connected
connected
connected
connected
connected
connected
connected
connected
connected
connected
connected
connected
connected
connected
connected
empty
empty
empty
empty

configured
configured
configured
configured
configured
configured
configured
unconfigured
configured
configured
configured
configured
configured
configured
configured
configured
configured
configured
unconfigured
unconfigured
unconfigured
unconfigured

unknown
unknown
unknown
unknown
unknown
unknown
unknown
unknown
unknown
unknown
unknown
unknown
unknown
unknown
unknown
unknown
unknown
unknown
ok
ok
ok
ok

Verify that the new disk has been configured as above.


Copy the volume table of contents (VTOC) from the other disk in the mirror set, c1t0d0, onto the
new disk.
solaris_1# prtvtoc /dev/rdsk/c1t0d0s2 | fmthard -s - /dev/rdsk/c1t1d0s2
fmthard: New volume table of contents now in place.
solaris_1#
If prtvtoc returns with an error similar to this, /dev/rdsk/c1t1d0s2: Cannot get disk
geometry,

you will need to run format to label the disk.

solaris_1# format
Searching for disks...done
c1t1d0: configured with capacity of 72.36GB
AVAILABLE DISK SELECTIONS:
0. c1t0d0 <SUN72G cyl 14087 alt
/pci@1f,700000/scsi@2/sd@0,0
1. c1t1d0 <SUN72G cyl 14087 alt
/pci@1f,700000/scsi@2/sd@1,0
2. c1t2d0 <SUN72G cyl 14087 alt
/pci@1f,700000/scsi@2/sd@2,0
3. c1t3d0 <SUN72G cyl 14087 alt
/pci@1f,700000/scsi@2/sd@3,0
Specify disk (enter its number): 1
selecting c1t1d0
[disk formatted]
Disk not labeled. Label it now? y

2 hd 24 sec 424>
2 hd 24 sec 424>
2 hd 24 sec 424>
2 hd 24 sec 424>

FORMAT MENU:
disk
- select a disk
type
- select (define) a disk type
partition - select (define) a partition table
current
- describe the current disk
format
- format and analyze the disk
repair
- repair a defective sector
label
- write label to the disk
analyze
- surface analysis
defect
- defect list management
backup
- search for backup labels
verify
- read and display labels
save
- save new disk/partition definitions
inquiry
- show vendor, product and revision
volname
- set 8-character volume name
!
- execute , then return
quit
format> q
solaris_1#

Recreate the metadatabase replicas on the new disk.


solaris_1# metadb -a -c 3 c1t1d0s7
solaris_1#
solaris_1# metadb
flags
first blk
a m p luo
16
a
p luo
8208
a
p luo
16400
a
u
16
a
u
8208
a
u
16400
solaris_1#

block count
8192
8192
8192
8192
8192
8192

/dev/dsk/c1t0d0s7
/dev/dsk/c1t0d0s7
/dev/dsk/c1t0d0s7
/dev/dsk/c1t1d0s7
/dev/dsk/c1t1d0s7
/dev/dsk/c1t1d0s7

Update the new disks device ID entry in SVM. This step may not be required but its a good
idea to do it just in case.
solaris_1# metadevadm -u c1t1d0
Updating Solaris Volume Manager device relocation information for c1t1d0
Old device reloc information:
id1,sd@THITACHI_HUS103073FL3800_V3X6MDDA
New device reloc information:
id1,sd@THITACHI_HUS103073FL3800_V3X6MDDA
solaris_1#

Enable the submirrors on the replacement disk. Start with the swap mirrorset as this wont affect
any data in case SVM runs into a problem. You may enable the submirrors in the new disk in
parallel or sequentially. If the I/O load on the system is heavy then do it in sequence. Otherwise,
enable the submirrors in parallel.
metareplace -e d1 c1t1d0s1
d1: device c1t1d0s1 is enabled
solaris_1# metastat d1
d1: Mirror

Submirror 0: d11
State: Okay
Submirror 1: d21
State: Resyncing
Resync in progress: 0 % done
Pass: 1
Read option: roundrobin (default)
Write option: parallel (default)
Size: 10491456 blocks (5.0 GB)
d11: Submirror of d1
State: Okay
Size: 10491456 blocks (5.0 GB)
Stripe 0:
Device
Start Block Dbase
c1t0d0s1
0
No

State Reloc Hot Spare


Okay
Yes

d21: Submirror of d1
State: Resyncing
Size: 10491456 blocks (5.0 GB)
Stripe 0:
Device
Start Block Dbase
c1t1d0s1
0
No

State Reloc Hot Spare


Resyncing
Yes

Device Relocation Information:


Device
Reloc Device ID
c1t0d0
Yes
id1,sd@SFUJITSU_MAW3073NCSUN72G_000707B0KHT4____DAN0P720KHT4
c1t1d0
Yes
id1,sd@THITACHI_HUS103073FL3800_V3X6MDDA
solaris_1#

SVM will resync the submirrors as soon as they are enabled. This is done in the background and
may take a fair amount of time depending on the size of the submirrors. Now is a good time to
go for a cup of coffee. Dont forget to check the progress of the resync when you return.

How To Add SVM State Database Replicas To A Slice That


Already Has One
Share 0

We all know what happens if a server loses majority of its Solaris Volume Manager state
database replicas it wont boot; unless it has the set md:mirrored_root_flag=1 directive
in /etc/system. In the example below, if we lose disk c1t1d0 the server is as good as dead. So
how do we add state database replicas to slice c1t0d0s7 to balance the number of replicas in this
server?
svr30# metadb
flags
a m p luo

first blk
16

block count
1034

/dev/dsk/c1t0d0s7

a
a
a
svr30#

p
p
p

luo
luo
luo

16
1050
2084

1034
1034
1034

/dev/dsk/c1t1d0s7
/dev/dsk/c1t1d0s7
/dev/dsk/c1t1d0s7

The short answer is, we cant. SVM does not allow the addition of new replicas to a slice that
already has them. Fortunately there is a long answer.
svr30# metadb -a -c2 c1t0d0s7
metadb: svr30: c1t0d0s7: has a metadevice database replica
svr30#

Delete the state database replicas in the slice where you need more of them. Its perfectly safe to
do this as long as no change to the replicas is in progress; e.g. adding or deleting a metadevice,
etc.
svr30# metadb -d c1t0d0s7
svr30#
svr30# metadb
flags
first blk
a
p luo
16
a
p luo
1050
a
p luo
2084
svr30#

block count
1034
1034
1034

/dev/dsk/c1t1d0s7
/dev/dsk/c1t1d0s7
/dev/dsk/c1t1d0s7

Now, recreate the replicas, and thats it. Youre home safe.
svr30# metadb -a -c3 c1t0d0s7
svr30#
svr30# metadb
flags
first blk
a
u
16
a
p luo
16
a
p luo
1050
a
p luo
2084
a
u
1050
a
u
2084
svr30#

block count
1034
1034
1034
1034
1034
1034

/dev/dsk/c1t0d0s7
/dev/dsk/c1t1d0s7
/dev/dsk/c1t1d0s7
/dev/dsk/c1t1d0s7
/dev/dsk/c1t0d0s7
/dev/dsk/c1t0d0s7

How To Determine When An SVM Metadevice Failed


Share 0

So you walk in on a Monday morning and find that half the disk mirrors in a Solaris server with
SVM disks have failed. For whatever reason post incident report, etc. you need to know
exactly when the mirrors failed. The metastat -t command gives you a handy way to find out.
bash-3.00# metastat -t
d5: Mirror
Submirror 0: d15
State: Needs maintenance Fri Jun 18 04:05:13 2010
Submirror 1: d25

State: Okay
Thu Jun 28 13:22:51 2007
Pass: 1
Read option: roundrobin (default)
Write option: parallel (default)
Size: 41945472 blocks (20 GB)
d15: Submirror of d5
State: Needs maintenance Fri Jun 18 04:05:13 2010
Invoke: metareplace d5 c0t0d0s5
Size: 41945472 blocks (20 GB)
Stripe 0:
Device
Start Dbase State
Reloc Hot Spare Time
c0t0d0s5
0 No
Maintenance Yes
Fri Jun 18 04:05:13
2010
d25: Submirror of d5
State: Okay
Thu Jun 28 13:22:51 2007
Size: 41945472 blocks (20 GB)
Stripe 0:
Device
Start Dbase State
Reloc Hot Spare Time
c0t1d0s5
0 No
Okay
Yes
Thu Jun 28 12:42:33
2007
:
: output truncated
:
d0: Mirror
Submirror 0: d10
State: Needs maintenance Fri Jun 18 04:05:11 2010
Submirror 1: d20
State: Okay
Thu May 13 14:56:57 2010
Pass: 1
Read option: roundrobin (default)
Write option: parallel (default)
Size: 20972736 blocks (10 GB)
d10: Submirror of d0
State: Needs maintenance Fri Jun 18 04:05:11 2010
Invoke: metareplace d0 c0t0d0s0
Size: 20972736 blocks (10 GB)
Stripe 0:
Device
Start Dbase State
Reloc Hot Spare Time
c0t0d0s0
0 No
Maintenance Yes
Fri Jun 18 04:05:11
2010
d20: Submirror of d0
State: Okay
Thu May 13 14:56:57 2010
Size: 20972736 blocks (10 GB)
Stripe 0:
Device
Start Dbase State
Reloc Hot Spare Time
c0t1d0s0
0 No
Okay
Yes
Thu May 13 14:56:57
2010
Device Relocation Information:
Device
Reloc Device ID
c0t1d0
Yes
id1,sd@n500000e01433abc0

c0t0d0
Yes
bash-3.00#

id1,sd@n500000e014325970

#showchs -b
#uname -a
# shutdown -g60 -y is
showboards
prtdiag -v

Navigation Procedures
This chapter explains step-by-step procedures and provides illustrations for connecting to the
system and navigating between the LOM shell and the console. It also explains how to terminate
an SC session.
This chapter includes the following topics:

Establishing a LOM Console Connection


o To Connect to an ASCII Terminal
o To Connect to a Network Terminal Server
o To Connect to Serial Port B of a Workstation
o To Access the LOM Console Using a Remote Connection

Switching Between the Different Consoles


o To Break to the LOM Prompt
o To Connect to the Solaris Console From the LOM Prompt
o To Break to the LOM Prompt From the OpenBoot PROM
o To Break to the OpenBoot Prompt When Solaris Is Running
o To Terminate a Session if You Are Connected to the System Controller Through
the Serial Port
o To Terminate a Session If You Are Connected to the System Controller with a
Network Connection

Establishing a LOM Console Connection


There are two ways to access the LOM console connection.

Through the SC serial port (direct) connection.

Through a Telnet (network) connection using the 10/100 Ethernet port.

Caution - Starting with 5.17.0 firmware, network connections are disabled by default.
Unless you enable network connections using the setupnetworkcommand, you must
use a serial (direct) connection to access the LOM console.

Under normal operation (when Solaris is running or the system is in the OpenBoot PROM)
connecting to the LOM console will automatically select a connection to the Solaris console,
otherwise a connection to the LOM prompt is made.
The LOM prompt is:

lom>

Accessing the LOM Console Using the Serial Port


With the serial port, you can connect to one of three devices:

ASCII terminal

Network terminal server

Workstation

See the Sun Fire V1280 Site Preparation and Installation Guide for details of how to make the
physical connections. The procedure is different for each type of device.

To Connect to an ASCII Terminal


If the LOM password has been set (and the previous connection was logged out) you are
prompted for a password.
1. Enter the correct password as previously set up using the password command.

Enter Password:

If the password is accepted the SC indicates that a connection has been made.
If the system is in Standby mode, the lom prompt is automatically displayed.

Connected.
lom>

2. If not, press Return and the Solaris console prompt is displayed.

Connected.

3. If a connection to the LOM console is already established over the network port, then you are
offered the opportunity to forcefully connect by logging out the other connection:

Enter Password:
The console is already in use.
Host:
somehost.acme.com
Connected: May 24 10:27
Idle time: 00:23:17
Force logout of other user? (y/n) y
Connected.
lom>

Otherwise press Return and the Solaris console prompt is displayed.

Connected.
#

To Connect to a Network Terminal Server


You will be provided with a menu of various servers to which you can connect. Select the
required server.
If the LOM password has been set (and the previous connection was logged out) you will be
prompted for a password.
1. Enter the correct password as previously set up using the password command.

Enter Password:

If the password is accepted the SC indicates that a connection has been made.
If the system is in Standby mode, the lom prompt is automatically displayed.

Connected.
lom>

2. If not, press Return and the Solaris console prompt is displayed.

Connected.
#

3. If a connection to the LOM console is already established over the network port then you are
offered the opportunity to forcefully connect by logging out the other connection:

Enter Password:
The console is already in use.
Host:
somehost.acme.com
Connected: May 24 10:27
Idle time: 00:23:17
Force logout of other user? (y/n) y
Connected.
lom>

4. If not, press Return and the Solaris console prompt is displayed.

Connected.
#

To Connect to Serial Port B of a Workstation


1. At the Solaris shell prompt type:

# tip hardwire

See the tip man page for a complete description of the tip command.
If the LOM password has been set (and the previous connection was logged out) you will be
prompted for a password.
2. Enter the correct password as previously set up using the password command.

Enter Password:

If the password is accepted the SC indicates that a connection has been made.
If the system is in standby mode the lom prompt is automatically displayed.

Connected.
lom>

If not, press Return and the Solaris console prompt is displayed.

Connected.
#

3. If a connection to the LOM console is already established over the network port then you are
offered the opportunity to forcefully connect by logging out the other connection:

Enter Password:
The console is already in use.
Host:
somehost.acme.com
Connected: May 24 10:27
Idle time: 00:23:17
Force logout of other user? (y/n) y
Connected.
lom>

To Access the LOM Console Using a Remote Connection


In order to be able to access the LOM console through a remote connection (for example: an
SSH connection) to the 10/100 Ethernet port you must first set up the interface.
Refer to To Configure Network Parameters.
1. Type the ssh command at the Solaris prompt to connect to the SC.

% ssh hostname

2. If the LOM password has been set up you are prompted for a password.

# Enter password:

3. Enter the correct password as previously set up using the password command.
If the password is accepted the SC indicates that a connection has been made.
If the system is in Standby mode the lom prompt is automatically displayed.

Connected.

lom>

4. If not, press Return and the Solaris console prompt will be displayed.

Connected.
#

5. If a connection to the LOM console is already established over the serial port then you will be
offered the opportunity to forcefully connect by logging out the other connection:

# ssh hostname
The console is already in use.
Host:
somehost.acme.com
Connected: May 24 10:27
Idle time: 00:23:17
Force logout of other user? (y/n) y
Connected.
lom>

In this case you should first use the LOM logout command on the serial connection to make the
connection available. Refer to the Sun Fire Entry-Level Midrange System Controller Command
Reference Manual for further details.

To Disconnect From the LOM Console


When you have finished using the LOM console you can disconnect your connection by using
the logout command.
On the serial port the response is:

lom>logout
Connection closed.

When connected over the network the response is:

lom>logout
Connection closed.
Connection to hostname closed by remote host.
Connection to hostname closed.Connection closed.
$

Switching Between the Different Consoles


The SC console connection provides access to the SC LOM command line interface, the Solaris
OS, and the OpenBoot PROM.
This section describes the procedures to navigate between the following:

LOM prompt.

Solaris OS.

OpenBoot PROM.

These procedures are summarized in FIGURE 3-1

FIGURE 3-1 Navigation Procedures Between Consoles

[D]

To Break to the LOM Prompt


When connected to the Solaris console, typing the escape sequence will take the console into
the LOM prompt.
By default the escape sequence is set to `#.'. That is, a # sign followed by a period.
For instance, if the escape sequence is the default of #. you will see:

lom>

When you type the first character of the escape sequence, there is a one second delay before the
character appears on the screen. This is because the system waits to see if the next character in
the escape sequence is about to be typed. The second character must be typed within this onesecond window. If all the characters in the escape sequence are typed then the lom> prompt
appears. If the next character to be typed is not the next character in the escape sequence, then
the characters belonging to the escape sequence that were typed are output to the screen.
Choose an escape sequence that does not start with a sequence of characters that is frequently
typed at the console, otherwise the delay between your striking the keys and the character
appearing on the screen may be confusing.

To Connect to the Solaris Console From the LOM Prompt


Use the console command from the LOM prompt, then type a carriage return.
If Solaris software is running, the system responds with the Solaris prompt:

lom>console
#

If the system was in the OpenBoot PROM, then the system responds with the OpenBoot PROM
prompt:

lom>console
{2} ok

If the system is in Standby mode, the following message is generated:

lom>console
Solaris is not active

To Break to the LOM Prompt From the OpenBoot PROM


The process of moving from the OpenBoot PROM to the LOM prompt is the same as moving
from Solaris OS to the LOM prompt.
Type the sequence of escape characters (default #.).

{2} ok
lom>

To Break to the OpenBoot Prompt When Solaris Is Running


When the Solaris Operating System is running the usual effect of sending a break signal to the
console is to force entry to the OpenBoot PROM or kernel debugger.
Do this by using the break command from the LOM prompt:

lom>break
This will suspend Solaris.
Do you want to continue? [no] y
Type `go' to resume
debugger entered.
{1} ok

To Terminate a Session if You Are Connected to the System Controller


Through the Serial Port

If you are at the Solaris prompt or the OpenBoot PROM go to LOM prompt by typing the
escape sequence, then terminate the LOM prompt session by typing logout and pressing
Return:

lom>logout

If you are connected through a terminal server invoke the terminal server's command to
disconnect the connection.

If the connection was established using a tip command then type the tip exit sequence
~.(tilde and a period):

~.

To Terminate a Session If You Are Connected to the System Controller with a


Network Connection
If you are at the Solaris prompt or the OpenBoot PROM, go to the LOM prompt by typing the
escape sequence and terminate the LOM prompt session by using the logout command.
The remote session (SSH or Telnet, depending upon the setting chosen using the setupnetwork
command) terminates automatically:

lom>logout
Connection closed by foreign host.
%

LIGHT OUT MANAGEMENT:


LOM COMMANDS:For the following machines.
Sun
Sun
Sun
Sun
Sun
Sun
Sun
Sun
Sun

Netra[TM] X1
Netra[TM] T1400/1405
Netra[TM] T1 AC200
Netra[TM] T1 DC200
Fire[TM] V100
Fire[TM] V120
Fire[TM] E2900
Netra[TM] 20
Fire[TM] V1280

COMMANDS:
sc> help [command]

sc>
sc>
sc>
sc>

showlogs [-b lines|-e lines] [-g lines] [-v]


showenvironment
showfru
showplatform [-v]

==============================================================================
=============================
ALOM COMMANDS:For the following machines.
Sun
Sun
Sun
Sun
Sun
Sun
Sun
Sun

Fire[TM]
Fire[TM]
Fire[TM]
Fire[TM]
Fire[TM]
Fire[TM]
Fire[TM]
Fire[TM]

V125
V210
V215
V240
V245
V250
V440
V445

ALOM COMMANDS:
sc>
sc>
sc>
sc>
sc>

showlogs
showenvironment
showfru
consolehistory [-b lines|-e lines] [-g lines] [-v] [boot|run]
showplatform [-v]

==============================================================================
=================================
ALOM4v For the following machines.
Sun
Sun
Sun
Sun
Sun

Fire[TM] T1000
Fire[TM] T2000
SPARC[TM] Enterprise T1000
SPARC[TM] Enterprise T2000
Netra[TM] T2000

COMMANDS:
sc>consolehistory -v
sc>showfaults -v
sc>showhost
sc>showlogs -v
sc>showplatform -v
sc>showsc_version_-v
sc>showcomponent
sc>showenvironment
sc>showfru
sc>showkeyswitch
sc>shownetwork
sc>showsc
sc>showusers
==============================================================================
=================================

ILOM For the following machines.


Sun
Sun
Sun
Sun
Sun
Sun
Sun
Sun
Sun
Sun
Sun
Sun

Fire[TM] X4100
Fire[TM] X4200
Fire[TM] X4500
Fire[TM] X4600
Fire[TM] X4100 M2
Fire[TM] X4200 M2
Fire[TM] X4600 M2
Blade[TM] 6000
Blade[TM] 8000
Netra[TM] X4200 M2
SPARC[TM] Enterprise T5120
SPARC[TM] Enterprise T5220

ILOM COMMANDS:
1
2
3
4
5
6

show
show
show
show
show
show

/sys/proc/
/sys/sensor
/sp/logs/events/list
/SP/logs/event/list
/SP/alert/rules
/SP/cli/commands

show -l all

==============================================================================
==================================
ELOM For the following machines.
Sun Fire[TM] X2100 M2
Sun Fire[TM] X2200 M2
ELOM COMMANDS:
Type the following command to power on the host:
set /SP/SystemInfo/CtrlInfo PowerCtrl=on
Type the following command to power off the host gracefully:
set /SP/SystemInfo/CtrlInfo PowerCtrl=gracefuloff
Type the following command to power off the host forcefully:
set /SP/SystemInfo/CtrlInfo PowerCtrl=forceoff
Type the following command to reset the host:
set /SP/SystemInfo/CtrlInfo PowerCtrl=reset
Type the following command to reboot and enter the BIOS automatically:
set /SP/SystemInfo/CtrlInfo PowerCtrl=BIOSSetup
Type this command to start a session to the server console:
start /SP/AgentInfo/console
ype this command to terminate a server console session started by another
user:
stop /SP/AgentInfo/console
/SP -> show /SP/AgentInfo
--------------------------------------------------------------------------------------Host systems are equipped with sensors that show the state of critical
components. For example, they record things like temperatures, voltages and

fan speeds. The show command can be used to show the state of sensors. Use
the command:
show /SP/SystemInfo/CPU/sensor
where sensor is a particular sensor. For example, the following command
shows the state of sensor /CPU/CPU0:
SP-> show /SP/SystemInfo/CPU/CPU0
Type the following command to display network settings:
show /SP/AgentInfo
set SP/AgentInfo IpAddress=[ipaddress]
show SP/AgentInfo NetMask
set SP/AgentInfo Gateway=[gateway]
set SP/AgentInfo DhcpConfigured=[3,2]
To change the IP address for the Embedded LOM, type:
/SP -> set /SP/AgentInfo IpAddress=xxx.xxx.xxx.xxx
Changing the IP address will disconnect your active session if you are
connected to the Embedded LOM via a network.
To set the Gateway address for the Embedded LOM, type:
/SP -> set /SP/AgentInfo Gateway=xxx.xxx.xxx.xxx
To change the network settings from static to DHCP settings, type:
/SP -> set /SP/AgentInfo DhcpConfigured=enable
To disable DHCP network settings, type:
/SP -> set /SP/AgentInfo DhcpConfigured=disable
When changing the permissions for user1 from Administrator to Operator type:
/SP -> set /SP/User/user1 Permission=operator
To change user1's password type:
/SP -> set /SP/users/user1 password=[password]
Changing password for user /SP/User/user1/password...
Enter new password:********
Enter new password again:********
New password was successfully set for user /SP/Users/user1
To configure an alert, type:
/SP -> set /SP/AgentInfo/PEF/Destination1=128.145.77.21 level=critical
To change an alert level to critical, type:
/SP -> set /SP/AgentInfo/PEF/1 level=critical
To turn off an alert, type:
/SP -> set /SP/AgentInfo/PEF/1 level=disable
==============================================================================
===============================
RSC For the following machines.
Sun Fire[TM] V890
Sun Fire[TM] V490

Sun
Sun
Sun
Sun

Fire[TM] V880
Fire[TM] V480
Fire[TM] 280R
Enterprise[TM] 250

RSC COMMANDS:
rsc> showfru
rsc>showfaults
rsc>showenvironment
rsc>consolehistory
rsc> loghistory
==============================================================================
=============================
SP For the following machines.
Sun Fire[TM] V20z
Sun Fire[TM] V40z
SP COMMANDS:
sp
sp
sp
sp
sp
sp

$
$
$
$
$
$

inventory get all


sensor get -v -n -c -w -d -s pwd
get events
diags run tests -m memory -v
sp get tdulog
sp get status

solaris: determine current bootpath


1. Verify that this is a SPARC base system, then proceed to Resolution
steps.
% /sbin/uname -p
sparc
2. End
* Tier 1 Resolution Steps *
1. Login to the server via an appropriate trusted host or access method.
2. Get the boot device path.
% /usr/sbin/prtconf -vp | grep bootpath
bootpath: '/pci at 8,600000/SUNW,qlc at 2/fp at 0,0/disk at
w500000e01083c641,0:d'
In this example the boot path is /pci at 8,600000/SUNW,qlc at 2/fp at 0

,0/disk at w500000e01083c641,0:d
3. Get the eeprom boot device, this may either be a boot alias or a boot
path.
% /usr/sbin/eeprom | grep boot-device
boot-device=be3root be3mirror
In this example the boot device is set to 2 boot alias: be3root and
be3mirror
4. If step 3 is a boot alias, list it's path.
% /usr/sbin/eeprom | grep devalias
nvramrc=devalias be0mirror /pci at 8,600000/SUNW,qlc at 2/fp at 0
,0/disk at w500000e010834431,0:a
devalias be0root /pci at 8,600000/SUNW,qlc at 2/fp at 0,0/disk at
w500000e010834a81,0:a
*devalias be3root /pci at 8,600000/SUNW,qlc at 2/fp at 0,0/disk at
w500000e01083c641,0:d
*
devalias be3mirror /pci at 8,600000/SUNW,qlc at 2/fp at 0,0/disk at
w500000e010836cf1
,0:d
5. In this example the boot path for alias be3root have been set correctly
as it is the same as the boot path listed in step 2, then *stop* here. In
case where this is *NOT* the same, then proceed to step 6.
6. Change the boot alias to the correct boot path obtained in step 2
% eeprom nvramrc='devalias be3root /pci at 8,600000/SUNW,qlc at 2/fp at 0
,0/disk at w500000e01083c641,0:d'
7. End

Capturing errors via RSC

Consider a scenario when Solaris traps to the firmware (OBP), resulting


in either a Red State Exception, Watchdog Reset, or Fatal Reset.
Console output is not captured in the /var/adm/messages file (via
syslogd), because we are no longer in the runtime environment. Indeed,
the Red State Exception, Watchdog Reset, and Fatal Reset message are
produced by the system firmware.
If no terminal connection exists to console port or the shell being used
does not support logging (scroll), valuable service data can be
inaccessible.
Volume server products have traditionally lacked an architectural design

that provides persistent storage at the firmware layer, however


the service processor (RSC) provides an acceptable level of temporary
storage for recording console output during firmware.
Recommendation:
Ensure the service processor (RSC) is properly installed. Refer to <
Solution: 216277<http://sunsolve.sun.com/search/document.do?
assetkey=urn:cds:docid:1-61-216277-1>>
for proper set up instructions.
Usage:
Here are a few of the commands to help you capture the state of the server
and show
you what errors and events have occurred.
*showenvironment* - Will display the status of Power supplies, fans, LEDs,
RSC, and
temperatures that are available for each platform.
*loghistory* - Displays all logins to the RSC, reboots, resets and power
events in the buffer.
*consolehistory boot* - Will show changes to the nvram settings as well as
changes to the
boot PROM. Also displays output to the console up to and including commands
run from Solaris.
The boot buffer contains POST, OpenBoot PROM, and UNIX boot messages
received from the server for the most recent boot.
*consolehistory run* - The run buffer contains the most recent data received
from the
server operating system.
*consolehistory oboot* - The oboot buffer contains POST, OpenBoot PROM, and
UNIX
boot messages for the first power-on boot, the original boot.
*consolehistory orun* - The orun buffer contains the data received from the
server's operating system after the first reboot that follows a power-on
boot (the original boot).
*break* - Send break to system console. Use with care on running system!
*console* - Connect to system console.
*help* - Shows you additional commands to run.

Sun Fire V1280 LOM Password


the only way to recover a lost ALOM password on SFV1280 is, to open a
call at Sun an request a service password for the ALOM.
The Sun Support need the following informations:
- hostid

- SCApp Version
- RTOS Version
You get the above informations from the ALOM Prompt.
lom> showsc -v

Since you can't get onto the LOM due to not knowing the password, the
'showsc -v' probably won't work for you.
However, I believe if you enter the Return key 3 times when it is asking
for the password it will generate you the required
HostID, ScApp version and RTOS version.
Then you can contact Sun and provide them this information so you can get
the password reset.

S-ar putea să vă placă și