Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 20 Nov 2013 19:55:34 +0100 (CET)
From:      =?ISO-8859-1?Q?Trond_Endrest=F8l?= <Trond.Endrestol@fagskolen.gjovik.no>
To:        =?UTF-8?Q?Jan_Du=C5=A1=C3=A1tko?= <jan@dusatko.org>
Cc:        freebsd-hackers@FreeBSD.org
Subject:   Re: ZFS pool cheating
Message-ID:  <alpine.BSF.2.00.1311201944490.26875@mail.fig.ol.no>
In-Reply-To: <029f01cee610$4567f870$d037e950$@org>
References:  <029f01cee610$4567f870$d037e950$@org>

next in thread | previous in thread | raw e-mail | index | archive | help
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.      |
+-------------------------------+------------------------------------+



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