On Thu, 3 Dec 2009, Jason King wrote:

Well it could be done in a way such that it could be fs-agnostic
(perhaps extending /bin/cat with a new flag such as -o outputfile, or
detecting if stdout is a file vs tty, though corner cases might get
tricky).   If a particular fs supported such a feature, it could take
advantage of it, but if it didn't, it could fall back to doing a
read+append.  Sort of like how mv figures out if the source & target
are the same or different filesystems and acts accordingly.

The most common way that I concatenate files into a larger file is by using a utility such as 'tar', which outputs a different format. I rarely use 'cat' to concatenate files.

It is desired to concatenate files in a way which works best for deduplication then a tar-like format can be invented which takes care to always start new file output on a filesystem block boundary. With zfs deduplication this should be faster and take less space than compressing the entire result as long as the ouput is stored in the same pool. If output is written to a destination filesystem which uses a different block size, then the ideal block size will be that of the destination filesystem so that large archive files can still be usefull deduplicated.

Bob
--
Bob Friesenhahn
bfrie...@simple.dallas.tx.us, http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer,    http://www.GraphicsMagick.org/
_______________________________________________
zfs-discuss mailing list
zfs-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/zfs-discuss

Reply via email to