From owner-freebsd-questions@FreeBSD.ORG Tue Dec 7 16:28:45 2010 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B63081065695 for ; Tue, 7 Dec 2010 16:28:45 +0000 (UTC) (envelope-from geoff@apro.com.au) Received: from mail.ricksure.com.au (mail.ricksure.com.au [203.98.89.150]) by mx1.freebsd.org (Postfix) with ESMTP id 1BF688FC21 for ; Tue, 7 Dec 2010 16:28:44 +0000 (UTC) Received: from 171.78.233.220.static.exetel.com.au [220.233.78.171] by mail.ricksure.com.au with SMTP; Wed, 8 Dec 2010 03:28:34 +1100 From: Geoff Roberts Organization: Australian Projects To: freebsd-questions@freebsd.org Date: Wed, 8 Dec 2010 03:28:27 +1100 User-Agent: KMail/1.13.2 (Linux/2.6.32-26-generic; KDE/4.4.2; x86_64; ; ) References: <20101128163048.21211cl7o3xpi8lc@aprosrv2.apro.com.au> In-Reply-To: <20101128163048.21211cl7o3xpi8lc@aprosrv2.apro.com.au> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201012080328.27769.geoff@apro.com.au> X-Declude-Sender: geoff@apro.com.au [220.233.78.171] X-Declude-Spoolname: 37770426.eml X-Declude-RefID: X-Declude-Note: Scanned by Declude 4.6.35 "http://www.declude.com/x-note.htm" X-Declude-Scan: Outgoing Score [0] at 03:28:36 on 08 Dec 2010 X-Declude-Tests: Whitelisted X-Country-Chain: X-Declude-Code: 0 X-Declude-Recipcount: 1 Organization: Declude, Inc. X-Helo: ubuntutest-01.localnet X-RevDNS: Subject: Re: zpool won't mount as dataset stuck X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: geoff@apro.com.au List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Dec 2010 16:28:45 -0000 Hi, On Sun, 28 Nov 2010 04:30:48 pm Geoff Roberts wrote: > Long and short is I can see the "tank" zpool without a problem, but > whenever I try to import it the disk light flashes every second and > the datasets won't mount. > > I can run a history command on "tank" and that shows the following > repeated every second (tgx keeps incrementing by one): > > 2010-11-28.15:08:33 [internal rollback txg:9645688] dataset = 222 > [user root on systemname.com] > 2010-11-28.15:08:34 [internal rollback txg:9645689] dataset = 222 > [user root on systemname.com] Just for reference, I was able to use the steps below to recover the data of the zpool that was "stuck". The steps below were done using virtual machines. The zpool history command was a great help as well. a) Created a FreeBSD 9.0 system and applied a ZFS v28 patch for a few features that looked useful for my problem. i) Ability to mount zpool in readonly ii) Ability to mount zpool with -N (do not mount datasets) iii) Ability to mount zpool with -T to specify a particular transaction set. In the end I didn't need this feature. b) Took an image of one of the mirror partitions housing the zpool using dd and transferred that to a file on a stand UFS2 file system. This was so I could work on a copy and transfer the data on an external hard disk to the FreeBSD 9.0 virtual machine. c) Used mdconfig to mount the file image on the FreeBSD 9.0 system. d) I was able to use zpool import -o readonly=on -N poolname The readonly option in particular seemed to stop the last transaction continually attempting to run in an endless loop. e) I could then see the datasets. From here I was able to mount them and recover all the data. Geoff