Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 4 Dec 2014 20:56:42 -0500
From:      "David J. Weller-Fahy" <dave+lists.freebsd-questions@caterva.org>
To:        freebsd-questions@freebsd.org
Subject:   Problem adding second mirror to zpool
Message-ID:  <20141205015642.GD29540@weller-fahy.com>

next in thread | raw e-mail | index | archive | help

--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--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20141205015642.GD29540>