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…
#!/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.
Discuss This Article
Post Tags (user submitted): metadb (110) - t (99) - prtvtoc fmthard (86) - solaris metadb (60) - metadb solaris (35) - metainit hsp001 (33) - solaris prtvtoc fmthard (32) - metadb "not found" (31) - clear metadb (26) - sun + metadb (24) - metadb clear (19) - metadb -p (15) - metainit raid-10 (15) - metadb sun (13) - metadb in solaris (12) - solaris 10 metadb (11) - metadb problem (11) - metadb partition (10) - prtvtoc fmthard solaris (10) - how to clear metadb (10) - metadb prtvtoc (9) - metadb metainit (9) - metadb : is mounted on (9) - metastat: not found (9) - metadb RAID (9) - prtvtoc metadb (8) - metadb solaris 10 (8) - solaris (7) - metadb problems (7) - solaris x86 metadb (7) - metadb howto (7) - hsp001: is empty (7) - solaris 9 metadb (7) - solaris metadb slice (7) - all (6) - metadb fmthard (6) - metadb -M (6) - solaris 10 create metadb (6) - solstice (5) - metadb mirroring (5) - fmthard solaris (5) - solaris fmthard prtvtoc (5) - what is metadb (5) - metadb raid 5 (5) - metadb x86 (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) - prtvtoc+fmthard (4) - Solaris metadb prtvtoc (4) - metainit raid10 (4) - metadb, solaris 9 (4) - fmthard in solaris (4) - metadb prtvtoc fmthard (4) - mss (4) - Clear metadb in Solaris (4) - metadb solaris 8 (4) - clearing metadb (4) - metadb syntax (4) - metadb -d (3) - solaris prtvtoc (3) - solaris metainit (3) - solaris "raid 10" metainit (3) - solaris metainit "raid 10" (3) - fmthard (3) - prtvtoc in solaris (3) - solaris 9 fmthard (3) - "raid 10" metainit (3) - solaris metadb metainit (3) - V240 RAID (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) - sun v240 disk mirror (3) - solaris x86 prtvtoc fmthard (3) - prtvtoc solaris (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 9 prtvtoc (2) - prtvtoc solaris fmthard (2) - SunFire V240 RAID (2) - solaris metadb -a (2) - raid10 solaris (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 x86 metadb reboot (2) - metadb on solaris (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) - multiple metadb solaris (2) - "metadb -a -f" (2) - metadb mirror disk (2) - metadb panic (2) - solaris metadb M (2) - metadb mirror solaris 10 (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) - create metadb solaris 10 (2) - metadb syntax in solaris (2) - solstice prtvtoc (2) - fmthard solaris 9 (2) - solaris metadb create (2) - metadb: not found solaris (2) - solaris clear metadb (2) - clearing metadb in solaris (2) - metadb -c (2) - prtvtoc mirror (2) - solaris mirror metadb (2) - slice for metadb (2) - solaris raid1 metadb (2) - solaris metadb copy (2) - create metadb -c -a (2) - metadb partition copy (2) - solaris 8 metastat (2) - mirrorme sh (2) -
[...] 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 [...]