From owner-freebsd-hackers@FreeBSD.ORG Wed Nov 20 18:55:44 2013 Return-Path: Delivered-To: freebsd-hackers@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AECCB6D4 for ; Wed, 20 Nov 2013 18:55:44 +0000 (UTC) Received: from smtp.fagskolen.gjovik.no (smtp.fagskolen.gjovik.no [IPv6:2001:700:1100:1:200:ff:fe00:b]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 21F472167 for ; Wed, 20 Nov 2013 18:55:43 +0000 (UTC) Received: from mail.fig.ol.no (localhost [127.0.0.1]) by mail.fig.ol.no (8.14.7/8.14.7) with ESMTP id rAKItZSV068537 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 20 Nov 2013 19:55:35 +0100 (CET) (envelope-from trond@fagskolen.gjovik.no) Received: from localhost (trond@localhost) by mail.fig.ol.no (8.14.7/8.14.7/Submit) with ESMTP id rAKItZ6k068534; Wed, 20 Nov 2013 19:55:35 +0100 (CET) (envelope-from trond@fagskolen.gjovik.no) X-Authentication-Warning: mail.fig.ol.no: trond owned process doing -bs Date: Wed, 20 Nov 2013 19:55:34 +0100 (CET) From: =?ISO-8859-1?Q?Trond_Endrest=F8l?= Sender: Trond.Endrestol@fagskolen.gjovik.no To: =?UTF-8?Q?Jan_Du=C5=A1=C3=A1tko?= Subject: Re: ZFS pool cheating In-Reply-To: <029f01cee610$4567f870$d037e950$@org> Message-ID: References: <029f01cee610$4567f870$d037e950$@org> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) Organization: Fagskolen Innlandet OpenPGP: url=http://fig.ol.no/~trond/trond.key MIME-Version: 1.0 X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED autolearn=unavailable version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on mail.fig.ol.no Content-Type: TEXT/PLAIN; charset=ISO-8859-1 Content-Transfer-Encoding: 8BIT X-Content-Filtered-By: Mailman/MimeDel 2.1.16 Cc: freebsd-hackers@FreeBSD.org X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Nov 2013 18:55:44 -0000 On Wed, 20 Nov 2013 17:47+0100, Jan Du?átko wrote: > Dear, > Do you someone know method, how can be pool converted from concatenating to > regular mirror? By mistake I replaced failed disk in pool using add not > replace, which caused me to change pool configuration. > I looking method allow me to have pool online during whole replacement > procedure. > > Regards > > Jan I'm afraid your only option is something along these lines: 1. Make a recursive snapshot of the entire pool. 2. Send a recursive ZFS stream of the recursive snapshots to another pool, or disk. Beware of the danger of data loss by having only a single set of snapshots available as you proceed. 3. Destroy the old pool. 4. Recreate the original pool to a mirrored configuration. 5. Transfer the recursive ZFS stream back to the new pool using the zfs receive command. 6. Remove the recursive snapshots, if warranted. If your able to setup a fresh pair of disks in your server, you might be able to transfer the snapshots to a mirrored pool assigned a temporary name. Then export both the current pool and the temporary pool. Import the temporary pool and rename the pool to the correct name as you import the temp pool. I guess/hope someone more knowledgeable on ZFS will chime in and correct me. -- +-------------------------------+------------------------------------+ | Vennlig hilsen, | Best regards, | | Trond Endrestøl, | Trond Endrestøl, | | IT-ansvarlig, | System administrator, | | Fagskolen Innlandet, | Gjøvik Technical College, Norway, | | tlf. mob. 952 62 567, | Cellular...: +47 952 62 567, | | sentralbord 61 14 54 00. | Switchboard: +47 61 14 54 00. | +-------------------------------+------------------------------------+