DiskSuite changes after Solaris upgrade

Situation: a Solaris server was upgraded with Solaris Interactive Installation from Solaris 2.6 to Solaris 8. Before the upgrade, the boot disk was mirrored. During the upgrade, the boot disk had its partition table changed, so the metadevices have to be cleared and recreated to reflect the new slice sizes.

Disk c1t2d0 is the boot disk; disk c1t1d0 is the mirror disk.

# prtvtoc /dev/rdsk/c1t2d0s0 /dev/rdsk/c1t1d0s0
* /dev/rdsk/c1t2d0s0 partition map
*                          First     Sector    Last
* Partition  Tag  Flags    Sector     Count    Sector  Mount Directory
       0      2    00          0    793611    793610   /
       1      3    01    4416930   4197879   8614808
       2      5    00          0  17682084  17682083
       3      0    00    4406157     10773   4416929
       4      0    00    8614809   4197879  12812687   /files0
       5      4    00   12812688   4869396  17682083   /usr
       6      7    00     793611   1860138   2653748   /var
       7      0    00    2653749   1752408   4406156   /opt
* /dev/rdsk/c1t1d0s0 partition map
*                          First     Sector    Last
* Partition  Tag  Flags    Sector     Count    Sector  Mount Directory
       0      2    00          0    208278    208277
       1      3    01     208278   4197879   4406156
       2      5    00          0  17682084  17682083
       3      0    00    4406157     10773   4416929
       4      0    00    4416930   9160641  13577570
       5      4    00   13577571   1641087  15218657
       6      7    00   15218658   1231713  16450370
       7      0    00   16450371   1231713  17682083

The original system administrators only put one copy of the DiskSuite database replicas per disk. There should be at least two copies of the database replicas per disk.

# metadb
        flags           first blk       block count
     a m  p  luo        16              1034            /dev/dsk/c1t1d0s3
     a    p  luo        16              1034            /dev/dsk/c1t2d0s3

1. Remove all mirror metadevices with metaclear. After the mirrors are removed, remove the concat/stripe metadevices (former submirrors).

2. Create two state database replicas on the boot disk. Note that you cannot add database replicas to a slice already containing replicas. The replicas must first be deleted and then readded.

metadb -d /dev/dsk/c1t2d0s3
metadb -a -c2 /dev/dsk/c1t2d0s3


# metadb
        flags           first blk       block count
     a m  p  luo        16              1034            /dev/dsk/c1t1d0s3
     a        u         16              1034            /dev/dsk/c1t2d0s3
     a        u         1050            1034            /dev/dsk/c1t2d0s3

3. Remove the state databases from the mirror disk and copy the partition table from the boot disk to the mirror disk.

metadb -d /dev/dsk/c1t1d0s3
prtvtoc /dev/rdsk/c1t2d0s2 | fmthard -s - /dev/rdsk/c1t1d0s2
fmthard:  New volume table of contents now in place.

4. Create two state database replicas on the mirror disk.
metadb -a -c2 /dev/dsk/c1t1d0s3

# metadb
        flags           first blk       block count
     a        u         16              1034            /dev/dsk/c1t1d0s3
     a        u         16              1034            /dev/dsk/c1t2d0s3
     a        u         1050            1034            /dev/dsk/c1t2d0s3
     a        u         1050            1034            /dev/dsk/c1t1d0s3

You may proceed to mirror the disks with DiskSuite.

Back to brandonhutchinson.com.
Last modified: 02/04/2004