Kamis, 19 April 2012

Live Upgrade Solaris 10

Ugrade O/S Solaris 10: Methode : Live Upgrade
Upgrade : From Solaris 10 update 9 (Solaris 10 9/10) to Solaris 10 update 10 (Solaris 10 8/11)

----------------------------------
info
------
d0 -- 20gb -- 20480 -- /
d1 -- 32gb -- 32768 -- swap
d3 -- 15gb -- 15360 -- /oracle
d4 -- 20gb -- 20480 -- /SQLLOADER
d5 -- 20gb -- 20480 -- /BDI_SMSUPLOAD
d6 -- 29gb -- 29696 -- /export/home

Step Mirror
-----------------------------
c0t5000CCA01297AE1Cd0 ---> mirr disk
c0t5000CCA012971518d0 ---> prim disk

cp -p /etc/system /etc/system.orig.14042012
cp -p /etc/vfstab /etc/vfstab.orig.14042012

prtvtoc /dev/rdsk/c0t5000CCA012971518d0s2 | fmthard -s - /dev/rdsk/c0t5000CCA01297AE1Cd0s2

metadb -a -f -c3 /dev/dsk/c0t5000CCA01297AE1Cd0s7 /dev/dsk/c0t5000CCA012971518d0s7

Mirror the root slice
# metainit -f d10 1 1 c0t5000CCA012971518d0s0
# metainit -f d20 1 1 c0t5000CCA01297AE1Cd0s0
# metainit d0 -m d10
# metaroot d0

Mirror the swap slice.
# metainit -f d11 1 1 c0t5000CCA012971518d0s1
# metainit -f d21 1 1 c0t5000CCA01297AE1Cd0s1
# metainit d1 -m d11

Mirror the slice 3
# metainit -f d13 1 1 c0t5000CCA012971518d0s3
# metainit -f d23 1 1 c0t5000CCA01297AE1Cd0s3
# metainit d3 -m d13

Mirror the slice 4
# metainit -f d14 1 1 c0t5000CCA012971518d0s4
# metainit -f d24 1 1 c0t5000CCA01297AE1Cd0s4
# metainit d4 -m d14

Mirror the slice 5
# metainit -f d15 1 1 c0t5000CCA012971518d0s5
# metainit -f d25 1 1 c0t5000CCA01297AE1Cd0s5
# metainit d5 -m d15

Mirror the slice 6
# metainit -f d16 1 1 c0t5000CCA012971518d0s6
# metainit -f d26 1 1 c0t5000CCA01297AE1Cd0s6
# metainit d6 -m d16


# lockfs -fa
# init 6

attach
# metattach d0 d20
# metattach d1 d21
# metattach d3 d23
# metattach d4 d24
# metattach d5 d25
# metattach d6 d26

check OS version and update
==============================
bash-3.00# cat /etc/release
Oracle Solaris 10 9/10 s10s_u9wos_14a SPARC
Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
Assembled 11 August 2010


Requirement to apply the Solaris 10 Live Upgrade patch to preexisting ABEs
---------------------------------------------------------------------------

root@lab1 # showrev -p |grep 121430
Patch: 121430-53 Obsoletes: 121435-04, 121437-02 Requires: Incompatibles: Packages: SUNWlucfg, SUNWlur, SUNWluu
Patch: 121428-13 Obsoletes: Requires: 120235-01, 121430-16 Incompatibles: Packages: SUNWluzone
root@lab1 #


latest version patch of 121430 is 121430-74

patchadd -d 121430-74
----------------------

root@lab1 # patchadd -d 121430-74
Validating patches...

Loading patches installed on the system...

Done!

Loading patches requested to install.

Done!

Checking patches that you specified for installation.

Done!


Approved patches will be installed in this order:

121430-74


Checking installed patches...
Executing prepatch script...
Installing patch packages...

Patch 121430-74 has been successfully installed.
See /var/sadm/patch/121430-74/log for details
Executing postpatch script...

Patch packages installed:
SUNWlucfg
SUNWlur
SUNWluu

root@lab1 #

Solaris Live Upgrade Software Patch Requirements
================================================
Solaris 10 5/08 (Update 5) or later:

SPARC:

119254-LR Install and Patch Utilities Patch -----> 119254-83 latest patch
121430-57 Live Upgrade patch -----> 121430-74 latest patch
121428-LR SUNWluzone required patches -----> 121428-15 latest patch
138130-01 vold patch -----> 141444-09

showrev -p |grep 119254-83
showrev -p |grep 121430-74
showrev -p |grep 121428-15
showrev -p |grep 141444-09


patchadd -d 119254-83
--------------------------
root@lab1 # patchadd -d 119254-83
Validating patches...

Loading patches installed on the system...

Done!

Loading patches requested to install.

Done!

Checking patches that you specified for installation.

Done!


Approved patches will be installed in this order:

119254-83


Checking installed patches...
Executing prepatch script...
Installing patch packages...

Patch 119254-83 has been successfully installed.
See /var/sadm/patch/119254-83/log for details
Executing postpatch script...

Patch packages installed:
SUNWinstall-patch-utils-root
SUNWpkgcmdsr
SUNWpkgcmdsu
SUNWswmt

root@lab1 #

