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

    This entry was posted on Friday, September 9th, 2005 at 10:26 am and is filed under Data and Technology. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.
  • 7 Comments

    Take a look at some of the responses we've had to this article.

    1. [...] UPDATED “Problems With Multiple MetaDB Partitions” [...]

    2. Tom Stanley
      Posted on March 21st

      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. Posted on May 14th

      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

    4. Posted on May 15th

      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. Posted on May 15th

      “but I think you mean s3.”

      Indeed, I did mean to write s3… Thanks for the correction.

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

    7. lakshmanan
      Posted on November 28th

      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

  • Post a Comment

    Let us know what you thought.

  • Name:

    Email (required):

    Website:

    Message:

Visitors have tagged this post: metadb (120) - t (99) - prtvtoc fmthard (90) - solaris metadb (60) - metadb solaris (38) - metainit hsp001 (36) - solaris prtvtoc fmthard (34) - metadb "not found" (31) - clear metadb (27) - sun + metadb (24) - metadb clear (21) - metadb -p (16) - metainit raid-10 (15) - metadb sun (14) - metadb in solaris (12) - metadb partition (11) - prtvtoc fmthard solaris (11) - solaris 10 metadb (11) - metadb problem (11) - metadb metainit (10) - how to clear metadb (10) - metadb prtvtoc (9) - metadb solaris 10 (9) - metadb : is mounted on (9) - hsp001: is empty (9) - metastat: not found (9) - metadb RAID (9) - prtvtoc metadb (8) - solaris (7) - metadb problems (7) - solaris x86 metadb (7) - metadb howto (7) - solaris 9 metadb (7) - solaris 10 create metadb (7) - solaris metadb slice (7) - all (6) - fmthard solaris (6) - metadb fmthard (6) - solaris fmthard prtvtoc (6) - metadb -M (6) - clearing metadb (6) - solaris clear metadb (6) - solaris fmthard example (6) - solstice (5) - metadb mirroring (5) - fmthard (5) - metainit raid10 (5) - fmthard in solaris (5) - what is metadb (5) - metadb raid 5 (5) - metadb x86 (5) - metadb solaris 8 (5) - metadb slice (5) - f (5) - prtvtoc fmthard metadb (4) - solaris fmthard (4) - prtvtoc fmthard metainit (4) - solaris metadb partition (4) - solaris raid 1 metadb (4) - V240 RAID (4) - prtvtoc+fmthard (4) - Solaris metadb prtvtoc (4) - metadb, solaris 9 (4) - metadb prtvtoc fmthard (4) - mss (4) - Clear metadb in Solaris (4) - metadb syntax (4) - http://spiralbound.net/2005/09/09/problems-with-multiple-metadb-partitions (4) - metadb -d (3) - solaris prtvtoc (3) - solaris metainit (3) - solaris "raid 10" metainit (3) - solaris metainit "raid 10" (3) - prtvtoc in solaris (3) - solaris 9 fmthard (3) - "raid 10" metainit (3) - solaris metadb metainit (3) - rebuilding metadb (3) - prtvtoc and fmthard (3) - metainit problem (3) - multiple metadb (3) - sun v240 raid (3) - metadb is mounted (3) - Solaris 8 metadb (3) - DiskSuite metadb partition (3) - how to create metadb in solaris 10 (3) - create metadb partition (3) - create metadb solaris 10 (3) - sun v240 disk mirror (3) - solaris mirror metadb (3) - solaris x86 prtvtoc fmthard (3) - metainit raid 10 (3) - solaris create metadb (3) - prtvtoc solaris (2) - fmthard metainit (2) - metainit solaris 10 (2) - 3 metadb (2) - How to mirror on V240 (2) - solaris raid kernel panic (2) - metainit prtvtoc (2) - metadb not found in solaris (2) - prtvtoc (2) - sun v240 boot issue mirror (2) - create metadb (2) - V240 solaris 10 mirror panic (2) - how to create METADB (2) - solaris metainit create metadb (2) - solaris mirror fmthard prtvtoc (2) - solaris 9 prtvtoc (2) - prtvtoc solaris fmthard (2) - SunFire V240 RAID (2) - solaris metadb -a (2) - raid10 solaris (2) - prtvtoc fmthard solaris 10 (2) - partition metadb (2) - metainit "RAID 5" (2) - metadb -a in solaris (2) - create a partition for metadb (2) - problème avec metadb + Solaris 10 (2) - solaris metadb swap (2) - solaris x86 metadb reboot (2) - metadb on solaris (2) - metadb partitions (2) - prtvtoc + metainit (2) - how to create metadb in solaris (2) - solaris 8 prtvtoc (2) - "raid 10" solaris metainit (2) - multiple raid 1 solaris 10 (2) - copy metadb (2) - mirror metadb (2) - "raid 10" solaris metadb (2) - metadb s3 (2) - multiple metadb solaris (2) - "metadb -a -f" (2) - metadb mirror disk (2) - metadb panic (2) - solaris metadb M (2) - metadb mirror solaris 10 (2) - solaris9 metadb (2) - +"Solaris 10" +"Clear metadb" (2) - sun solaris metadb (2) - solaris mirror multiple disks (2) - prtvtoc fmthard s2 (2) - metadb mirror (2) - mirror disks in V240 (2) - solaris prtvtoc and fmthard (2) - solaris 10 partition for metadb (2) - metadb syntax in solaris (2) - solstice prtvtoc (2) - metadb solaris10 (2) -