Solaris 10 kernel patching procedure - SVM mirrored disk
Preparation:
- Collect basic command outputs for easy reference
- Collect the latest explorer output
- Make sure that you have a full backup of all file systems.
- Download the Recommended OS Patchset Solaris 10 SPARC
- unzip the Patchset in /root
Tasks:
- Preform a Sanitary reboot
- Boot the server from both disks before breaking the mirror
- Break the mirror, detatch the secondary disk from SVM
- Boot the server from secondary disk without svm (sliced disk)
- Boot the server from primary disk
- Boot the server from primary disk in single user mode
- Install the patches
- If patching is success, Attach the secondary disk to mirror
- If patching fails, Boot the server from secondary disk and create mirror
Disk c1t0d0 and c1t1d0 are in SVM mirror
1. Verify that the server is in good state before patching by performing a normal reboot of server.
A clean reboot is required and verify no software/hardware issues were detected before proceeding
shutdown -i6 -y -g0
2. Install bootblocks in both disk partition
installboot /usr/platform/`uname –i`/lib/fs/ufs/bootblk /dev/rdsk/c1t0d0s0
installboot /usr/platform/`uname –i`/lib/fs/ufs/bootblk /dev/rdsk/c1t1d0s0
3. Make sure from which disk the server is booted
prtconf -vp | grep bootpath
This server is booted from disk c1t0d0
4. Bring down the server to OBP Prompt.
Boot the server in rootdisk and rootmirror disk
init 0
devalias
boot rootmirror
5. After successful boot, bring down the server to OBP and boot through rootdisk disk
init 0
boot rootdisk
6. metadevice outputs as follows
root@Judi-dev-01 # metastat -c
d20 m 12GB d21 d22
d21 s 12GB c1t0d0s1
d22 s 12GB c1t1d0s1
d10 m 124GB d11 d12
d11 s 124GB c1t0d0s0
d12 s 124GB c1t1d0s0
root@Judi-dev-01 #
root@Judi-dev-01 # metadb
flags first blk block count
a m p luo 16 8192 /dev/dsk/c1t0d0s7
a p luo 8208 8192 /dev/dsk/c1t0d0s7
a p luo 16400 8192 /dev/dsk/c1t0d0s7
a p luo 16 8192 /dev/dsk/c1t1d0s7
a p luo 8208 8192 /dev/dsk/c1t1d0s7
a p luo 16400 8192 /dev/dsk/c1t1d0s7
root@Judi-dev-01 #
If any one of the above steps failed, Stop proceeding further and fix the issue
7. After successful boot, detatch the rootmirror
metadetach d20 d22
metadetach d10 d12
8. Clear the metadevice
metaclear d22
metaclear d12
9. Delete the metadb from secondary disk
metadb -d /dev/dsk/c1t1d0s7
10. Mount rootmirror/secondary disk's s0 slice to change the configuration.
The change will allow to boot the server in sliced mode
mount /dev/dsk/c1t1d0s0 /mnt
cp -p /mnt/etc/vfstab /mnt/etc/vfstab.`date +%d-%b-%Y-%H-%M-%S`
cp -p /mnt/etc/system /mnt/etc/system.`date +%d-%b-%Y-%H-%M-%S`
11. Edit the /mnt/etc/vfstab and modify the dsk / rdsk path to slised mode
#/dev/md/dsk/d20 - - swap - no -
#/dev/md/dsk/d10 /dev/md/rdsk/d10 / ufs 1 no logging
/dev/dsk/c1t1d0s1 - - swap - no -
/dev/dsk/c1t1d0s0 /dev/rdsk/c1t1d0s0 / ufs 1 no logging
12. Edit the /mnt/etc/system file and remove the entry related to SVM mirror
* Begin MDD root info (do not edit)
rootdev:/pseudo/md@0:0,10,blk
set md_mirror:md_resync_bufsz = 2048
set md:mirrored_root_flag = 1
* End MDD root info (do not edit)
13. un mount the slice s0
umount /mnt
14. Bring down the server to OBP
init 0
15. Boot the server using sliced disk without SVM
boot rootmirror
16. After successful boot, reboot the server in rootdisk (SVM disk) and install the patch
init 0
boot rootdisk -s
cd 10_Recommended
./installpatchset --s10patchset
17. Once the patch installation completed reboot the server
init 6
18. Verify the server is updated with latest kernel version
uname -a
19. Once application / Database team confirms that there is no issues with the new patches
Attach the rootmirror disk with rootdisk
metainit -f d12 1 1 c1t1d0s1
metainit -f d22 1 1 c1t1d0s0
metattach d10 d12
metattach d20 d22
Once the sync completes reboot the server once
Back-out Procedure:
If the server fails to boot from the patched disk (rootdisk) or Application team want to revert the changes
1. Reboot the server from rootmirror disk with old kernel version
init 0
boot rootmirror
2. Create mirror with rootdisk
prtvtoc /dev/rdsk/c1t1d0s2 | fmthard -s - /dev/rdsk/c1t0d0s2
metadb -afc 3 c1t0d0s7 c1t1d0s7
metainit -f d12 1 1 c1t1d0s1
metainit -f d11 1 1 c1t0d0s1
cp /etc/vfstab /etc/vfstab.`date +%d-%b-%Y-%H-%M-%S`
metaroot d10
3. Check the /etc/system file, you will find an extra line
rootdev:/pseudo/md@0:0,10,blk
4. Find the entry for root filesystem replaced with metadevice like below
/dev/md/dsk/d10 /dev/md/rdsk/d10 / ufs 1
5. Add the below entry in the /etc/system, This enable the server to boot from a single disk in case of disk failure
set md:mirrored_root_flag = 1
6. Add the below entry in the /etc/system, this will perform fast sync
set md_mirror:md_resync_bufsz = 2048
7. reboot the system
shutdown -i6 -g0 -y
8. after reboot attach the other sub-mirror
metattach d10 d11
9. Create metadevice for swap partition
metainit -f d22 1 1 c1t1d0s0
metainit -f d21 1 1 c1t0d0s0
metainit d20 -m d22
metattach d20 d21
10. Change the /etc/vfstab entry manually for the swap to metadevice instead of sliced swap
#/dev/dsk/c1t0d0s1 - - swap - no -
#Change with below
/dev/md/dsk/d20 - - swap - no -
11. Verify the swap is using slice or metadevice,
swap -l
12. If the swap uses sliced device change to metadevice
swap -d /dev/dsk/c1t0d0s1
swap -a /dev/md/dsk/d20
13. Set the swap as the dump device
dumpadm -d swap
14. Install bootblocks in both disk partition
installboot /usr/platform/`uname –i`/lib/fs/ufs/bootblk /dev/rdsk/c1t0d0s0
installboot /usr/platform/`uname –i`/lib/fs/ufs/bootblk /dev/rdsk/c1t1d0s0
Once the sync completes, reboot the server once
Set the OBP parameters from OS
ls -l /dev/dsk/c1t0d0s0
ls -l /dev/dsk/c1t1d0s0
eeprom "nvramrc=devalias rootdisk /devices/pci@1c,600000/scsi@2/sd@0,0:a rootmirror /devices/pci@1c,600000/scsi@2/sd@1,0:a"
eeprom boot-device="rootdisk rootmirror"
eeprom "use-nvramrc?=true"
Set the OBP parameters from OBP
nvalias rootdisk /devices/pci@1c,600000/scsi@2/sd@0,0:a rootmirror /devices/pci@1c,600000/scsi@2/sd@1,0:a
setenv boot-device rootdisk mirrordisk
~
Solaris 10 patching procedure with backout
Solaris 10 patching with backout procedure
Solaris 10 patching procedure - SVM mirrored disk
-
~Judi~
Comments are welcome :)
No comments:
Post a Comment