patchadd -d 121428-15
========================================

root@lab1 # patchadd -d 121428-15
Validating patches...

Loading patches installed on the system...

Done!

Loading patches requested to install.

Done!

Checking patches that you specified for installation.

Done!


Approved patches will be installed in this order:

121428-15


Checking installed patches...
Executing prepatch script...
Installing patch packages...

Patch 121428-15 has been successfully installed.
See /var/sadm/patch/121428-15/log for details
Executing postpatch script...

Patch packages installed:
SUNWluzone


How to upgrade using Solaris Live Upgrade on host with root drive encapsulated in Disksuite or logical volume manager
=====================================================================================================================


1. Take a full backup of the data on the host for disaster recovery purposes

flarcreate -n "solaris10u9" -c -x /lu-prepare -R / /lu-prepare/solaris10u9.flar

2) Take the backup of metadevice configuration (An explorer from the host would be preferable)

metastat -p > metastat_config.out

3) Break the metamirrors for root (/), /usr, and /var metamirrors.

info
--------
root@lab1 # df -h
Filesystem size used avail capacity Mounted on
/dev/md/dsk/d0 20G 6.5G 13G 34% /
/devices 0K 0K 0K 0% /devices
ctfs 0K 0K 0K 0% /system/contract
proc 0K 0K 0K 0% /proc
mnttab 0K 0K 0K 0% /etc/mnttab
swap 58G 1.7M 58G 1% /etc/svc/volatile
objfs 0K 0K 0K 0% /system/object
sharefs 0K 0K 0K 0% /etc/dfs/sharetab
fd 0K 0K 0K 0% /dev/fd
swap 58G 64K 58G 1% /tmp
swap 58G 56K 58G 1% /var/run
/dev/md/dsk/d4 20G 20M 19G 1% /SQLLOADER
/dev/md/dsk/d5 20G 20M 19G 1% /BDI_SMSUPLOAD
/dev/md/dsk/d3 15G 15M 15G 1% /oracle
/dev/md/dsk/d6 29G 29M 28G 1% /export/home
/platform/sun4v/lib/libc_psr/libc_psr_hwcap2.so.1
20G 6.5G 13G 34% /platform/sun4v/lib/libc_psr.so.1
/platform/sun4v/lib/sparcv9/libc_psr/libc_psr_hwcap2.so.1
20G 6.5G 13G 34% /platform/sun4v/lib/sparcv9/libc_psr.so.1
root@lab1 # metastat -p
d6 -m d16 d26 1
d16 1 1 /dev/dsk/c0t5000CCA012971518d0s6
d26 1 1 /dev/dsk/c0t5000CCA01297AE1Cd0s6
d5 -m d15 d25 1
d15 1 1 /dev/dsk/c0t5000CCA012971518d0s5
d25 1 1 /dev/dsk/c0t5000CCA01297AE1Cd0s5
d4 -m d14 d24 1
d14 1 1 /dev/dsk/c0t5000CCA012971518d0s4
d24 1 1 /dev/dsk/c0t5000CCA01297AE1Cd0s4
d3 -m d13 d23 1
d13 1 1 /dev/dsk/c0t5000CCA012971518d0s3
d23 1 1 /dev/dsk/c0t5000CCA01297AE1Cd0s3
d1 -m d11 d21 1
d11 1 1 /dev/dsk/c0t5000CCA012971518d0s1
d21 1 1 /dev/dsk/c0t5000CCA01297AE1Cd0s1
d0 -m d10 d20 1
d10 1 1 /dev/dsk/c0t5000CCA012971518d0s0
d20 1 1 /dev/dsk/c0t5000CCA01297AE1Cd0s0
# metadetach d0 d20

4) notedown the the physical device path name of the root disk & root-mirror disks

ls -la /dev/rdsk/c0t5000CCA012971518d0s2 ---> prim disk
ls -la /dev/rdsk/c0t5000CCA012971518d0s0
ls -la /dev/rdsk/c0t5000CCA01297AE1Cd0s2 ---> mir disk
ls -la /dev/rdsk/c0t5000CCA01297AE1Cd0s0

prim disk
---------
root@lab1 # ls -la /dev/rdsk/c0t5000CCA012971518d0s2
lrwxrwxrwx 1 root root 52 Apr 15 18:41 /dev/rdsk/c0t5000CCA012971518d0s2 -> ../../devices/scsi_vhci/disk@g5000cca012971518:c,raw
root@lab1 #
root@lab1 # ls -la /dev/rdsk/c0t5000CCA012971518d0s0
lrwxrwxrwx 1 root root 52 Apr 15 18:41 /dev/rdsk/c0t5000CCA012971518d0s0 -> ../../devices/scsi_vhci/disk@g5000cca012971518:a,raw
root@lab1 #

mirr disk
----------
root@lab1 # ls -la /dev/rdsk/c0t5000CCA01297AE1Cd0s2
lrwxrwxrwx 1 root root 52 Apr 15 18:41 /dev/rdsk/c0t5000CCA01297AE1Cd0s2 -> ../../devices/scsi_vhci/disk@g5000cca01297ae1c:c,raw
root@lab1 #
root@lab1 # ls -la /dev/rdsk/c0t5000CCA01297AE1Cd0s0
lrwxrwxrwx 1 root root 52 Apr 15 18:41 /dev/rdsk/c0t5000CCA01297AE1Cd0s0 -> ../../devices/scsi_vhci/disk@g5000cca01297ae1c:a,raw
root@lab1 #

