Why zfs need to scan whole fs while I attach a HDD to mirror.

Wanpeng Qian spf72sa9 at rhythm.ocn.ne.jp
Wed Oct 10 01:43:44 UTC 2012


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.

after attach, zfs starting resilvering as expect.
but zfs will scan whole fs to resiver new hdd.

I think that is not necessery. only copy one disk data to new one
is enough. scan the whole fs will spend a lot of time as follow:

  scan: resilver in progress since Wed Oct 10 07:12:52 2012
        1.20T scanned out of 6.48T at 121M/s, 12h39m to go
        308G resilvered, 18.60% done

does this function correctly?

Regards

Qian.




More information about the freebsd-fs mailing list