Hi Brad,

this is indeed a good idea.

But I assume that it will be difficult to do, due to the low-level nature
of zfs send/receive.

In your compression example, you're asking for zfs send/receive to
decompress the blocks on the fly. But send/receive operates on a lower
level: It doesn't care much what is actually inside the blocks, it
just copies the block structure "as is".

So, unless zfs send/receive starts looking inside the blocks it copies,
it is probably better to use good old tar or cpio.

I would also assume that zfs send/receive doesn't know (and doesn't
have to) anything about zfs dataset properties. It just starts at
the snapshot level (which works independently of whether it's used for
a filesystem, a ZVOL, a whatever) and copies the subtree.

But for the sake of implementing the RFE, one could extend the ZFS
send/receive framework with a module that permits manipulation of the
data on the fly, specifically in order to allow for things like
recompression, en/decryption, change of attributes at the dataset level,
etc.

Best regards,
    Constantin

Brad Diggs wrote:
> I love the send and receive feature of zfs.  However, the one feature 
> that it lacks is that I can't specify on the receive end how I want 
> the destination zfs filesystem to be be created before receiving the
> data being sent.  
> 
> For example, lets say that I would like to do a compression study to
> determine which level of compression of the gzip algorithm would save
> the most space for my data.  One of the easiest ways to do that 
> locally or remotely would be to use send/receive like so.
> 
> zfs snapshot zpool/[EMAIL PROTECTED]
> gz=1
> while [ ${gz} -le 9 ]
> do
>    zfs send zpool/[EMAIL PROTECTED] | \
>      zfs receive -o compression=gzip-${gz} zpool/gz${gz}data
>    zfs list zpool/gz${gz}data
> done
> zfs destroy zpool/[EMAIL PROTECTED]
> 
> Another example.  Lets assume that that the zfs encryption feature was
> available today.  Further, lets assume that I have a filesystem that
> has compression and encryption enabled.  I want to duplicate that exact
> zfs filesystem on another system through send/receive.  Today the
> receive feature does not give me the ability to specify the desired end
> state configuration of the destination zfs filesystem before receiving
> the data.  I think that would be a great feature.
> 
> Just some food for thought.
> 
> Thanks in advance,
> Brad
> 
> _______________________________________________
> zfs-discuss mailing list
> zfs-discuss@opensolaris.org
> http://mail.opensolaris.org/mailman/listinfo/zfs-discuss

-- 
Constantin Gonzalez                            Sun Microsystems GmbH, Germany
Platform Technology Group, Global Systems Engineering      http://www.sun.de/
Tel.: +49 89/4 60 08-25 91        www.google.com/search?q=constantin+gonzalez

Sitz d. Ges.: Sun Microsystems GmbH, Sonnenallee 1, 85551 Kirchheim-Heimstetten
Amtsgericht Muenchen: HRB 161028
Geschaeftsfuehrer: Thomas Schroeder, Wolfgang Engels, Dr. Roland Boemer
Vorsitzender des Aufsichtsrates: Martin Haering
_______________________________________________
zfs-discuss mailing list
zfs-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/zfs-discuss

Reply via email to