On Tue, May 30, 2006 at 12:30:50PM +0200, Constantin Gonzalez Schmitz wrote: > Hi, > > >>Yes, a trivial wrapper could: > >>1. Store all property values in a file in the fs > >>2. zfs send... > >>3. zfs receive... > >>4. Set all the properties stored in that file > > > >IMHO 3. and 4. need to be swapped - otherwise e.g. files will > >not be compressed when restored. > > hmm, I assumed that the ZFS stream format would take the blocks as they are > (compressed) and then restore them in a 1:1 fashion (compressed) no matter > what the target fs' compression setting is. > > Then, the missing compression attribute would only affect new files, > while old files are still compressed (just like ZFS doesn't unpack > everything if you just turn off compression).
Actually, the 'zfs send' stream sends the data uncompressed, and when it is received, the compression property is consulted to determine whether to compress it or not. This scheme may not have the best possible performance, but it is flexable. For example, if the other machine has less disk space available, or if it has lots of spare CPU power, then you might want to enable compression there but not on the sent filesystem. Or, if you are simply writing the stream to a file (or tape) for backup purposes, you might want to apply a stronger compression algorithm than the one that we offer, and compressing the already somewhat-compressed data would probably not result in a good compression ratio. Sorry for the belated reply, --matt _______________________________________________ zfs-discuss mailing list zfs-discuss@opensolaris.org http://mail.opensolaris.org/mailman/listinfo/zfs-discuss