5) Backup /etc/vfstab and /etc/system files

root@lab1 # cp /etc/vfstab /etc/vfstab.15052012
root@lab1 # cp /etc/system /etc/system.15042012

Use the metaroot command or manually edit the /etc/vfstab and change the device paths for root (/), /usr and /var to represent the c#t#d#s# path names instead of metadevice device paths

vi /etc/vfstab
vi /etc/system



6) Bring the system to ok prompt

init 0

7) Boot with the physical disk path of root disk noted earlier in step 4

ok boot

info
-----
/pci@400/pci@2/pci@0/pci@4/scsi@0/disk@w5000cca012971519,0:a



info
---

root@lab1 # df -h
Filesystem size used avail capacity Mounted on
/dev/dsk/c0t5000CCA012971518d0s0
20G 6.6G 13G 34% /
/devices 0K 0K 0K 0% /devices
ctfs 0K 0K 0K 0% /system/contract
proc 0K 0K 0K 0% /proc
mnttab 0K 0K 0K 0% /etc/mnttab
swap 58G 1.7M 58G 1% /etc/svc/volatile
objfs 0K 0K 0K 0% /system/object
sharefs 0K 0K 0K 0% /etc/dfs/sharetab
/platform/sun4v/lib/libc_psr/libc_psr_hwcap2.so.1
20G 6.6G 13G 34% /platform/sun4v/lib/libc_psr .so.1
/platform/sun4v/lib/sparcv9/libc_psr/libc_psr_hwcap2.so.1
20G 6.6G 13G 34% /platform/sun4v/lib/sparcv9/ libc_psr.so.1
fd 0K 0K 0K 0% /dev/fd
swap 58G 48K 58G 1% /tmp
swap 58G 40K 58G 1% /var/run
/dev/md/dsk/d4 20G 20M 19G 1% /SQLLOADER
/dev/md/dsk/d5 20G 20M 19G 1% /BDI_SMSUPLOAD
/dev/md/dsk/d3 15G 15M 15G 1% /oracle
/dev/md/dsk/d6 29G 29M 28G 1% /export/home



8) Once the system is back in multiuser mode, clear all the metadevices and submirrors for root (/), /usr and /var:

metaclear -r -f d0

root@lab1 # metaclear -r -f d0
d0: Mirror is cleared
d10: Concat/Stripe is cleared
root@lab1 #

9) List the existing state databases on the system

metadb -i


root@lab1 # metadb -i
flags first blk block count
a m pc luo 16 8192 /dev/dsk/c0t5000CCA012971518d0s7
a pc luo 8208 8192 /dev/dsk/c0t5000CCA012971518d0s7
a pc luo 16400 8192 /dev/dsk/c0t5000CCA012971518d0s7
a pc luo 16 8192 /dev/dsk/c0t5000CCA01297AE1Cd0s7
a pc luo 8208 8192 /dev/dsk/c0t5000CCA01297AE1Cd0s7
a pc luo 16400 8192 /dev/dsk/c0t5000CCA01297AE1Cd0s7
r - replica does not have device relocation information
o - replica active prior to last mddb configuration change
u - replica is up to date
l - locator for this replica was read successfully
c - replica's location was in /etc/lvm/mddb.cf
p - replica's location was patched in kernel
m - replica is master, this is replica selected as input
W - replica has device write errors
a - replica is active, commits are occurring to this replica
M - replica had problem with master blocks
D - replica had problem with data blocks
F - replica had format problems
S - replica is too small to hold current data base
R - replica had device read errors
root@lab1 #


10) Remove the state databases (the -f switch is only required for removing the last DB). This command needs to be completed for all state databases

root@lab1 # metadb -d /dev/dsk/c0t5000CCA012971518d0s7
root@lab1 # metadb -d /dev/dsk/c0t5000CCA01297AE1Cd0s7
metadb: lab1: must have at least 1 database (-f overrides)

root@lab1 # metadb -f -d /dev/dsk/c0t5000CCA01297AE1Cd0s7
root@lab1 #

11) Upgrade the OS using luupgrade

lucreate
=========================
# lucreate -c origbe -m /:/dev/dsk/c0t5000CCA01297AE1Cd0s0:ufs -n newbe


root@lab1 # lucreate -c origbe -m /:/dev/dsk/c0t5000CCA01297AE1Cd0s0:ufs -n newbe
Determining types of file systems supported
Validating file system requests
Preparing logical storage devices
Preparing physical storage devices
Configuring physical storage devices
Configuring logical storage devices
Analyzing system configuration.
No name for current boot environment.
Current boot environment is named .
Creating initial configuration for primary boot environment .
INFORMATION: No BEs are configured on this system.
The device is not a root device for any boot environment; cannot get BE ID.
PBE configuration successful: PBE name PBE Boot Device .
Updating boot environment description database on all BEs.
Updating system configuration files.
The device is not a root device for any boot environment; cannot get BE ID.
Creating configuration for boot environment .
Source boot environment is .
Creating file systems on boot environment .
Creating file system for in zone on .
Mounting file systems for boot environment .
Calculating required sizes of file systems for boot environment .
Populating file systems on boot environment .
Analyzing zones.
Mounting ABE .
Generating file list.
Copying data from PBE to ABE .
100% of filenames transferred
Finalizing ABE.
Fixing zonepaths in ABE.
Unmounting ABE .
Fixing properties on ZFS datasets in ABE.
Reverting state of zones in PBE .
Making boot environment bootable.
Population of boot environment successful.
Creation of boot environment successful.
root@lab1 #

