From owner-freebsd-stable@freebsd.org Tue Feb 2 22:51:24 2016 Return-Path: Delivered-To: freebsd-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 50DECA99638 for ; Tue, 2 Feb 2016 22:51:24 +0000 (UTC) (envelope-from ruben@verweg.com) Received: from erg.verweg.com (erg.verweg.com [IPv6:2a02:898:96::5e8e:f508]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "erg.verweg.com", Issuer "Verweg Dot Com CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id D56521762 for ; Tue, 2 Feb 2016 22:51:23 +0000 (UTC) (envelope-from ruben@verweg.com) Received: from [IPv6:2001:980:4ffa:1:a5ec:f53:f82e:2d02] ([IPv6:2001:980:4ffa:1:a5ec:f53:f82e:2d02]) (authenticated bits=0) by erg.verweg.com (8.15.2/8.14.9) with ESMTPSA id u12MpJp1009226 (version=TLSv1 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NOT) for ; Tue, 2 Feb 2016 22:51:19 GMT (envelope-from ruben@verweg.com) From: Ruben van Staveren X-Pgp-Agent: GPGMail 2.6b2 Content-Type: multipart/signed; boundary="Apple-Mail=_1EB1D9D1-F4F2-4AC7-8250-A3D2721E0CFA"; protocol="application/pgp-signature"; micalg=pgp-sha1 Subject: restore zfs pool using original devices? Date: Tue, 2 Feb 2016 23:51:17 +0100 Message-Id: <0B08A730-0648-4AFD-8043-FE3A843CC8A1@verweg.com> To: "freebsd-stable@FreeBSD.org Stable" Mime-Version: 1.0 (Mac OS X Mail 9.2 \(3112\)) X-Mailer: Apple Mail (2.3112) X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.4.3 (erg.verweg.com [IPv6:2a02:898:96:0:0:0:5e8e:f508]); Tue, 02 Feb 2016 22:51:19 +0000 (UTC) X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Feb 2016 22:51:24 -0000 --Apple-Mail=_1EB1D9D1-F4F2-4AC7-8250-A3D2721E0CFA Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 Hi list, Recently I decided to grow my zfs pool from 1TB to 6TB by replacing my = 1TB dell rebranded toshiba disk with an HGST Deskstar NAS 6 TB one. system was running 10.2 to make things easier, I decided to do a zpool replace on both the = unencrypted boot and encrypted (as per = https://www.dan.me.uk/blog/2012/05/06/full-disk-encryption-with-zfs-root-f= or-freebsd-9-x/) system pool zpool replace system gpt/boot diskid/DISK-NAHRVZDXp2 zpool replace system gpt/system.eli diskid/DISK-NAHRVZDXp3.eli The system ran fine for a while until I rebooted it: https://ruben.is.verweg.com/stuff/IMG_5734.jpg a panic during mounting root panic: solaris assert: nvlist_lookup_uint64(configs[i], = ZPOOL_CONFIG_POOL_TXG, &txg) =3D=3D 0: file = src/sys/modules/zfs/../../cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c= :4040 I tried to recover diskid/DISK-NAHRVZDXp2 by creating a new boot pool on = a rescue nanobsd image, so I could recover the encryption keys. No I = didn=E2=80=99t make an off system backup of those with zpool create -R = /path/to/temp/root-for-boot zboot /dev/diskid/DISK-NAHRVZDXp2. first it complained the disk was part of the original boot pool, so I = used -f. upon inspection I found the disk to be empty, so it looks like = that action destroyed some important metadata. should it do that = actually? I wanted to restore that data so I used dd if=3D/dev/gpt/boot = of=3D/dev/diskid/DISK-NAHRVZDXp2 bs=3D64k but the contents is not = restored. a cat of /dev/gpt/boot show various data is still there, but not seen = anymore by zfs. given zfs replace actually involves a temporarily mirror in where the = old vdev is removed, it should be pretty much possible to re attach this = vdev to any pool to see its contents again ? what are my chances to create a functional new pool using old devices? Best Regards, Ruben --Apple-Mail=_1EB1D9D1-F4F2-4AC7-8250-A3D2721E0CFA Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - http://gpgtools.org iEYEARECAAYFAlaxMuYACgkQZ88+mcQxRw0BigCggg5OP0dN909N4bkEfdDhFH+M xE8AnRGlcNvDdi67bEW9Ou8DBzrvDwGs =53zX -----END PGP SIGNATURE----- --Apple-Mail=_1EB1D9D1-F4F2-4AC7-8250-A3D2721E0CFA--