Summary: Retaining Meta Database When Upgrading Solaris

From: Gregory M Polanski (gmp@adc.com)
Date: Mon Jun 30 1997 - 13:48:49 CDT


Thanks to 'Thomas Jordan, thomas.jordan@east.sun.com' who provided
enough information to help me find the problem.

metastat -p showed the old interleave to be 1008b and the NEW
interleave at 32b !!

When I explicitly set the interleave to match that of the old system
and the data was easily found. I had been concerned about preserving
the metadb. This worry was completely unnecessary. metainit does NOT
damage the data when the new parameters match the old.

Thomas also cautioned me to be aware the controllers and disks may
renumber themselves when boot -r is done. He was correct. Controller
#3 became c2 and conversely c2 became c3 when I installed the OS and
boot -r.

SUMMARY STEPS

1. metastat -p > file that you save
1.1 metadb >> file that you save
2. back up EVERYTHING
3. Install solaris 2.5.1 and On-Line Disk Suite
4. Install Patches, SUNWmd patch 102580-16
5. Check md.tab and disks to assure that controllers
        and disks did not renumber
5. metadb -a -f metadb list
6. metainit with EXPLICIT INTERLEAVE to match that of old system
7. fsck /dev/md/dsk/....
8. mount ...

The old version was SunSoft's Online: DiskSuite, 3.0,REV=1.1
The new verison is Solstice DiskSuite, 4.0,REV=1.0

The misleading documentation follows:

mustang% man md.tab
Reformatting page. Wait... done
 
MD.TAB(4) File Formats MD.TAB(4)
 
 ...
     -i size
          Specifies the interlace value for stripes (or segment
          size for RAID). ...
                                                   If size is not
          specified, the size defaults to the cylinder size of
          the first disk in the stripe.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Example Of 32b as default

(2)% /usr/opt/SUNWmd/sbin/metastat -p
d3 -m d1 d2 1
d1 1 4 c1t0d0s3 c1t1d0s3 c3t2d0s3 c3t3d0s3 -i 32b
d2 1 4 c2t0d0s3 c2t1d0s3 c2t2d0s3 c2t3d0s3 -i 32b

(4)% egrep "^d" /etc/opt/SUNWmd/md.tab
d1 1 4 /dev/dsk/c1t0d0s3 /dev/dsk/c1t1d0s3 /dev/dsk/c3t2d0s3 /dev/dsk/c3t3d0s3
d2 1 4 /dev/dsk/c2t0d0s3 /dev/dsk/c2t1d0s3 /dev/dsk/c2t2d0s3 /dev/dsk/c2t3d0s3
d3 -m d1 d2
All 8 disks have 560 sectors per cylinder as shown by prtvtoc

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Thomas Jordan email: thomas.jordan@east.sun.com

> OK, I've done this before and here are the steps I used:
>
> 1. metastat -p >file
>
> save it and print a hardcopy
>
> 2. for each disk controller make sure you know where it maps to
>
> ls -l /dev/dsk/c*s2 will show the mappings. Remember when you build from
> scratch
>
> the controllers will not neccessarily match what they were before.
>
> save hardcopy of this output
>
> 3. metadb >file
>
> save it and print a hardcopy
>
> 4. build your server
>
> 5. if you have any mirrored devices, strip out all but the primary from
> your
> saved metastat output
>
>
> 6. initialize your metadbs
>
> 7. copy edited file to /etc/opt/SUNWmd/md.tab
>
> 8. metainit -n to make sure it's clean.
>
> 9. metainit each device
>
> 10. metattach 2nd half of mirrors
>
>
> Chances are the devices will come back in the same place, so all you
> really need to do is a metastat -p and save it.
> Re-do your system, initialize the new metadb's, put the metastat -p
> output
> into /etc/opt/SUNWmd/md.tab and reboot. The steps above are for more
> complicated systems, but if you follow them they'll work. You don't
> even
> have to reboot, after you put the metatab back you can just metainit d1,
> etc...
>
> Tom
>
>
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> Thomas Jordan email: thomas.jordan@east.sun.com
>

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Other Responders:

