Mirroring using non-identical disks

I've been testing mirroring root partitions for the past few days within a virtual environment and on an old ML350. However, the live system that this is practice for has two disks, and they're non-identical.

I've done a bit of searching through the forum and see that a lot of people recommend just calculating the partitions for the second disk manually. However, I'm a bit of a noob when it comes to doing so, so was wondering if somebody could offer any advice/help.

Here are the two partition tables as they are at the moment:

Disk 1 (i.e. the live disk):

bash-3.00# prtvtoc /dev/rdsk/c1t0d0s2
* /dev/rdsk/c1t0d0s2 partition map
*
* Dimensions:
*     512 bytes/sector
*      63 sectors/track
*     255 tracks/cylinder
*   16065 sectors/cylinder
*    8940 cylinders
*    8938 accessible cylinders
*
* Flags:
*   1: unmountable
*  10: read-only
*
* Unallocated space:
*       First     Sector    Last
*       Sector     Count    Sector
*   143315865    273105 143588969
*
*                          First     Sector    Last
* Partition  Tag  Flags    Sector     Count    Sector  Mount Directory
       0      2    00    8418060  67119570  75537629   /
       1      3    01      16065   8401995   8418059
       2      5    00          0 143588970 143588969
       3      0    00   75537630  33993540 109531169
       6      0    00  109531170  33559785 143090954
       7      0    00  143090955    224910 143315864
       8      1    01          0     16065     16064

Disk 2 (the soon to be mirror):

bash-3.00# prtvtoc /dev/rdsk/c1t1d0s2
* /dev/rdsk/c1t1d0s2 partition map
*
* Dimensions:
*     512 bytes/sector
*     911 sectors/track
*       2 tracks/cylinder
*    1822 sectors/cylinder
*   13217 cylinders
*   13215 accessible cylinders
*
* Flags:
*   1: unmountable
*  10: read-only
*
*                          First     Sector    Last
* Partition  Tag  Flags    Sector     Count    Sector  Mount Directory
       0      2    00       1822    262368    264189
       1      3    01     264190    262368    526557
       2      5    01          0 143487966 143487965
       6      4    00     526558 142957764 143484321

       8      1    01          0      1822      1821

Notice somebody's failed attempt - ominous!

Firstly - am I right in thinking the disks are (on paper) roughly equal in size (i.e. they share a similar number of sectors, and are both 512bytes/sector)?

Secondly, will prtvtoc/fmthard use the sector positions rather than the cylinder counts when labelling the new disk? Because if so am I right in thinking that the unallocated space on the end of c1t1d0 should mean that a straight copy of the VTOCs between disks is possible? (That is, the current disk's assigned partitions don't overflow past the new disks available sectors?)

Any advice would be greatly appreciated - I can only test so much, and unfortunately this part can only be tested on the live system because I don't have unequal disks to test with :frowning:

If you are sure the disks internals (Disk make,RPM,....) are same then different size wont be a problem ...because mirroring will take the smallest size among the disks

Do a fmthard of the first disk to second disk.

I'm not sure that they are the same make, but I would presume they're the same RPM - is there anyway to check within Solaris? dmesg or lspci?

I don't know if you're right when you say "mirroring will take the smallest size among the disks" - surely mirroring (or rather, prtvtoc | fmthard) will take the size of the origin disk?

---------- Post updated at 04:37 AM ---------- Previous update was at 04:35 AM ----------

It's the fact that the dimensions of the disks (cylinder, sectors/track, sectors/cylinder etc) that's worrying me.

---------- Post updated at 01:19 PM ---------- Previous update was at 04:37 AM ----------

This problem gets weirder:

sd1       Soft Errors: 0 Hard Errors: 0 Transport Errors: 0
Vendor: FUJITSU  Product: MAT3073NC        Revision: 0104 Serial No:
Size: 73.54GB <73543163392 bytes>
Media Error: 0 Device Not Ready: 0 No Device: 0 Recoverable: 0
Illegal Request: 0 Predictive Failure Analysis: 0

sd2       Soft Errors: 0 Hard Errors: 0 Transport Errors: 0
Vendor: FUJITSU  Product: MAT3073NC        Revision: 0104 Serial No:
Size: 73.54GB <73543163392 bytes>
Media Error: 0 Device Not Ready: 0 No Device: 0 Recoverable: 0

Illegal Request: 0 Predictive Failure Analysis: 0

So according to that, the disks are identical in size, identical in manufacturer, and are even identical product and revision numbers! Yet somehow they're so different :confused:

---------- Post updated at 01:52 PM ---------- Previous update was at 01:19 PM ----------

Well, as expected:

bash-3.00# prtvtoc /dev/rdsk/c1t0d0s2 | fmthard -s - /dev/rdsk/c1t1d0s2
fmthard: Partition 0 specified as 67119570 sectors starting at 8418060
        does not fit. The full disk contains 24193890 sectors.
fmthard: Partition 2 specifies the full disk and is not equal
full size of disk.  The full disk capacity is 24193890 sectors.
fmthard: Partition 2 specified as 143588970 sectors starting at 0
        does not fit. The full disk contains 24193890 sectors.
fmthard: Partition 3 specified as 33993540 sectors starting at 75537630
        does not fit. The full disk contains 24193890 sectors.
fmthard: Partition 6 specified as 33559785 sectors starting at 109531170
        does not fit. The full disk contains 24193890 sectors.
fmthard: Partition 7 specified as 224910 sectors starting at 143090955
        does not fit. The full disk contains 24193890 sectors.
fmthard:  New volume table of contents now in place.

=/

---------- Post updated at 04:26 PM ---------- Previous update was at 01:52 PM ----------

I seem to be talking to myself :stuck_out_tongue:

But for anyone looking for answers to this in the future, I did the following (after reading an OpenSolaris bug report (bug_id=1193631 - I'm not allowed to post URLs)):

# format -M -e
...
       1. c1t4d0 <SUN0669 cyl 1613 alt 2 hd 15 sec 54>
          /isa/aha@330,0/cmdk@4,0
...
        0. Auto configure
        1. SUN0669
        2. other
Specify disk type (enter its number)[1]: 0
Auto configuration via format.dat[no]? 
Auto configuration via generic SCSI-2[no]? y

Once that's done, and you've quit without doing save, if you check the partition table, you should see that all the geometry for the drive has now changed:

# prtvtoc /dev/rdsk/c1t1d0s0
* /dev/rdsk/c1t1d0s0 partition map
*
* Dimensions:
*     512 bytes/sector
*      63 sectors/track
*     255 tracks/cylinder
*   16065 sectors/cylinder
*    1508 cylinders
*    1506 accessible cylinders
*
* Flags:
*   1: unmountable
*  10: read-only
*
*                          First     Sector    Last
* Partition  Tag  Flags    Sector     Count    Sector  Mount Directory
       0      2    00    8418060  67119570  75537629
       1      3    01      16065   8401995   8418059
       2      5    00          0 143588970 143588969
       3      0    00   75537630  33993540 109531169
       6      0    00  109531170  33559785 143090954
       7      0    00  143090955    224910 143315864
       8      1    01          0     16065     16064

(Compare with above)