unix sysadmin archives
Donation will make us pay more time on the project:

Monday, 27 June 2011

How to roll back a patch

Let's say you finally realize that the patch you have installed in your box is not doing anything good. Here is a sort roll back instruction. Hopefully you have not attached your secondary mirror yet or else it is too late for this reliever.

Note: The naming conventions defends on you SVM disks naming standards.

Mount the secondary disk

# mount /dev/dsk/cxtxdxsx /mnt

Edit system file on the secondary disk. Comment out the lines that start with rootdev and set md.

# vi /mnt/etc/system

 i.e. set md:mirrored_root_flag=1

Backup your vfstab file.
# /mnt/etc/vfstab /mnt/etc/vfstab.md

And edit the file to remove all references to /dev/md devices replacing them with the equivalent non-encapsulated devices.

Then unmount the /mnt and boot from secondary disk.
Then re-create metadevices. Destroy the original mirror and re-create the volumes.
This time the secondary disk as the primary sub-mirror.

# metaclear -r d0
# metaclear -r d6
# metainit d0 -m d20
# metainit d6 -m d26
# metaroot d0

Reboot again from secondary mirror then re-create the metadevice for the primary disk.

# metainit d10 1 1 cxtxdxs0
# metainit d16 1 1 cxtxdxs6

Then re-attach the metadevices to resync.

# metattach d0 d10
# metattach d6 d16

After the resync, your back to the original patch level.

No comments:

Post a Comment