Tim Evans tkevans@eplrx7.es.dupont.com

> I did an upgrade. I only uncommented the vfstab entries after the
> upgrade completed and I did a reconfig reboot (boot -r) with the
> disk turned on.
>
> I then just manually mounted the meta filesystem.
>

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Matthew Lee Stier Matthew.Stier@tddny.fujitsu.com

> There is no need to. As long as you are still using the same (major)
> version of SDS (ODS), you should be able to:
>
> Unmount the metadevices,
> Clear the metadevices
> Delete the meta databases
> Remove any patches
> Remove the software
> Upgrade the operating system
> Reload the software
> Re-apply any applicable patches
> Recreate the meta databases
> Recreate the metadevices
> Run 'fsck' to check them
> Remount the metadevices
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Thomas FRANK thomas.frank@shraero.co.at

        Was successful with graphic tool.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

ORIGINAL PROBLEM

> I am upgrading a set of SPARC 1000's running On-Line DiskSuite
> from Solaris 2.4 to Solaris 2.5.1.
>
> How Do I get the new ODL to recognize the meta database
> from the current ODL?
>
> Details:
>
> 1. Solaris 2.4
> % uname -a
> SunOS xx 5.4 Generic_101945-41 sun4d sparc
>
> % pkginfo -x SUNWmd
> SUNWmd Online: DiskSuite
> (all) 3.0,REV=1.1
>
> 2. All database information is in separate 1 or 2 cyl
> disk partitions.
> % metadb
> flags first blk block count
> a m pc luo 16 1034 /dev/dsk/c0t2d0s1
> a pc luo 16 1034 /dev/dsk/c0t3d0s1
> a pc luo 16 1034 /dev/dsk/c3t0d0s3
> a pc luo 16 1034 /dev/dsk/c3t1d0s3
> a pc luo 16 1034 /dev/dsk/c3t2d0s3
> a pc luo 16 1034 /dev/dsk/c3t3d0s3
> a pc luo 16 1034 /dev/dsk/c4t12d0s3
> a pc luo 16 1034 /dev/dsk/c4t13d0s3
> a pc luo 16 1034 /dev/dsk/c4t14d0s3
> a pc luo 16 1034 /dev/dsk/c4t15d0s3
>
> 3. Procedure:
> ufsdump level 0 all partitions
> Solaris 2.5.1 install, overwriting or defining partitions
> /, /usr, /opt, /var
>
> 4. Failed metadb recovery
> a. modify /etc/system to have same SUNWmd mods as before
> * Begin MDD database info (do not edit)
> set md:mddb_bootlist1="sd:17:16 sd:25:16 sd:235:16 sd:483:16 sd:491:16"
> set md:mddb_bootlist2="sd:499:16 sd:203:16 sd:211:16 sd:219:16
> sd:227:16"
> * End MDD database info (do not edit)
>
> b. Restore /etc/opt/SUNWmd/*, (md.cf md.tab mddb.cf)
>
> c. metadb returns "No databases defined"
> metadb -p does not have any effect either.
>
> 5. Brute Force Recovery
> a. metadb -a -f ..... to redefine database
> b. metainit ..... Recreate information in metadb
> c. newfs ....
> d. ufsrestore ...
>
>
> I would like to just continue to use the ODL partitions that are
> undisturbed by the upgrade.
>
> Any ideas?
>
>
> greg
>
> _______________________________________________________________
> Greg Polanski greg_polanski@adc.com
> ADC Telecommunications
> MS 254 612-946-2270
> 4900 West 78-th St 612-946-3910 FAX
> Bloomington, MN 55435 612-580-6873 Pager
> _______________________________________________________________
>
>



This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:11:58 CDT