check LU status
======================

root@lab1 # lustatus
Boot Environment Is Active Active Can Copy
Name Complete Now On Reboot Delete Status
-------------------------- -------- ------ --------- ------ ----------
origbe yes yes yes no -
newbe yes no no yes -
root@lab1 #

luupgrade
================================
luupgrade -u -n newbe -s /cdrom/sol_10_811_sparc


luupgrade in progress
================================
root@lab1 # luupgrade -u -n newbe -s /cdrom/sol_10_811_sparc

64459 blocks
miniroot filesystem is
Mounting miniroot at
INFORMATION: Auto Registration already done for this BE .
Validating the contents of the media .
The media is a standard Solaris media.
The media contains an operating system upgrade image.
The media contains version <10>.
Constructing upgrade profile to use.
Locating the operating system upgrade program.
Checking for existence of previously scheduled Live Upgrade requests.
Creating upgrade profile for BE .
Determining packages to install or upgrade for BE .
Performing the operating system upgrade of the BE .
CAUTION: Interrupting this process may leave the boot environment unstable
or unbootable.
Upgrading Solaris: 6% completed

luupgrade complete
========================
root@lab1 # luupgrade -u -n newbe -s /cdrom/sol_10_811_sparc

64459 blocks
miniroot filesystem is
Mounting miniroot at
INFORMATION: Auto Registration already done for this BE .
Validating the contents of the media .
The media is a standard Solaris media.
The media contains an operating system upgrade image.
The media contains version <10>.
Constructing upgrade profile to use.
Locating the operating system upgrade program.
Checking for existence of previously scheduled Live Upgrade requests.
Creating upgrade profile for BE .
Determining packages to install or upgrade for BE .
Performing the operating system upgrade of the BE .
CAUTION: Interrupting this process may leave the boot environment unstable
or unbootable.
Upgrading Solaris: 100% completed
Installation of the packages from this media is complete.
Updating package information on boot environment .
Package information successfully updated on boot environment .
Adding operating system patches to the BE .
The operating system patch installation is complete.
INFORMATION: The file on boot
environment contains a log of the upgrade operation.
INFORMATION: The file on boot
environment contains a log of cleanup operations required.
INFORMATION: Review the files listed above. Remember that all of the files
are located on boot environment . Before you activate boot
environment , determine if any additional system maintenance is
required or if additional media of the software distribution must be
installed.
The Solaris upgrade of the boot environment is complete.
Installing failsafe
Failsafe install is complete.

Mount target disk and check
=================================
root@lab1 # lumount newbe
/.alt.newbe
root@lab1 #

df -h

root@lab1 # df -h
Filesystem size used avail capacity Mounted on
/dev/dsk/c0t5000CCA012971518d0s0
20G 6.6G 13G 34% /
/devices 0K 0K 0K 0% /devices
ctfs 0K 0K 0K 0% /system/contract
proc 0K 0K 0K 0% /proc
mnttab 0K 0K 0K 0% /etc/mnttab
swap 58G 1.7M 58G 1% /etc/svc/volatile
objfs 0K 0K 0K 0% /system/object
sharefs 0K 0K 0K 0% /etc/dfs/sharetab
/platform/sun4v/lib/libc_psr/libc_psr_hwcap2.so.1
20G 6.6G 13G 34% /platform/sun4v/lib/libc_psr.so.1
/platform/sun4v/lib/sparcv9/libc_psr/libc_psr_hwcap2.so.1
20G 6.6G 13G 34% /platform/sun4v/lib/sparcv9/libc_psr.so.1
fd 0K 0K 0K 0% /dev/fd
swap 58G 400K 58G 1% /tmp
swap 58G 48K 58G 1% /var/run
/dev/md/dsk/d4 20G 20M 19G 1% /SQLLOADER
/dev/md/dsk/d5 20G 20M 19G 1% /BDI_SMSUPLOAD
/dev/md/dsk/d3 15G 15M 15G 1% /oracle
/vol/dev/dsk/c1t6d0/sol_10_811_sparc
2.1G 2.1G 0K 100% /cdrom/sol_10_811_sparc
/dev/dsk/c0t5000CCA01297AE1Cd0s0
20G 6.7G 13G 35% /.alt.newbe
/BDI_SMSUPLOAD 20G 20M 19G 1% /.alt.newbe/BDI_SMSUPLOAD
/SQLLOADER 20G 20M 19G 1% /.alt.newbe/SQLLOADER
/oracle 15G 15M 15G 1% /.alt.newbe/oracle
swap 58G 0K 58G 0% /.alt.newbe/var/run
swap 58G 0K 58G 0% /.alt.newbe/tmp


