ZFS pool cheating

Trond Endrestøl Trond.Endrestol at fagskolen.gjovik.no
Thu Nov 21 07:18:16 UTC 2013


> -----Original Message-----
> From: Trond.Endrestol at fagskolen.gjovik.no [mailto:Trond.Endrestol at fagskolen.gjovik.no] 
> Sent: 20. listopadu 2013 19:56
> To: Jan Du?átko
> Cc: freebsd-hackers at FreeBSD.org
> Subject: Re: ZFS pool cheating
> 
> 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.

On Wed, 20 Nov 2013 21:14+0100, Jan Du?átko wrote:

> Did you try to send snapshot over network ?

No, I haven't tried anything, this is just off the top of my head.

> I prepared backup using tar, currently plan to do ZFS snapshot and 
> if there will be possibility to send it over SSH, I can minimize 
> downtime and in the same time check / verify functionality of new 
> pool with the same name

BTW, please don't top-post.

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