Wednesday, June 7, 2006

How to mirror disk using SVM

1. Make sure that there is atleast one free partition for meta database in disk where solaris is installed. Minimum 10MB of free space is required.

2. Create partition for meta database and label the disk.

3. make second drive partition table same as this one.
# prtvtoc /dev/rdsk/c0t1d0s2 | fmthard -s - /dev/rdsk/c0t2d0s2

4. Create metastat database
# metadb -a -c 3 -f c0t1d0s7 c0t2d0s7
-------c 3 creates three copies of the metastat database in this space

5. Initialize the root partition
# metainit -f d11 1 1 c0t1d0s0
# metainit -f d12 1 1 c0t2d0s0

6. Create the mirror
# metainit d10 -m d11

7. Update /etc/system and /etc/vfstab using metaroot
# metaroot d10

8. Reboot the system

9. Attach the other half of mirror
# metattach d10 d12

10. Change eeprom values for boot-device and use-nvramrc

11. If two internal drives are mirrored then modify /etc/system to bypass SVM Quorum rule
set md:mirrored_root_flag = 1

12. Install boot blocks on mirrored disk.
installboot /usr/platform/`uname -i`/lib/fs/ufs/bootblk /dev/rdsk/c0t2d0s0

13. Now in the same way mirror other partitions.

14. Keep a copy of configuration after all partitions are mirrored.
# metastat -p > /etc/lvm/

No comments:

Post a Comment