From owner-freebsd-fs@freebsd.org Wed Sep 28 10:57:43 2016 Return-Path: Delivered-To: freebsd-fs@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 AB7CFC0062F; Wed, 28 Sep 2016 10:57:43 +0000 (UTC) (envelope-from ronald-lists@klop.ws) Received: from smarthost1.greenhost.nl (smarthost1.greenhost.nl [195.190.28.81]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6A37719AE; Wed, 28 Sep 2016 10:57:43 +0000 (UTC) (envelope-from ronald-lists@klop.ws) Received: from smtp.greenhost.nl ([213.108.104.138]) by smarthost1.greenhost.nl with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1bpCJM-0005ud-MN; Wed, 28 Sep 2016 12:42:01 +0200 Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes To: freebsd-current@freebsd.org, freebsd-fs@freebsd.org, Ultima Subject: Re: zpool (online|replace|labelclear) issues, -f option also failing References: Date: Wed, 28 Sep 2016 12:42:00 +0200 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: "Ronald Klop" Message-ID: In-Reply-To: User-Agent: Opera Mail/12.16 (FreeBSD) X-Authenticated-As-Hash: 398f5522cb258ce43cb679602f8cfe8b62a256d1 X-Virus-Scanned: by clamav at smarthost1.samage.net X-Spam-Level: / X-Spam-Score: -0.2 X-Spam-Status: No, score=-0.2 required=5.0 tests=ALL_TRUSTED, BAYES_50 autolearn=disabled version=3.4.0 X-Scan-Signature: 96329e479c93ffb0716cf569fedf443d X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Sep 2016 10:57:43 -0000 Hi, As a start you can use these in /boot/loader.conf to prevent the confusion about gptid or disk_ident. I disabled gptid at my computer. But if I understand you would like to disable disk_ident. For ZFS it should not matter what you use. $ sysctl kern.geom.label kern.geom.label.disk_ident.enable: 1 kern.geom.label.gptid.enable: 0 kern.geom.label.gpt.enable: 1 kern.geom.label.ufs.enable: 1 kern.geom.label.ufsid.enable: 1 kern.geom.label.reiserfs.enable: 1 kern.geom.label.ntfs.enable: 1 kern.geom.label.msdosfs.enable: 1 kern.geom.label.iso9660.enable: 1 kern.geom.label.ext2fs.enable: 1 kern.geom.label.debug: 0 Further. Does ZFS see 14989197580381994958 and gptid/31be0527-84f0-11e6-bbbc-fcaa14edc6a6 as the same disk? Zpool replace also has an option to replace the disk 'with itself'. Just provide it one parameter like this: # zpool replace tank 14989197580381994958 or # zpool replace tank gptid/31be0527-84f0-11e6-bbbc-fcaa14edc6a6 Does that help? Oh, while I read your mail again. You have 2 GB swap configured on the disk so wiping 2MB at the start of the disk does not wipe the freebsd-zfs metadata of the da14p2 partition. Try wiping 3GB from the start and end of the disk and repartition it. Success. Ronald. On Tue, 27 Sep 2016 22:53:27 +0200, Ultima wrote: > Hello, > > I am currently trying to replace a disk that was offlined and getting > the > following error: > > # zpool replace tank 14989197580381994958 > gptid/31be0527-84f0-11e6-bbbc-fcaa14edc6a6 > invalid vdev specification > use '-f' to override the following errors: > /dev/gptid/31be0527-84f0-11e6-bbbc-fcaa14edc6a6 is part of active pool > 'tank' > > # zpool replace -f tank 14989197580381994958 > gptid/31be0527-84f0-11e6-bbbc-fcaa14edc6a6 > invalid vdev specification > the following errors must be manually repaired: > /dev/gptid/31be0527-84f0-11e6-bbbc-fcaa14edc6a6 is part of active pool > 'tank' > > # zpool status tank > pool: tank > state: DEGRADED > status: One or more devices has been taken offline by the administrator. > Sufficient replicas exist for the pool to continue functioning in a > degraded state. > action: Online the device using 'zpool online' or replace the device with > 'zpool replace'. > scan: resilvered 1.10T in 9h4m with 0 errors on Tue Sep 20 00:33:32 > 2016 > config: > > NAME STATE READ WRITE > CKSUM > tank DEGRADED 0 0 > 0 > raidz2-0 ONLINE 0 0 0 > gptid/8bdbd180-f52a-11e5-90c5-fcaa14edc6a6 ONLINE 0 0 0 > gptid/8c4df91d-f52a-11e5-90c5-fcaa14edc6a6 ONLINE 0 0 0 > gptid/8ccf21a3-f52a-11e5-90c5-fcaa14edc6a6 ONLINE 0 0 0 > gptid/8d5521cb-f52a-11e5-90c5-fcaa14edc6a6 ONLINE 0 0 0 > gptid/8de13b47-f52a-11e5-90c5-fcaa14edc6a6 ONLINE 0 0 0 > gptid/8e842f92-f52a-11e5-90c5-fcaa14edc6a6 ONLINE 0 0 0 > raidz2-1 DEGRADED 0 0 0 > gptid/8bba4a82-f52a-11e5-90c5-fcaa14edc6a6 ONLINE 0 0 0 > gptid/8c26d491-f52a-11e5-90c5-fcaa14edc6a6 ONLINE 0 0 0 > gptid/8ca3fea6-f52a-11e5-90c5-fcaa14edc6a6 ONLINE 0 0 0 > 14989197580381994958 OFFLINE 0 0 0 > was /dev/diskid/DISK-********p2 > gptid/8db26351-f52a-11e5-90c5-fcaa14edc6a6 ONLINE 0 0 0 > gptid/8e4bfa70-f52a-11e5-90c5-fcaa14edc6a6 ONLINE 0 0 0 > raidz2-2 ONLINE 0 0 0 > gptid/8b957b47-f52a-11e5-90c5-fcaa14edc6a6 ONLINE 0 0 0 > gptid/8c0340da-f52a-11e5-90c5-fcaa14edc6a6 ONLINE 0 0 0 > gptid/8c77ddcb-f52a-11e5-90c5-fcaa14edc6a6 ONLINE 0 0 0 > gptid/8cf6b7f1-f52a-11e5-90c5-fcaa14edc6a6 ONLINE 0 0 0 > gptid/8d84b31e-f52a-11e5-90c5-fcaa14edc6a6 ONLINE 0 0 0 > gptid/8e146dad-f52a-11e5-90c5-fcaa14edc6a6 ONLINE 0 0 0 > raidz2-3 ONLINE 0 0 0 > gptid/8ebb39df-f52a-11e5-90c5-fcaa14edc6a6 ONLINE 0 0 0 > gptid/8ef49770-f52a-11e5-90c5-fcaa14edc6a6 ONLINE 0 0 0 > gptid/2f94035d-7e9f-11e6-abe9-fcaa14edc6a6 ONLINE 0 0 0 > gptid/8f69cf08-f52a-11e5-90c5-fcaa14edc6a6 ONLINE 0 0 0 > gptid/8fa7c0a6-f52a-11e5-90c5-fcaa14edc6a6 ONLINE 0 0 0 > gptid/8fe7816d-f52a-11e5-90c5-fcaa14edc6a6 ONLINE 0 0 0 > logs > gptid/683dc146-f531-11e5-90c5-fcaa14edc6a6 ONLINE 0 0 0 > > errors: No known data errors > > # glabel status | grep da14 > gptid/24a57a9b-84f0-11e6-bbbc-fcaa14edc6a6 N/A da14p1 > gptid/31be0527-84f0-11e6-bbbc-fcaa14edc6a6 N/A da14p2 > diskid/DISK-******** N/A da14 > > # gpart show da13 da14 > => 40 7814037088 da13 GPT (3.6T) > 40 4194304 1 freebsd-swap (2.0G) > 4194344 7809842784 2 freebsd-zfs (3.6T) > > => 40 7814037088 da14 GPT (3.6T) > 40 4194304 1 freebsd-swap (2.0G) > 4194344 7809842784 2 freebsd-zfs (3.6T) > > # uname -a > FreeBSD S1 12.0-CURRENT FreeBSD 12.0-CURRENT #4 r306300: Sat Sep 24 > 14:24:23 EDT 2016 > root@S1:/usr/src/head/obj/usr/src/head/src/sys/MYKERNEL-NODEBUG > amd64 > > I recently offlined the device and after onlining it the label changed to > geom. After a few reboots the pool started importing by diskid. After > attempting to offline/online by gptid, would continue to fail with an > error. I decided try to replace it and is also failing with the error > above. I also wiped the first & last 2MB of the disk without success. Is > they're a known issue or perhaps I'm missing something obvious? zpool > labelclear is also providing a similar error. The -f options are not > helping. > > > Any ideas what my issue maybe? The error suggests it is currently active > on > the pool, however the offline should have changed that status correct? > > Ultima > _______________________________________________ > freebsd-fs@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-fs > To unsubscribe, send any mail to "freebsd-fs-unsubscribe@freebsd.org"