Help with attaching mirrors

Hi Guys,

I need a help with attaching the sub mirrors as it keep throwing errors.

I have done solaris live upgrade and it was succesful but it keeps throwing error only for root (s0) and swap (s1)when i try to attach them.
For rest of the partitions for slices 3,4,5 on target 1 are able to attach with the mirror and finished syncing as well with target 0 slices 3,4,5.

 
error:

d20 submirror too small to attach

metastat output for below disks is

bash-2.05# metastat -p
d2 -m d12 d22 1
d12 1 1 c1t0d0s3
d22 1 1 c1t1d0s3
d1 -m d11                  --------------- swap
d11 1 1 c1t1d0s1
d0 -m d10                 ---------------- root
d10 1 1 c1t1d0s0
d3 -m d13 d23 1
d13 1 1 c1t0d0s4
d23 1 1 c1t1d0s4
d4 -m d14 d24 1
d14 1 1 c1t0d0s5
d24 1 1 c1t1d0s5
d20 1 1 c1t0d0s0
d21 1 1 c1t0d0s1
d20 1 1 c1t0d0s0
d21 1 1 c1t0d0s1

Now not able able to attach d20 to d0 and d21 to d1 as it keep on throwing the error above said.

The prtvtoc of the two disks are as below and target 1 is master.

bash-2.05# prtvtoc /dev/dsk/c1t1d0s2       
* /dev/dsk/c1t1d0s2 partition map
*
* Dimensions:
*     512 bytes/sector
*     935 sectors/track
*       4 tracks/cylinder
*    3740 sectors/cylinder
*   38298 cylinders
*   38296 accessible cylinders
*
* Flags:
*   1: unmountable
*  10: read-only
*
*                          First     Sector    Last
* Partition  Tag  Flags    Sector     Count    Sector  Mount Directory
       0      2    00    4203760  20973920  25177679
       1      3    01   25177680   8396300  33573979
       2      5    01          0 143227040 143227039
       3      0    00   33573980  20973920  54547899
       4      0    00   54547900  88641740 143189639
       5      8    00          0   4203760   4203759
       7      0    00  143189640     37400 143227039


bash-2.05# prtvtoc /dev/dsk/c1t0d0s2
* /dev/dsk/c1t0d0s2 partition map
*
* Dimensions:
*     512 bytes/sector
*     424 sectors/track
*      24 tracks/cylinder
*   10176 sectors/cylinder
*   14089 cylinders
*   14087 accessible cylinders
*
* Flags:
*   1: unmountable
*  10: read-only
*
* Unallocated space:
*       First     Sector    Last
*       Sector     Count    Sector
*   143176320    142464 143318783
*
*                          First     Sector    Last
* Partition  Tag  Flags    Sector     Count    Sector  Mount Directory
       0      2    00    4202688  20972736  25175423
       1      3    01   25175424   8395200  33570623
       2      5    00          0 143349312 143349311
       3      0    00   33570624  20972736  54543359
       4      0    00   54543360  88632960 143176319
       5      8    00          0   4202688   4202687
       7      0    00  143318784     30528 143349311

Any ideas how it can be done without losing the data and without any downtime as i see the geometry is different for both which could be causing this issue.

Thanks in advance

Thanks,
Phani

Detach remaining c1t0d0 submirrors, clear metadevices from them. Then copy vtoc from primary submirror:

prtvtoc /dev/dsk/c1t1d0s2 | fmthard -s - /dev/dsk/c1t0d0s2

After that recreate c1t0d0 metadevices and attach them to the mirrors.

Hi Bartus,

Thanks for reply i have already tried it and it returned this error say both disks are of different size.

bash# prtvtoc /dev/dsk/c1t1d0s2 |fmthard -s - /dev/rdsk/c1t0d0s2
Partition 0 not aligned on cylinder boundary: "       0      2    00    4203760  20973920  25177679"

Thanks,
Phani

I think it is not an error, just warning... Can you post prtvtoc from both disks now?

For mirroring it is always recommended to have disks of same size.If they have different cylinder, head, sector count or different size you will have to fiddle with sizing slices.

You should keep in mind that prtvtoc output for second disk should be same as that
of first disk.You have to keep the starting and end cylinders same for each slice.