boot from 2nd disk
------------------
{0} ok boot /pci@400/pci@1/pci@0/pci@4/scsi@0/disk@w5000cca01297ae1d,0

SPARC T4-1, No Keyboard
Copyright (c) 1998, 2011, Oracle and/or its affiliates. All rights reserved.
OpenBoot 4.33.1, 32256 MB memory available, Serial #99184308.
Ethernet address 0:21:28:e9:6e:b4, Host ID: 85e96eb4.



Boot device: /pci@400/pci@1/pci@0/pci@4/scsi@0/disk@w5000cca01297ae1d,0 File and args:
|
| / - \ | / - \ | / - \ | / - \ | /
SunOS Release 5.10 Version Generic_147440-01 64-bit
Copyright (c) 1983, 2011, Oracle and/or its affiliates. All rights reserved.
- \ | / - \ | / - \ | / - \ | / - \ | / - \ | / - \ | / - \ | / - \ | / - \ | / - \ | / - \ | / - \ | / - \ | / - \ | / - \ | / - \ | / - \ | / - \ | / - \ | / - \ | / - \ | / - \ | / - \ | / - \ | / - \ | / - \ | / - \ | / - \ | / - \ | / - \ | / - \ | / - \ | / - \ | / - \ | / - \ | / - \ | / - \ | / - Hostname: lab1
Configuring devices.
Loading smf(5) service descriptions: 1/26 2/26 3/26 4/26 5/26 6/26 7/26 8/26 9/26 10/26 11/26 12/26 13/26 14/26 15/26 16/26 17/26 18/26 19/26 20/26 21/26 22/26 23/26 24/26 25/26 26/26

WARNING - Unable to repair one or more filesystems.
Run fsck manually (fsck filesystem...).

checking ufs filesystems
/dev/md/rdsk/d3: No such file or directory
fsck: could not stat /dev/md/rdsk/d3: No such file or directory
/dev/md/rdsk/d4: No such file or directory
fsck: could not stat /dev/md/rdsk/d4: No such file or directory
/dev/md/rdsk/d5: No such file or directory
fsck: could not stat /dev/md/rdsk/d5: No such file or directory
fsckall failed with exit code 1.
mount: /dev/md/dsk/d3 or /oracle, no such file or directory
mount: /dev/md/dsk/d5 or /BDI_SMSUPLOAD, no such file or directory
mount: /dev/md/dsk/d4 or /SQLLOADER, no such file or directory
svc:/system/filesystem/local:default: WARNING: /sbin/mountall -l failed: exit status 1
Apr 16 14:43:26 svc.startd[8]: svc:/system/filesystem/local:default: Method "/lib/svc/method/fs-local" failed with exit status 95.

Apr 16 14:43:26 svc.startd[8]: system/filesystem/local:default failed fatally: transitioned to maintenance (see 'svcs -xv' for details)

Apr 16 14:43:26 ldmad: agent agent-device registered

Apr 16 14:43:26 ldmad: a


after from boot 2nd / mirrdisk
=========================================
root@lab1 # df -h
Filesystem size used avail capacity Mounted on
/dev/dsk/c0t5000CCA01297AE1Cd0s0
20G 6.8G 13G 35% /
/devices 0K 0K 0K 0% /devices
ctfs 0K 0K 0K 0% /system/contract
proc 0K 0K 0K 0% /proc
mnttab 0K 0K 0K 0% /etc/mnttab
swap 26G 1.5M 26G 1% /etc/svc/volatile
objfs 0K 0K 0K 0% /system/object
sharefs 0K 0K 0K 0% /etc/dfs/sharetab
/platform/sun4v/lib/libc_psr/libc_psr_hwcap2.so.1
20G 6.8G 13G 35% /platform/sun4v/lib/libc_psr
.so.1
/platform/sun4v/lib/sparcv9/libc_psr/libc_psr_hwcap2.so.1
20G 6.8G 13G 35% /platform/sun4v/lib/sparcv9/
libc_psr.so.1
fd 0K 0K 0K 0% /dev/fd
swap 26G 0K 26G 0% /tmp
swap 26G 16K 26G 1% /var/run
root@lab1 #


recreate metadevice
==================================
root@lab1 # metadb -a -f -c3 /dev/dsk/c0t5000CCA01297AE1Cd0s7 /dev/dsk/c0t5000CCA012971518d0s7

Mirror the root slice
# metainit -f d10 1 1 c0t5000CCA01297AE1Cd0s0
# metainit -f d20 1 1 c0t5000CCA012971518d0s0
# metainit d0 -m d10
# metaroot d0

Mirror the swap slice.
# metainit -f d11 1 1 c0t5000CCA01297AE1Cd0s1
# metainit -f d21 1 1 c0t5000CCA012971518d0s1
# metainit d1 -m d11

Mirror the slice 3
# metainit -f d13 1 1 c0t5000CCA01297AE1Cd0s3
# metainit -f d23 1 1 c0t5000CCA012971518d0s3
# metainit d3 -m d13

Mirror the slice 4
# metainit -f d14 1 1 c0t5000CCA01297AE1Cd0s4
# metainit -f d24 1 1 c0t5000CCA012971518d0s4
# metainit d4 -m d14

