From owner-freebsd-current@FreeBSD.ORG Tue Oct 4 16:09:13 2011 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 54231106564A for ; Tue, 4 Oct 2011 16:09:13 +0000 (UTC) (envelope-from olivier@gid0.org) Received: from mail-qw0-f54.google.com (mail-qw0-f54.google.com [209.85.216.54]) by mx1.freebsd.org (Postfix) with ESMTP id 1D4408FC13 for ; Tue, 4 Oct 2011 16:09:12 +0000 (UTC) Received: by qadz30 with SMTP id z30so628582qad.13 for ; Tue, 04 Oct 2011 09:09:12 -0700 (PDT) MIME-Version: 1.0 Received: by 10.229.68.8 with SMTP id t8mr371258qci.143.1317744552209; Tue, 04 Oct 2011 09:09:12 -0700 (PDT) Received: by 10.229.224.82 with HTTP; Tue, 4 Oct 2011 09:09:12 -0700 (PDT) In-Reply-To: <8B59D754-9062-4499-9873-7C2167622032@gromit.dlib.vt.edu> References: <8B59D754-9062-4499-9873-7C2167622032@gromit.dlib.vt.edu> Date: Tue, 4 Oct 2011 18:09:12 +0200 Message-ID: From: Olivier Smedts To: Paul Mather Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: freebsd-current@freebsd.org Subject: Re: Strange ZFS filesystem corruption X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Oct 2011 16:09:13 -0000 2011/10/3 Paul Mather : > I know ZFS does not have a fsck utility ("because it doesn't need one":),= but does anyone know of any way of fixing this corruption short of destroy= ing the pool, creating a new one, and restoring from backup? =A0Is there so= me way of exporting and re-importing the pool that has the side-effect of d= oing some kind of fsck-like repairing of subtle corruption like this? But there is the ZFS debugger, "zdb" ! I can't really help you with that because I never had a corrupted zpool, but if you search on the lists for up to a year or so, you'll find some useful commands to inspect and destroy corrupted objects. Usage: zdb [-CumdibcsDvhL] poolname [object...] zdb [-div] dataset [object...] zdb -m [-L] poolname [vdev [metaslab...]] zdb -R poolname vdev:offset:size[:flags] zdb -S poolname zdb -l [-u] device zdb -C Dataset name must include at least one separator character '/' or '@' If dataset name is specified, only that dataset is dumped If object numbers are specified, only those objects are dumped Options to control amount of output: -u uberblock -d dataset(s) -i intent logs -C config (or cachefile if alone) -h pool history -b block statistics -m metaslabs -c checksum all metadata (twice for all data) blocks -s report stats on zdb's I/O -D dedup statistics -S simulate dedup to measure effect -v verbose (applies to all others) -l dump label contents -L disable leak tracking (do not load spacemaps) -R read and display block from a device Below options are intended for use with other options (except -l): -A ignore assertions (-A), enable panic recovery (-AA) or both (-AA= A) -F attempt automatic rewind within safe range of transaction groups -U -- use alternate cachefile -X attempt extreme rewind (does not work with dataset) -e pool is exported/destroyed/has altroot/not in a cachefile -p -- use one or more with -e to specify path to vdev dir -P print numbers parsable -t -- highest txg to use when searching for uberblocks Specify an option more than once (e.g. -bb) to make only that option verbos= e Default is to dump everything non-verbosely --=20 Olivier Smedts=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0=A0 _ =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0= =A0 ASCII ribbon campaign ( ) e-mail: olivier@gid0.org=A0 =A0 =A0 =A0 - against HTML email & vCards=A0 X www: http://www.gid0.org=A0 =A0 - against proprietary attachments / \ =A0 "Il y a seulement 10 sortes de gens dans le monde : =A0 ceux qui comprennent le binaire, =A0 et ceux qui ne le comprennent pas."