Date: Tue, 2 Feb 2016 23:51:17 +0100 From: Ruben van Staveren <ruben@verweg.com> To: "freebsd-stable@FreeBSD.org Stable" <freebsd-stable@freebsd.org> Subject: restore zfs pool using original devices? Message-ID: <0B08A730-0648-4AFD-8043-FE3A843CC8A1@verweg.com>
next in thread | raw e-mail | index | archive | help
--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--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?0B08A730-0648-4AFD-8043-FE3A843CC8A1>