Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 21 Aug 2009 12:10:40 +0900
From:      Randy Bush <randy@psg.com>
To:        Andrew Snow <andrew@modulus.org>
Cc:        freebsd-fs <freebsd-fs@freebsd.org>
Subject:   Re: re-adding a replacement into a pool of mirrors
Message-ID:  <m23a7lkgjz.wl%randy@psg.com>
In-Reply-To: <4A8E0F39.6070407@modulus.org>
References:  <m2eir5khm7.wl%randy@psg.com> <4A8E0C80.9030908@modulus.org> <m263chkh0l.wl%randy@psg.com> <4A8E0F39.6070407@modulus.org>

next in thread | previous in thread | raw e-mail | index | archive | help


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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?m23a7lkgjz.wl%randy>