Mirror the slice 5
# metainit -f d15 1 1 c0t5000CCA01297AE1Cd0s5
# metainit -f d25 1 1 c0t5000CCA012971518d0s5
# metainit d5 -m d15

Mirror the slice 6
# metainit -f d16 1 1 c0t5000CCA01297AE1Cd0s6
# metainit -f d26 1 1 c0t5000CCA012971518d0s6
# metainit d6 -m d16


root@lab1 # uname -a
SunOS lab1 5.10 Generic_147440-01 sun4v sparc sun4v

root@lab1 # cat /etc/release
Oracle Solaris 10 8/11 s10s_u10wos_17b SPARC
Copyright (c) 1983, 2011, Oracle and/or its affiliates. All rights reserved.
Assembled 23 August 2011

# lockfs -fa
# init 6

attach
# metattach d0 d20
# metattach d1 d21
# metattach d3 d23
# metattach d4 d24
# metattach d5 d25
# metattach d6 d26

root@lab1 # metastat -p
d6 -m d16 d26 1
d16 1 1 /dev/dsk/c0t5000CCA01297AE1Cd0s6
d26 1 1 /dev/dsk/c0t5000CCA012971518d0s6
d5 -m d15 d25 1
d15 1 1 /dev/dsk/c0t5000CCA01297AE1Cd0s5
d25 1 1 /dev/dsk/c0t5000CCA012971518d0s5
d4 -m d14 d24 1
d14 1 1 /dev/dsk/c0t5000CCA01297AE1Cd0s4
d24 1 1 /dev/dsk/c0t5000CCA012971518d0s4
d3 -m d13 d23 1
d13 1 1 /dev/dsk/c0t5000CCA01297AE1Cd0s3
d23 1 1 /dev/dsk/c0t5000CCA012971518d0s3
d1 -m d11 d21 1
d11 1 1 /dev/dsk/c0t5000CCA01297AE1Cd0s1
d21 1 1 /dev/dsk/c0t5000CCA012971518d0s1
d0 -m d10 d20 1
d10 1 1 /dev/dsk/c0t5000CCA01297AE1Cd0s0
d20 1 1 /dev/dsk/c0t5000CCA012971518d0s0
root@lab1 #

root@lab1 # metastat -c
d6 m 29GB d16 d26 (resync-0%)
d16 s 29GB /dev/dsk/c0t5000CCA01297AE1Cd0s6
d26 s 29GB /dev/dsk/c0t5000CCA012971518d0s6
d5 m 20GB d15 d25 (resync-0%)
d15 s 20GB /dev/dsk/c0t5000CCA01297AE1Cd0s5
d25 s 20GB /dev/dsk/c0t5000CCA012971518d0s5
d4 m 20GB d14 d24 (resync-0%)
d14 s 20GB /dev/dsk/c0t5000CCA01297AE1Cd0s4
d24 s 20GB /dev/dsk/c0t5000CCA012971518d0s4
d3 m 15GB d13 d23 (resync-1%)
d13 s 15GB /dev/dsk/c0t5000CCA01297AE1Cd0s3
d23 s 15GB /dev/dsk/c0t5000CCA012971518d0s3
d1 m 32GB d11 d21 (resync-0%)
d11 s 32GB /dev/dsk/c0t5000CCA01297AE1Cd0s1
d21 s 32GB /dev/dsk/c0t5000CCA012971518d0s1
d0 m 20GB d10 d20 (resync-1%)
d10 s 20GB /dev/dsk/c0t5000CCA01297AE1Cd0s0
d20 s 20GB /dev/dsk/c0t5000CCA012971518d0s0



referensi :

Solaris Live Upgrade Software Patch Requirements [ID 1004881.1]
How to Use Solaris Live Upgrade to Upgrade From Solaris 8 to Solaris 10 05/08 (or Later Solaris Releases) [ID 1019995.1]
How to Confirm Solaris Live Upgrade Meets Minimum Patch Requirements [ID 1020045.1]
How to upgrade using Solaris Live Upgrade on host with root drive encapsulated in Disksuite or logical volume manager [ID 1005582.1]
Oracle Solaris Live Upgrade Document Index [ID 1364077.1]

Sabtu, 25 Februari 2012

How to install Solaris 10 using JET (Jumpstart Enterprise Toolkit) (SUNWjet) (Jumpstart)

in Jumpstart server
=====================
* Install SUNWjet
Copy JET-EIS.pkg.bz2 to the server (e.g. into /tmp).
#cp /tmp/JET-EIS.pkg.bz2
Unpack JET-EIS.pkg.bz2 file
#bunzip2 JET-EIS.pkg.bz2
install JEPT.pkg
#pkgadd -d JET.pkg 20

