Disk mismatch while trying to zfs mirroring non-root disks

Hello All,

I am trying to mirror two non-root hard drives using zfs. But "fmthard" fails when I try to copy the vtoc due to disk mismatch. Please help me.

--- iostat command shows the disk to be similiar
--- format command shows disk to be different :confused:

--- c1t2d0 is the active disk and I need to mirror data to c1t3d0. I have formatted c1t3d0 twice. But this did not help. Any suggestions are welcome.

Here's info regarding the disks:

a) Output of iostat:

c1t2d0           Soft Errors: 0 Hard Errors: 0 Transport Errors: 0
Vendor: SEAGATE  Product: ST314670LSUN146G Revision: 045A Serial No: 060443G1AE
Size: 146.81GB <146810536448 bytes>
Media Error: 0 Device Not Ready: 0 No Device: 0 Recoverable: 0
Illegal Request: 0 Predictive Failure Analysis: 0

c1t3d0           Soft Errors: 0 Hard Errors: 0 Transport Errors: 0
Vendor: SEAGATE  Product: ST314670LSUN146G Revision: 045A Serial No: 060443HD5F
Size: 146.81GB <146810536448 bytes>
Media Error: 0 Device Not Ready: 0 No Device: 0 Recoverable: 0
Illegal Request: 0 Predictive Failure Analysis: 0

b) Output of format:

2. c1t2d0 <SEAGATE-ST314670LSUN146G-045A-136.73GB>
          /pci@1c,600000/scsi@2/sd@2,0
3. c1t3d0 <SUN146G cyl 14087 alt 2 hd 24 sec 848>
          /pci@1c,600000/scsi@2/sd@3,0

why do you use fmthard for a zfs mirror?

Thanks for replying :slight_smile:

I did that to copy the VTOC. Is that wrong? I tried to follow the procedure for ZFS Root mirror. Please let me know the correct procedure.

just create a mirrored zpool with the two disks and you are done...

# zpool create <poolname> mirror yourdrive1 yourdrive2

I would say because the pool is on a slice and not the whole disk. What says "zpool status" ?

@pingmeback: can you post the commands you run to copy the vtoc and the errors you got ?

Thanks guys for helping me out!
Here's complete output of "zpool status" which includes

  • root pool (rpool) which is mirrored
  • "data" pool containing c1t2d0 which I need to mirror to c1t3d0
#zpool status
  pool: data
 state: ONLINE
status: The pool is formatted using an older on-disk format.  The pool can
        still be used, but some features are unavailable.
action: Upgrade the pool using 'zpool upgrade'.  Once this is done, the
        pool will no longer be accessible on older software versions.
 scrub: none requested
config:

        NAME        STATE     READ WRITE CKSUM
        data   ONLINE       0     0     0
          c1t2d0    ONLINE       0     0     0

errors: No known data errors

  pool: rpool
 state: ONLINE
status: The pool is formatted using an older on-disk format.  The pool can
        still be used, but some features are unavailable.
action: Upgrade the pool using 'zpool upgrade'.  Once this is done, the
        pool will no longer be accessible on older software versions.
 scrub: none requested
config:

        NAME          STATE     READ WRITE CKSUM
        rpool         ONLINE       0     0     0
          mirror      ONLINE       0     0     0
            c1t0d0s0  ONLINE       0     0     0
            c1t1d0s0  ONLINE       0     0     0

errors: No known data errors

then add the new disk to the pool... which command do you use?

Re: [zfs-discuss] Add mirror to an existing Zpool

There is indeed no vtoc to copy.

So will the following command work:

zpool attach -f data c1t2d0 c1t3d0
			^	^
			|	|
(disk containing data)__|	|__(Spare empty disk)

---------- Post updated at 06:52 PM ---------- Previous update was at 06:42 PM ----------

:b:Thanks guys. Looks like it's working.... will keep an eye on it until it finishes.

bash-3.00# zpool status
  pool: data
 state: ONLINE
status: One or more devices is currently being resilvered.  The pool will
        continue to function, possibly in a degraded state.
action: Wait for the resilver to complete.
 scrub: resilver in progress for 0h0m, 28.25% done, 0h2m to go
config:

        NAME        STATE     READ WRITE CKSUM
        data   	    ONLINE       0     0     0
          mirror    ONLINE       0     0     0
            c1t2d0  ONLINE       0     0     0
            c1t3d0  ONLINE       0     0     0  1.93G resilvered