Lyle Merdan
2007-Apr-23 18:48 UTC
[zfs-discuss] zfs receive and setting properties like compression
So If I send a snapshot of a filesystem to a receive command like this: zfs send tank/jump at 1 | zfs receive backup/jump In order to get compression turned on, am I correct in my thought that I need to start the send/receive and then in a separate window set the compression property? Or am I missing something? I understand the destination filesystem cannot exist during a receive. This message posted from opensolaris.org
Eric Schrock
2007-Apr-23 18:51 UTC
[zfs-discuss] zfs receive and setting properties like compression
On Mon, Apr 23, 2007 at 11:48:53AM -0700, Lyle Merdan wrote:> So If I send a snapshot of a filesystem to a receive command like this: > zfs send tank/jump at 1 | zfs receive backup/jump > > In order to get compression turned on, am I correct in my thought that > I need to start the send/receive and then in a separate window set the > compression property?Yes. For doing this automatically, you want: 6421959 want zfs send to preserve properties (''zfs send -p'') Which is being worked on. - Eric -- Eric Schrock, Solaris Kernel Development http://blogs.sun.com/eschrock
Mark J Musante
2007-Apr-23 18:55 UTC
[zfs-discuss] zfs receive and setting properties like compression
On Mon, 23 Apr 2007, Lyle Merdan wrote:> So If I send a snapshot of a filesystem to a receive command like this: > zfs send tank/jump at 1 | zfs receive backup/jump > > In order to get compression turned on, am I correct in my thought that I > need to start the send/receive and then in a separate window set the > compression property?No: if you set compression=on for the ''backup'' pool, the backup/jump filesystem will inherit that automatically when zfs receive creates it. Regards, markm
Mark J Musante
2007-Apr-23 19:20 UTC
[zfs-discuss] zfs receive and setting properties like compression
On Mon, 23 Apr 2007, Eric Schrock wrote:> On Mon, Apr 23, 2007 at 11:48:53AM -0700, Lyle Merdan wrote: > > So If I send a snapshot of a filesystem to a receive command like this: > > zfs send tank/jump at 1 | zfs receive backup/jump > > > > In order to get compression turned on, am I correct in my thought that > > I need to start the send/receive and then in a separate window set the > > compression property? > > Yes. For doing this automatically, you want:OK, I guess this is a ''depends on what you want'' kind of question. If you want the receiving filesystem to automatically inherit the properties of the sent snapshot, then, as Eric said, that''s being worked on. But if you''re just interested in compression (or any other inheritible property), then you can set it on the filesystem above the one you''re receiving into, and it will be set when the receive filesystem is created. If you don''t want to set it on the whole ''backup'' pool, you could create an intermediate filesystem. # zfs get compression backup NAME PROPERTY VALUE SOURCE backup compression off default # zfs create -o compression=on backup/compressed # zfs get compression backup/compressed NAME PROPERTY VALUE SOURCE backup/compressed compression on local # zfs send tank/jump at 1 | zfs receive backup/compressed/jump # zfs get -r compression backup NAME PROPERTY VALUE SOURCE backup compression off default backup/compressed compression on local backup/compressed/jump compression on inherited from backup/compressed backup/compressed/jump at 1 compression - - # That way you could store both compressed and uncompressed datasets in the same pool. Regards, markm