Professional Documents
Culture Documents
NOTE: Please find the following as an example only. You may have some restrictions that will not allow
you to follow all step and could lead you to a very bad situation.
Assumption:
metastat -p
d0 -m d10 d20 1
d10 1 1 c1t0d0s3
d20 1 1 c1t1d0s3
d1 -m d11 d21 1
d11 1 1 c1t0d0s1
d21 1 1 c1t1d0s1
d2 -m d12 d22 1
d12 1 1 c1t0d0s0
d22 1 1 c1t1d0s0
vfstab:
/dev/md/dsk/d1 - - swap - no -
/dev/md/dsk/d0 /dev/md/rdsk/d0 / ufs 1 no logging
/dev/md/dsk/d2 /dev/md/rdsk/d2 /var ufs 1 no logging
Preparation:
- You can use my SOLARIS_patch-infoprep to gather SVM information before doing the patch.
1. Make sure that you have a full backup of all filesystems. In case you corrupt your filesystems, you have
the option to revert the server to its working state using the backup copy. Having the latest "explorer"
output is good to have too.
2. Verify that the server is in good state before patching by doing a normal reboot of server.
4. Detach the mirror copies. In case you corrupt your filesystems, you have the option to revert the server
to its working state using the mirror copies.
# metadetach d20
# metadetach d21
# metadetach d22
5. Check the integrity of the detached mirror copies except for swap mirror. Fix any data errors, at your
own risk :)
6. Edit the vfstab and system files of the mirror copy. This is a necessary step in order for the server to
mount the mirror filesystems properly.
8. After boot-up, verify the state of the filesystems (single-copy). Make sure that no software/hardware
issue were detected before proceeding to the next step.
10. After boot-up, verify the state of the mirror disk. Make sure that no software/hardware issue were
detected before proceeding to the next step.
Start Patching
12. After boot-up, verify the state of the filesystems (single-copy). Make sure that no software/hardware
issue were detected before proceeding to the next step.
14. Reboot the server to check the current server after patching.
16. DONE
When the patching goes bad
Option 1: Revert back the system state using the mirror copy
2. After boot-up, verify the state of the mirror disks. Make sure that no software/hardware issue were
detected before proceeding to the next step.
# dumpadm -d /dev/md/dsk/d21
# metaclear d0
# metaclear d1
# metaclear d2
# metainit -f d0 -m d20
# metainit -f d1 -m d21
# metainit -f d2 -m d22
# vi /etc/vfstab
/dev/md/dsk/d1 - - swap - no -
/dev/md/dsk/d0 /dev/md/rdsk/d0 / ufs 1 no logging
/dev/md/dsk/d2 /dev/md/rdsk/d2 /var ufs 1 no logging
# vi /etc/system
rootdev:/pseudo/md@0:0,0,blk
8. After boot-up, verify that the server is now using d0, d1, and d2.
9. Attach d10, d11, and d12 to sync their data with a working copy.
# metattach d0 d10
# metattach d1 d11
# metattach d2 d12
11. After sync is complete, detach d20, d21, and d22 to make d10, d11, and d12 the primary copy again.
# metadetach d20
# metadetach d21
# metadetach d22
# dumpadm -d /dev/md/dsk/d1
14. After boot-up, verify that the server is still using d0, d1, and d2.
# df -k / /var (Must reflect d0 and d2)
# swap -l (Must reflect d1)
# iostat -En
15. Attach d20, d21, and d22 to complete the mirroring again.
# metattach d0 d20
# metattach d1 d21
# metattach d2 d22