* setup NFS server
* edit file /etc/dfs/dfstab, below detail :
share -F nfs -o ro,anon=0 -d "JET Framework" /opt/SUNWjet
share -F nfs -o ro,anon=0
share -F nfs -o ro,anon=0
share -F nfs -o ro,anon=0 /export/install
* enable nfs server
#svcadm enble /network/nfs/server
* setup client
#cd /opt/SUNWjet/bin
#./copy_solaris_media -d target_dir -n osname media_dir
ex: #./copy_solaris_media -d /data/media -n sol10u20 /cdrom/cdrom0
#./make_template -A -E
ex: #./make_template -A sun4u -E 0:21:33:22:11:e M5000
note : see mac address client in ok prompt with command "banner"
* go to /opt/SUNWjet/Template
* edit template
ex : vi ../Template/M5000
* insert : IP address client dan hostnamenya di /etc/hosts ---> netmask should be same with IP server (infcofing -a)
* go to directory /opt/SUNWjet/bin
#./make_client
ex : #./make_client M5000
successfully if :
-->passed




in Client
==========

* In ok promt :
set value property "local-mac-address? false"
ok> setenv local-mac-address? false
set value property "auto-boot> false"
ok> setenv auto-boot? false

* For instalation process, type command below:
ok> boot net - install

Minggu, 08 Mei 2011

how to set turn off expiry user password UNIX

example :

root@a1zursum01 # passwd -x 99999 ys061114
passwd: password information changed for ys061114


root@a1zursum01 # logins -x -l ys061114
ys061114 1100 other 1 Yudhya Sudarmadi,SA, 26-April 2010
/export/home/ys061114
/usr/bin/bash
LK 082410 7 99999 7

command to view user information in Unix

command to view user information .

#logins -x -l (user_name) will show the details

example :

root@a1zursum01 # logins -x -l ys061114
ys061114 1100 other 1 Yudhya Sudarmadi,SA, 26-April 2010
/export/home/ys061114
/usr/bin/bash
LK 082410 7 42 7

Minggu, 28 November 2010

Setup Network Configuration in Zone


· Plumb NIC network for zone

global# ifconfig e1000g1 plumb

global# zonecfg -z zone1

zonecfg:zone1> add net

zonecfg: zone1:net> set physical=e1000g1 <------ set physical network

zonecfg: zone1:net> set address=192.168.0.43 <------ set network address

zonecfg: zone1:net> set defrouter=192.168.0.2 <------ set default router address

zonecfg: zone1:net> end

zonecfg: zone1> verify

zonecfg: zone1> commit

· list of configuration

zonecfg: zone1> info

zonename: zone1

zonepath: /test1/zone1

brand: native

autoboot: true

bootargs:

pool:

limitpriv:

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

fs:

dir: /etc/passwd

special: /etc/passwd

raw not specified

type: lofs

options: [ro]

fs:

dir: /etc/shadow

special: /etc/shadow

raw not specified

type: lofs

options: [ro]

net:

address: 192.168.0.43

physical: e1000g1

defrouter: 192.168.0.2

how to boot and halt the zone

• how to boot zone
Global# zoneadm -z zone1 boot

• list zone was booted
global # zoneadm list -cv

ID NAME STATUS PATH BRAND IP
0 global running / native shared
1 zone1 running /test1/zone1 native shared <---- status zone was booted

• how to halt the zone global
# zoneadm -z zone1 halt

• list zone was halted
global # zoneadm list -cv

ID NAME STATUS PATH BRAND IP
0 global running / native shared
- zone1 installed /test1/zone1 native shared <---- status zone was halted

How to Create Simple Zone


• Create directory for zonepath
global# mkdir /test1/zone1

• Change mode for 700
global# chmod 700 /test1/zone1

• Create zone
global# zonecfg -z zone1
zone1: No such zone configured
Use 'create' to begin configuring a new zone.
zonecfg:zone1> create
zonecfg:zone1> set autoboot=true
zonecfg:zone1> set zonepath=/test1/zone1
zonecfg:zone1> verify
zonecfg:zone1> commit
zonecfg:zone1> exit

• list zone was created
global# zoneadm list -cv
ID NAME STATUS PATH BRAND IP
0 global running / native shared
- zone1 configured /test1/zone1 native shared <--- status zone was configured

• Install O/S in zone
global# zoneadm -z zone1 install
Waiting for up to <300> seconds for zone administration commands to become available (another user is administering zones)
Preparing to install zone
.
Creating list of files to copy from the global zone.
Copying <2922> files to the zone.
Preparing to initialize <1104> packages on the zone.
Initializing zone product registry.
Determining zone package initialization order.
Initializing package <723> of <1104>: percent complete: 65%

--------> wait until 100% and next process when finish wil appear below message

Initialized <1104> packages on zone.
Zone
is initialized.
Installation of <2> packages was skipped.
The file

· list zone was installed

global # zoneadm list -cv

ID NAME STATUS PATH BRAND IP

0 global running / native shared

- zone1 installed /test1/zone1 native shared <---- status zone was installed

----> After installation login as console


global # zlogin -C zone1
[Connected to zone 'zone1' console]

You did not enter a selection.
What type of terminal are you using?
1) ANSI Standard CRT
2) DEC VT52
3) DEC VT100
4) Heathkit 19
5) Lear Siegler ADM31
6) PC Console
7) Sun Command Tool
8) Sun Workstation
9) Televideo 910
10) Televideo 925
11) Wyse Model 50
12) X Terminal Emulator (xterms)
13) CDE Terminal Emulator (dtterm)
14) Other
Type the number of your choice and press Return: 3
Creating new rsa public/private host key pair
Creating new dsa public/private host key pair
Configuring network interface addresses:.
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.

