Problems With Multiple MetaDB Partitions

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…

prtvtoc /dev/rdsk/c1t0d0s2 | fmthard -s – /dev/rdsk/c1t1d0s2
metadb -a -f -c3 /dev/dsk/c1t0d0s3 /dev/dsk/c1t1d0s3
metadb -a -f -c3 /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.

prtvtoc /dev/rdsk/c1t0d0s2 | fmthard -s – /dev/rdsk/c1t1d0s2
metadb -a -f -c3 /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.

9 thoughts on “Problems With Multiple MetaDB Partitions

  1. Pingback: » Solaris Disk Partition Layout & Mirroring Scripts

  2. 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.

  3. 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?

    # /opt filesystem:
    metainit -f d14 1 1 c1t0d0s7
    metainit d24 1 1 c1t1d0s7
    metainit d34 -m d14
    metainit hsp001

  4. 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.

  5. Pingback: Solaris Disk Partition Layout & Mirroring Scripts | IDGLabs.COM - tips, tools and resource

  6. 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

  7. @lakshmanan – you need a dedicated partition for your metadb, normally s7, this article shows using s3, though that is usually used for swap.

    Regarding the method, there is no need to repeat the path to the device – this is the normal syntax:

    metadb -a -c3 -f /dev/dsk/c1t0d0s3

    metadb -a -c3 -f /dev/dsk/c1t1d0s3

    (3 copies is generally seen as the norm)

  8. I’ve updated this post to reflect 3 metadb copies. Also, I tend to use s1 for swap since it’s closer to the center of the disk and generally performs better than higher numbered slices.

Leave a Reply