re-adding a replacement into a pool of mirrors

Randy Bush randy at psg.com
Fri Aug 21 03:10:42 UTC 2009



Andrew Snow wrote:
> 
> 
> OK, with mirrored vdevs you can detach and re-attach disks.
> 
> So:
> 
> 
> zpool detach tank da1s3   <-- remove it from the mirror
> zpool attach tank da0s3 da1s3     <-- add a disk into the mirror vdev

# zpool detach tank da1s3
# zpool status
  pool: tank
 state: ONLINE
 scrub: scrub completed after 0h14m with 0 errors on Wed Aug 19 12:03:14 2009
config:

        NAME        STATE     READ WRITE CKSUM
        tank        ONLINE       0     0     0
          da0s3     ONLINE       0     0     0
          mirror    ONLINE       0     0     0
            da2s1   ONLINE       0     0     0
            da3s1   ONLINE       0     0     0
          mirror    ONLINE       0     0     0
            da4s1   ONLINE       0     0     0
            da5s1   ONLINE       0     0     0
          mirror    ONLINE       0     0     0
            da6s1   ONLINE       0     0     0
            da7s1   ONLINE       0     0     0
          mirror    ONLINE       0     0     0
            da8s1c  ONLINE       0     0     0
            da9s1   ONLINE       0     0     0
          mirror    ONLINE       0     0     0
            da10s1  ONLINE       0     0     0
            da11s1  ONLINE       0     0     0

errors: No known data errors
# zpool attach tank da0s3 da1s3
cannot attach da1s3 to da0s3: permission denied
# zpool status
  pool: tank
 state: ONLINE
 scrub: scrub completed after 0h14m with 0 errors on Wed Aug 19 12:03:14 2009
config:

        NAME        STATE     READ WRITE CKSUM
        tank        ONLINE       0     0     0
          da0s3     ONLINE       0     0     0
          mirror    ONLINE       0     0     0
            da2s1   ONLINE       0     0     0
            da3s1   ONLINE       0     0     0
          mirror    ONLINE       0     0     0
            da4s1   ONLINE       0     0     0
            da5s1   ONLINE       0     0     0
          mirror    ONLINE       0     0     0
            da6s1   ONLINE       0     0     0
            da7s1   ONLINE       0     0     0
          mirror    ONLINE       0     0     0
            da8s1c  ONLINE       0     0     0
            da9s1   ONLINE       0     0     0
          mirror    ONLINE       0     0     0
            da10s1  ONLINE       0     0     0
            da11s1  ONLINE       0     0     0

errors: No known data errors

uh oh!

randy


More information about the freebsd-fs mailing list