From owner-freebsd-fs@FreeBSD.ORG Wed Oct 10 11:59:32 2012 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 72EC8983 for ; Wed, 10 Oct 2012 11:59:32 +0000 (UTC) (envelope-from tevans.uk@googlemail.com) Received: from mail-qa0-f47.google.com (mail-qa0-f47.google.com [209.85.216.47]) by mx1.freebsd.org (Postfix) with ESMTP id 222118FC2C for ; Wed, 10 Oct 2012 11:59:31 +0000 (UTC) Received: by mail-qa0-f47.google.com with SMTP id i29so4829091qaf.13 for ; Wed, 10 Oct 2012 04:59:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=nDcC+tCapAeWdlkrxbPS43eZhbZ0i/ZtuSvV4zF7j0s=; b=RMuM6Dfy3wRDFjiPjsfAWSIJo3iBI9UfAOtdxlRUBBBTjCJUDBsfZqLbVsjcz8PPLS WOtghqz99JbjiugpFMLKygUzcieGNE1Rr66dC+Eg9BwYWw/03MYsbvF97rA5mIFUhUCH o9ywJXUG6dbIw45F67sNy8lgnlbYishsIYwto1QhUG6tuq69WJpaUIgtsTYyKezMiN+m f+YpRsOiqkNOKr3eDDCHp7EH6+fJegujBCD4bS6gr9gUbClYOIaetDMPjCGzRUKId3Mk 9Xtv4q2O+7tDjRR+YaqdaLfTM/H7Ci7S2CJXc+AZEwV+oDQCgRj2Bj54nmYyML5irEWe fmzg== MIME-Version: 1.0 Received: by 10.49.85.202 with SMTP id j10mr1132223qez.59.1349870370598; Wed, 10 Oct 2012 04:59:30 -0700 (PDT) Received: by 10.49.82.41 with HTTP; Wed, 10 Oct 2012 04:59:30 -0700 (PDT) In-Reply-To: <29CDA684DFBE02spf72sa9@rhythm.ocn.ne.jp> References: <29CDA684DFBE02spf72sa9@rhythm.ocn.ne.jp> Date: Wed, 10 Oct 2012 12:59:30 +0100 Message-ID: Subject: Re: Why zfs need to scan whole fs while I attach a HDD to mirror. From: Tom Evans To: Wanpeng Qian Content-Type: text/plain; charset=UTF-8 Cc: freebsd-fs@freebsd.org X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Oct 2012 11:59:32 -0000 On Wed, Oct 10, 2012 at 2:16 AM, Wanpeng Qian 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