[OpenIndiana-discuss] Error in send/receive in moving a zone

Jim Klimov jimklimov at cos.ru
Sat May 25 23:12:04 UTC 2013


On 2013-05-25 22:23, Mark Creamer wrote:
> Hi, I'm attempting to move a zone to another server using the same steps I
> came up with the other day, which has been working until now:
>
> 1. Halt the source zone
> 2. Snapshot the source zone:  zfs snapshot -r datastore/zones/db163 at migrate
> 3. zfs send -R datastore/zones/db163 at migrate | ssh dest-server zfs receive
> -d datastore
>
> The send/receive begins. One the destination server, I can see
> datastore/zones/db163 and datastore/zones/db163/ROOT created.
>
> A few moments later, I get the following error on the source server:
>
> cannot receive: local origin for clone
> datastore/zones/db163/ROOT/zbe-3 at zfs-auto-snap_monthly-2012-01-10-14h35does
> not exist
>
> I guess it's saying there is a dependency on that old snapshot that must
> not exist anymore, so it can't build the zone properly on the destination
> server. How do I resolve this? Am I missing a switch in my command
> somewhere?


I think you should "zfs get origin datastore/zones/db163/ROOT/zbe-3"
on your source server and dance from there. Likely, the send tries
to pass up only the datasets in the branch you've indicated (db163),
and it seems that you've cloned your zone from another dataset, such
as a golden zone. Also, judging by the timestamp in that particular
snapshot (over a year ago) that dataset might be already gone and
your zone promoted to be the origin, for example. I'd think that zfs
would catch that and promote origins in all the descendant snapshots
as well ... but since you're migrating off an older box, maybe that
did not work in that version?..

If there's no particular reason to send all snapshots, you might be
better off sending just ones you know to have consistent state (i.e.
ones made while the zone was down, if you mark them somehow) and
making the series of incremental send's yourself or scripting this
by parsing "zfs list" outputs, or just send the current state (very
recent snapshot) as the only increment - as the initial "full" send.
This would likely get you less fragmentation for your current data
at the cost of having no older data which was in those not-sent
snapshots (and which was deleted after those snapshots were made).

HTH,
//Jim




More information about the OpenIndiana-discuss mailing list