clinta / clinta.github.io

A tech blog by Clint.
4 stars 2 forks source link

Send Receive is better than clone #4

Closed KreizIT closed 6 years ago

KreizIT commented 7 years ago

https://github.com/clinta/clinta.github.io/blob/54b849e6fec70856d1ccdceaa82fd46b3e122743/freebsd-jails-the-hard-way/index.html#L232

Zfs clone maintain relationship betwin snapshot and dataset. If you need to update skeleton you cannot remove this snapshot to recreate it.

As thinjail1 will live it's own life, should be better to do : zfs send zroot/jails/templates/skeleton-10.2-RELEASE@skeleton | zfs received zroot/jails/thinjails/thinjail1

Also as received create also a snapshot you should issu a zfs destroy zroot/jails/thinjails/thinjail1@skeleton to forget about this snapshot.

clinta commented 7 years ago

You can remove the relationship between the parent snapshot and the clone with zfs promote. Once you promote the child dataset you can delete the parent snapshot all without duplicating the data blocks like a send | receive does.

On Fri, Sep 8, 2017, 12:32 Cedric notifications@github.com wrote:

https://github.com/clinta/clinta.github.io/blob/54b849e6fec70856d1ccdceaa82fd46b3e122743/freebsd-jails-the-hard-way/index.html#L232

Zfs clone maintain relationship betwin snapshot and dataset. If you need to update skeleton you cannot remove this snapshot to recreate it.

As thinjail1 will live it's own life, should be better to do : zfs send zroot/jails/templates/skeleton-10.2-RELEASE@skeleton | zfs received zroot/jails/thinjails/thinjail1

Also as received create also a snapshot you should issu a zfs destroy zroot/jails/thinjails/thinjail1@skeleton to forget about this snapshot.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/clinta/clinta.github.io/issues/4, or mute the thread https://github.com/notifications/unsubscribe-auth/ADB73TNluRdt7OFZJ5muV3jX_T0DKrK_ks5sgWwjgaJpZM4PRafl .