-------> and then will appear below message

A host name must have at least one character; it can contain letters,
digits, and minus signs (-).


Host name zone1-lab


────────────────────────────────────────────────────────────────────────────────
Esc-2_Continue Esc-6_Help

----------> press ESC+2

─ Time Zone ────────────────────────────────────────────────────────────────────

On this screen you must specify your default time zone. You can specify a
time zone in three ways: select one of the continents or oceans from the
list, select other - offset from GMT, or other - specify time zone file.

> To make a selection, use the arrow keys to highlight the option and
press Return to mark it [X].


Continents and Oceans
──────────────────────────────────
- [ ] Africa
│ [ ] Americas
│ [ ] Antarctica
│ [ ] Arctic Ocean
│ [ ] Asia
│ [ ] Atlantic Ocean
│ [ ] Australia
│ [ ] Europe
v [ ] Indian Ocean

────────────────────────────────────────────────────────────────────────────────
Esc-2_Continue Esc-6_Help

----> choose the time zone and press ESC+2

─ Country or Region ────────────────────────────────────────────────────────────

> To make a selection, use the arrow keys to highlight the option and
press Return to mark it [X].


Countries and Regions
────────────────────────
^ [ ] Azerbaijan
│ [ ] Bahrain
│ [ ] Bangladesh
│ [ ] Bhutan
│ [ ] Brunei
│ [ ] Cambodia
│ [ ] China
│ [ ] Cyprus
│ [ ] East Timor
│ [ ] Georgia
│ [ ] Hong Kong
│ [ ] India
v [X] Indonesia

────────────────────────────────────────────────────────────────────────────────
Esc-2_Continue Esc-6_Help

------> choose the region and press ESC+2

─ Time Zone ────────────────────────────────────────────────────────────────────

> To make a selection, use the arrow keys to highlight the option and
press Return to mark it [X].


Time zones
─────────────────────────────────────────────────────────────────
[X] Java & Sumatra
[ ] west & central Borneo
[ ] east & south Borneo, Celebes, Bali, Nusa Tengarra, west Timor
[ ] Irian Jaya & the Moluccas


────────────────────────────────────────────────────────────────────────────────
Esc-2_Continue Esc-6_Help

-----> choose the time zones and pres ESC+2

─ Confirm Information ──────────────────────────────────────────────────────────

> Confirm the following information. If it is correct, press F2;
to change any information, press F4.


Time zone: Java & Sumatra
(Asia/Jakarta)


────────────────────────────────────────────────────────────────────────────────
Esc-2_Continue Esc-4_Change Esc-6_Help

------> confirmed and press ESC+2

─ Confirm Information ──────────────────────────────────────────────────────────

> Confirm the following information. If it is correct, press F2;
to change any information, press F4.


Time zone: Java & Sumatra
(Asia/Jakarta)


────────────────────────────────────────────────────────────────────────────────
Esc-2_Continue Esc-4_Change Esc-6_Help

-----> press ESC+2

─ Root Password ────────────────────────────────────────────────────────────────

Please enter the root password for this system.

The root password may contain alphanumeric and special characters. For
security, the password will not be displayed on the screen as you type it.

> If you do not want a root password, leave both entries blank.

Root password: ********
Root password: ********

────────────────────────────────────────────────────────────────────────────────
Esc-2_Continue Esc-6_Help

-------> give root password and press ESC+2

System identification is completed.

rebooting system due to change(s) in /etc/default/init

[NOTICE: Zone rebooting]

SunOS Release 5.10 Version Generic_120011-14 64-bit
Copyright 1983-2007 Sun Microsystems, Inc. All rights reserved.
Use is subject to license terms.
Hostname: zone1-lab

zone1-lab console login:
zone1-lab console login: root
Password:
Nov 22 14:05:16 zone1-lab login: ROOT LOGIN /dev/console
Last login: Mon Nov 22 13:49:58 on pts/4
Sun Microsystems Inc. SunOS 5.10 Generic January 2005
#



========================================================
Zone States
Zone state information can be viewed with zoneadm list -iv from the global zone. Non-global zones have one of the following states:
• configured: Configuration complete and in stable storage.
• incomplete: Installation or uninstallation underway
• installed: Configuration instantiated on system. Zone has no associated virtual platform.
• ready: Virtual platform established, zsched started, IPs plumbed, filesystems mounted, zone ID assigned. No zone processes started yet.
• running: This state entered when zone init process starts.
• shutting down: Zone being halted.
• down: Transitional state during zone shutdown.
Zone Control Commands
The following control commands can be used to manage and monitor transitions between states:
• zlogin options zone-name
• zoneadm -z zone-name boot
• zoneadm -z zone-name halt
• zoneadm -z zone-name install
• zoneadm -z zone-name ready
• zoneadm -z zone-name reboot
• zoneadm -z zone-name uninstall
• zoneadm -z zone-name verify
• zonecfg -z zone-name: Interactive mode; can be used to remove properties of the following types: fs, device, rctl, net, attr
• zonecfg -z zone-name commit
• zonecfg -z zone-name create
• zonecfg -z zone-name delete
• zonecfg -z zone-name verify