Date: Fri, 16 Aug 2013 14:56:26 +0100 From: Matt Churchyard <matt.home@userve.net> To: <freebsd-fs@freebsd.org> Subject: Re: what is the "correct" way to "replicate" mem stick with ZFS on =?UTF-8?Q?it=3F?= Message-ID: <82fb7b70d47ad58db2b2f0b803bf5160@users.userve.net>
next in thread | raw e-mail | index | archive | help
> hi all, > > please, advice > > what is the "correct" way to "replicate" mem stick with ZFS on it? > > what I mean: > > we have mem stick with ZFS pool `mypool' on it > > how to get copy of the mem stick (including the name of the pool)? > > - `zfs send ... | zfs receive ...' ? > > is not what will help untill pool names > on both mem sticks are the same (it is not what I want) > > - to make mirror and to detach second mem stick after resilvering? > > I have bad experience with detaching (perhapse I do it wrong way) > > - dd ? I personally would be wary of completely cloning the filesystem due to it having completely identical GUID's etc. I'm not sure how the system will behave when given two disks with identical pools. You may be OK if you don't import the pools and there's no chance of two of the mem sticks being in the same machine again. Obviously dd should work to completely clone the memory stick. You could also use dd to create an image file of one memory stick and use that in future to provision other memory sticks. Detach is not a possible choice as it literally removes the device from ZFS, so that device is not marked as part of a ZFS pool anymore. You could attach the new device as a mirror, then use the 'zfs split' command to split the second mem stick off into a new pool. This will require the new pool to have a unique name though, as with the ZFS send/recv option. Personally I would prefer one of these options, and to then use 'zpool import new-pool-name required-pool-name' to import the pool with the correct name when beginning to use it.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?82fb7b70d47ad58db2b2f0b803bf5160>