Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 10 Oct 2012 12:59:30 +0100
From:      Tom Evans <tevans.uk@googlemail.com>
To:        Wanpeng Qian <spf72sa9@rhythm.ocn.ne.jp>
Cc:        freebsd-fs@freebsd.org
Subject:   Re: Why zfs need to scan whole fs while I attach a HDD to mirror.
Message-ID:  <CAFHbX1K%2BoxjTr_ysJ5CSOG7VEgDKgLeQR3L8%2B1G%2B1CC221KRfA@mail.gmail.com>
In-Reply-To: <29CDA684DFBE02spf72sa9@rhythm.ocn.ne.jp>
References:  <29CDA684DFBE02spf72sa9@rhythm.ocn.ne.jp>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Oct 10, 2012 at 2:16 AM, Wanpeng Qian <spf72sa9@rhythm.ocn.ne.jp> wrote:
> Hi guys
>
> my zpool is config as follow:
>
>         NAME        STATE     READ WRITE CKSUM
>         storage     ONLINE       0     0     0
>           mirror-0  ONLINE       0     0     0
>             da2     ONLINE       0     0     0
>             ada2    ONLINE       0     0     0
>           mirror-1  ONLINE       0     0     0
>             da1     ONLINE       0     0     0
>             da4     ONLINE       0     0     0
>           mirror-2  ONLINE       0     0     0
>             da3     ONLINE       0     0     0
>             ada3    ONLINE       0     0     0
>           mirror-3  ONLINE       0     0     0
>             ada0    ONLINE       0     0     0
>             ada1    ONLINE       0     0     0
>         cache
>           da5       ONLINE       0     0     0
>
> recently, I replace mirror-3, from two 2T to two 3T.
>
> first I detach one hdd, and attach new hdd to that mirror.

I think this is your mistake. Detaching a hard drive puts the whole
pool in a DEGRADED state, so it thinks it must scrub the whole pool.

If instead of "detach/attach" you had done "attach/replace/detach",
the pool would never be DEGRADED, and it would not take so long (or
not, this is just speculation).

Cheers

Tom



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAFHbX1K%2BoxjTr_ysJ5CSOG7VEgDKgLeQR3L8%2B1G%2B1CC221KRfA>