Edward Ned Harvey (opensolarisisdeadlongliveopensolaris)
2012-Dec-21 18:39 UTC
[zfs-discuss] zfs receive options (was S11 vs illumos zfs compatiblity)
> From: zfs-discuss-bounces at opensolaris.org [mailto:zfs-discuss- > bounces at opensolaris.org] On Behalf Of bob netherton > > You can, with recv, override any property in the sending stream that can > be > set from the command line (ie, a writable). > > # zfs send repo/support at cpu-0412 | zfs recv -o version=4 repo/test > cannot receive: cannot override received versionAre you sure you can do this with other properties? It''s not in the man page. I would like to set the compression & sync on the receiving end: zfs send foo/bar at 42 | zfs receive -o compression=on,sync=disabled biz/baz I have not yet tried this syntax. Because you mentioned it, I looked for it in the man page, and because it''s not there, I hesitate before using it.
Edward Harvey
2012-Dec-21 18:41 UTC
[zfs-discuss] zfs receive options (was S11 vs illumos zfs compatiblity)
> From: zfs-discuss-bounces at opensolaris.org [mailto:zfs-discuss- > bounces at opensolaris.org] On Behalf Of Edward Ned Harvey > > zfs send foo/bar at 42 | zfs receive -o compression=on,sync=disabled biz/baz > > I have not yet tried this syntax. Because you mentioned it, I looked for it in > the man page, and because it''s not there, I hesitate before using it.Also, readonly=on
Edward Ned Harvey (opensolarisisdeadlongliveopensolaris)
2012-Dec-21 19:31 UTC
[zfs-discuss] zfs receive options (was S11 vs illumos zfs compatiblity)
> From: zfs-discuss-bounces at opensolaris.org [mailto:zfs-discuss- > bounces at opensolaris.org] On Behalf Of Edward Ned Harvey > > zfs send foo/bar at 42 | zfs receive -o compression=on,sync=disabled biz/baz > > I have not yet tried this syntax. Because you mentioned it, I looked for it in > the man page, and because it''s not there, I hesitate before using it.Also, readonly=on ... and ... Bummer. When I try zfs receive with -o, I get the message: invalid option ''o''
Cindy Swearingen
2012-Dec-21 21:24 UTC
[zfs-discuss] zfs receive options (was S11 vs illumos zfs compatiblity)
Hi Ned, Which man page are you referring to? I see the zfs receive -o syntax in the S11 man page. The bottom line is that not all properties can be set on the receiving side and the syntax is one property setting per -o option. See below for several examples. Thanks, Cindy I don''t think version is a property that can be set on the receiving size. The version must be specified when the file system is created: # zfs create -o version=5 tank/joe You can''t change blocksize on the receiving side either because it is set during the I/O path. You can use shadow migration to migrate a file system''s blocksize. This syntax errors because the supported syntax is "-o property" not "-o properties." # zfs send tank/home/cindy at now | zfs receive -o compression=on,sync=disabled pond/cindy.backup cannot receive new filesystem stream: ''compression'' must be one of ''on | off | lzjb | gzip | gzip-[1-9] | zle'' Set multiple properties like this: # zfs send tank/home/cindy at now | zfs receive -o compression=on -o sync=disabled pond/cindy.backup2 Enabling compression on the receiving side works, but verifying the compression can''t be done with ls. The data is compressed on the receiving side: # zfs list -r pond | grep data pond/cdata 168K 63.5G 168K /pond/cdata pond/nocdata 289K 63.5G 289K /pond/nocdata # zfs send -p pond/nocdata at snap1 | zfs recv -Fo compression=on rpool/cdata # zfs get compression pond/nocdata NAME PROPERTY VALUE SOURCE pond/nocdata compression off default # zfs get compression rpool/cdata NAME PROPERTY VALUE SOURCE rpool/cdata compression on local You can''t see the compressed size with the ls command: # ls -lh /pond/nocdata/file.1 -r--r--r-- 1 root root 202K Dec 21 13:52 /pond/nocdata/file.1 # ls -lh /rpool/cdata/file.1 -r--r--r-- 1 root root 202K Dec 21 13:52 /rpool/cdata/file.1 You can see the size difference with zfs list: # zfs list -r pond rpool | grep data pond/cdata 168K 63.5G 168K /pond/cdata pond/nocdata 289K 63.5G 289K /pond/nocdata rpool/cdata 168K 47.6G 168K /rpool/cdata You can also see the size differences with du -h: # du -h pond/nocdata/file.1 258K pond/nocdata/file.1 # du -h rpool/cdata/file.1 137K rpool/cdata/file.1 On 12/21/12 11:41, Edward Harvey wrote:>> From: zfs-discuss-bounces at opensolaris.org [mailto:zfs-discuss- >> bounces at opensolaris.org] On Behalf Of Edward Ned Harvey >> >> zfs send foo/bar at 42 | zfs receive -o compression=on,sync=disabled biz/baz >> >> I have not yet tried this syntax. Because you mentioned it, I looked for it in >> the man page, and because it''s not there, I hesitate before using it. > > Also, readonly=on > > _______________________________________________ > zfs-discuss mailing list > zfs-discuss at opensolaris.org > http://mail.opensolaris.org/mailman/listinfo/zfs-discuss
Edward Ned Harvey (opensolarisisdeadlongliveopensolaris)
2012-Dec-22 20:09 UTC
[zfs-discuss] zfs receive options (was S11 vs illumos zfs compatiblity)
> From: Cindy Swearingen [mailto:cindy.swearingen at oracle.com] > > Which man page are you referring to? > > I see the zfs receive -o syntax in the S11 man page.Oh ... It''s the latest openindiana. So I suppose it must be a new feature post-rev-28 in the non-open branch... But it''s no big deal. I found that if I "zfs create" and then "zfs set" a few times, and then "zfs receive" I get the desired behavior.
Maybe Matching Threads
- Can I create a mirror for a root rpool?
- zfs allow does not work for rpool
- How to rename rpool. Is that recommended ?
- Best practice for full stystem backup - equivelent of ufsdump/ufsrestore
- Solaris 11 System Reboots Continuously Because of a ZFS-Related Panic (7191375)