• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

[ZFS] Zpool replace gone south.


New Member

Messages: 2

Hi there.

First of all, running FreeNAS v.0.7.2, zfs v3, zpool v13.

ZFS raidz1, 6 disks, 6 sata ports, no IDE.

turned off the NAS, replaced old drive with new drive. started it up, and did a "zpool replace guitar ad4.nop ad4"

It started replacing, but i got heaps of I/O errors, and it reset every 30 seconds.

freenas:~# zpool status
  pool: guitar
 state: DEGRADED
 scrub: scrub stopped after 0h5m with 0 errors on Mon Jul 18 18:56:45 2011

        NAME                       STATE     READ WRITE CKSUM
        guitar                     DEGRADED     0     0     0
          raidz1                   DEGRADED     0     0     0
            replacing              DEGRADED     0     0     0
              ad4.nop              ONLINE       0     0     0
              9203819577564534483  FAULTED      0     0     0  was /dev/ad4.nop
            ad6.nop                ONLINE       0     0     0
            ad8.nop                ONLINE       0     0     0
            ad10.nop               ONLINE       0     0     0
            ad16.nop               ONLINE       0     0     0
            ad18.nop               ONLINE       0     0     0
          da1                      AVAIL

errors: No known data errors
I removed the new drive, reinserted the old one, and did a zpool export / import - this it looks like the above.

freenas:~# zpool offline guitar ad4.nop
cannot offline ad4.nop: no valid replicas
freenas:~# zpool replace guitar ad4.nop da1
cannot replace ad4.nop with da1: cannot replace a replacing device
freenas:~# zpool offline guitar 9203819577564534483
cannot offline 9203819577564534483: no valid replicas
How can I stop this replacement? I got a second NAS running to back up my data, but it doesn't let me read more than a fe GB, then the box gets unreachable.



Staff member

Thanks: 1,124
Messages: 3,944

What happens if you # zpool detach guitar 9203819577564534483

Or # zpool remove guitar 9203819577564534483

In the future, you will want to do a # zpool offline guitar <disk-name> before turning off the box. That will mark the old drive as "offline" but still working. Thus, if things go south in the replace, you can swap drives again and "online" the old drive to get back to a working state.


New Member

Messages: 2

# zpool detach guitar 9203819577564534483 did the trick. i can't believe it was that simple!

Doing a scrub now, to see the way of the land, then it'll be backed up and another layout 5 +1 spare instead.