From owner-freebsd-questions@FreeBSD.ORG Fri Dec 5 02:03:27 2014 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A2606593 for ; Fri, 5 Dec 2014 02:03:27 +0000 (UTC) Received: from weller-fahy.com (sinecure.xen.prgmr.com [71.19.148.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mx.weller-fahy.com", Issuer "StartCom Class 1 Primary Intermediate Server CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 81A26B3D for ; Fri, 5 Dec 2014 02:03:26 +0000 (UTC) Received: from weller-fahy.com (c-71-232-224-89.hsd1.nh.comcast.net [71.232.224.89]); by mx.weller-fahy.com (OpenSMTPD) with ESMTPSA id 1ca292ea; TLS version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO; for ; Fri, 5 Dec 2014 01:56:45 +0000 (UTC) Date: Thu, 4 Dec 2014 20:56:42 -0500 From: "David J. Weller-Fahy" To: freebsd-questions@freebsd.org Subject: Problem adding second mirror to zpool Message-ID: <20141205015642.GD29540@weller-fahy.com> Mail-Followup-To: freebsd-questions@freebsd.org MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="k4f25fnPtRuIRUb3" Content-Disposition: inline User-Agent: Mutt/1.5.23+16 (39d3ddb56d34) (2014-03-12) X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Dec 2014 02:03:27 -0000 --k4f25fnPtRuIRUb3 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline Content-Transfer-Encoding: quoted-printable I just realigned my zpool from ashift=3D9 to ashift=3D12, successfully=20 transmitted the snapshot, and am booting from the new pool... however, I=20 cannot get the last disk added to the pool. Details follow (uname=20 wrapped). #v+ dave@nastie:~ $ uname -a FreeBSD nastie.weller-fahy.com 10.1-RELEASE FreeBSD 10.1-RELEASE #0 r274551: Sun Nov 16 08:06:47 CST 2014 root@nastie.weller-fahy.com:/usr/obj/usr/src/sys/GENERIC amd64 #v- This machine is a headless NAS, and has been updated since 9.?. I had a ZFS pool which looked (approximately) like the following (prior=20 to the realignment). Note that the table is from memory, because I=20 didn't keep a screenshot, but the device and partition names and numbers=20 are correct. The disks ada0 and ada2 are 1.5 TiB, and ada1 and ada3 are=20 500 MiB. #v+ NAME STATE READ WRITE CKSUM nastiez ONLINE 0 0 0 mirror-0 ONLINE 0 0 0 ada0p3 ONLINE 0 0 0 ada2p3 ONLINE 0 0 0 mirror-1 ONLINE 0 0 0 ada1p1 ONLINE 0 0 0 ada3p1 ONLINE 0 0 0 #v- I detached ada2p3 and ada3p1 from the pool after scrubbing the pool,=20 then created a new pool with ashift=3D12 with ada2p3 and ada3p1. =20 Following that I had the following zpool status (just the table - these=20 IDs are correct). #v+ NAME STATE READ WRITE CKSUM pool ONLINE 0 0 0 gptid/adc0e6d4-78a6-11e4-8646-0014222d98da ONLINE 0 0 0 gptid/c6ede2a4-78a6-11e4-8646-0014222d98da ONLINE 0 0 0 #v- Now, I transfered the snapshot from nastiez (the old zpool) to pool (the=20 new zpool), verified the transfer, and destroyed the old zpool. Next I=20 duplicated the partition configuration that I used on ada2 and ada3=20 on ada0 and ada1, and started to attach them to the pool. First I did the following. #v+ zpool attach pool \ /dev/gptid/adc0e6d4-78a6-11e4-8646-0014222d98da \ /dev/gptid/f0668af9-7aa2-11e4-8452-0014222d98da #v- Which made a mirror out of ada1p3 and ada0p3 (first and second,=20 respectively) as shown. #v+ NAME STATE READ WRITE CKSUM pool ONLINE 0 0 0 mirror-0 ONLINE 0 0 0 gptid/adc0e6d4-78a6-11e4-8646-0014222d98da ONLINE 0 0 0 gptid/f0668af9-7aa2-11e4-8452-0014222d98da ONLINE 0 0 0 gptid/c6ede2a4-78a6-11e4-8646-0014222d98da ONLINE 0 0 0 #v- Now I just need to mirror ada3p1 (gptid/c6ede...98da) with ada1p1, and=20 I'll be done. However (command line and error message wrapped)... #v+ root@nastie:~ # zpool attach pool \ /dev/gptid/c6ede2a4-78a6-11e4-8646-0014222d98da \ /dev/gptid/fadbb43d-7aa2-11e4-8452-0014222d98da cannot attach /dev/gptid/fadbb43d-7aa2-11e4-8452-0014222d98da to \ /dev/gptid/c6ede2a4-78a6-11e4-8646-0014222d98da: no such device in pool #v- I've searched for about 2 days, and have not been able to find anything=20 that either solves my problem or tells me why I can't add this device. Can anyone tell me how to add the last drive (ada1) without losing the=20 data on the drive? Or is this a situation where I'll need to get a set=20 of larger hard drives to get the data off this pool, and then=20 re-organize after the data is safe? Regards, --=20 dave [ please don't CC me ] --k4f25fnPtRuIRUb3 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iEYEARECAAYFAlSBENoACgkQzahokXOb2Ux72QCfTDCuF/bau8VUCs/JRSDjH9Fb wxkAoI7skNjnHjqhm26BPTMjDej7pI/M =qgGY -----END PGP SIGNATURE----- --k4f25fnPtRuIRUb3--