UPDATE TO “Solaris Disk Partition Layout & Mirroring Scripts“
Several Months ago, I tried to use my old mirroring scripts on a new Solaris 9 install. I found that the the kernel would panic upon reboot because it was unable to mount /. I tried many things, including opening a support call with Sun. They reviewed my scripts and said that they should work, but despite repeated tries, they did not.
In the end, I created only one metadb partition instead of two, and found that the system would boot. I attributed this to a problem with the mirror disk, until it happened to me again this week. For some reason, the implementation of Disk Suite on Solaris 9 does not accept multiple metadb partitions.
Previously, in Solaris 8, I always created a total of four metadb partitions. Two on each drive…
#!/bin/sh
#Mirrorme.sh
prtvtoc /dev/rdsk/c1t0d0s2 | fmthard -s - /dev/rdsk/c1t1d0s2
metadb -a -f -c2 /dev/dsk/c1t0d0s3 /dev/dsk/c1t1d0s3
metadb -a -f -c2 /dev/dsk/c1t0d0s4 /dev/dsk/c1t1d0s4
Currently, with Solaris 9, that method does not work, and results in a kernel panic. To resolve this issue, you must create only one metadb partition on each disk. I’ve been using s3 for this, although you could use any slice you wish.
#!/bin/sh
#Mirrorme.sh
prtvtoc /dev/rdsk/c1t0d0s2 | fmthard -s - /dev/rdsk/c1t1d0s2
metadb -a -f -c2 /dev/dsk/c1t0d0s3 /dev/dsk/c1t1d0s3
Aside from this change, the mirroring scripts continue to work. Please let me know if you find any other problems not mentioned.

[...] UPDATED “Problems With Multiple MetaDB Partitions” [...]
You say:
“To resolve this issue, you must create only one metadb partition on each disk. I’ve been using s2 for this, although you could use any slice you wish.”
but I think you mean s3.
Have slightly different setup to you.
bash-2.05# df -k
Filesystem kbytes used avail capacity Mounted on
/dev/dsk/c1t1d0s0 2497231 1857711 589576 76% /
/proc 0 0 0 0% /proc
mnttab 0 0 0 0% /etc/mnttab
fd 0 0 0 0% /dev/fd
swap 3858776 40 3858736 1% /var/run
swap 3859168 432 3858736 1% /tmp
/dev/dsk/c1t1d0s3 10084613 10566 9973201 1% /opt
/dev/dsk/c1t1d0s4 18151018 1030001 16939507 6% /ora
/dev/dsk/c1t1d0s7 1986263 60918 1865758 4% /export/home
Have installed metadbs on slice 5 as follows:
prtvtoc /dev/rdsk/c1t1d0s2 | fmthard -s - /dev/rdsk/c1t2d0s2
metadb -a -f -c2 /dev/dsk/c1t1d0s5 /dev/dsk/c1t2d0s5
metainit -f d10 1 1 c1t1d0s0
metainit d20 1 1 c1t2d0s0
metainit d30 -m d10
metaroot d30
So far so good for the root partition.
I am not clear of what specifying the hsp001 on the last filesystem does. Is is needed to terminate the list? I guess i need to read the man pages a few more times - but perhaps you could clarify?
TIA
# /opt filesystem:
metainit -f d14 1 1 c1t0d0s7
metainit d24 1 1 c1t1d0s7
metainit d34 -m d14
metainit hsp001
I’m glad to hear things are going well so far.
Metainit hsp001 is really an optional step. It creates an empty hot spare pool and gets rid of an annoying warning on boot. If you don’t mind seeing the warning, you can just skip this step.
“but I think you mean s3.”
Indeed, I did mean to write s3… Thanks for the correction.
[...] you can see, I like to leave partiton 3 and (4 UPDATED “Problems With Multiple MetaDB Partitions“) reserved to the meta databases required by Solstice Disk Suite. I also like to get the swap [...]
i am metadb created ,intel machine ,i am comand using
metadb -a-f c0d0s0 .enter the command not created .
this problem metadb:smartadmin:c0d0s0:is mounted on /
why are you problem please tele me