ZFS pool cheating

Trond Endrestøl Trond.Endrestol at fagskolen.gjovik.no
Wed Nov 20 18:55:44 UTC 2013


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


More information about the freebsd-hackers mailing list