Project

General

Profile

Bug #2399

zfs manual page does not document use of "zfs diff"

Added by Jon Strabala over 7 years ago. Updated about 7 years ago.

Status:
Resolved
Priority:
Low
Assignee:
Category:
manpage - manual pages
Start date:
2012-03-12
Due date:
% Done:

100%

Estimated time:
Difficulty:
Bite-size
Tags:

Description

There seems to be an undocumented functionality "zfs diff" not in the manual page for zfs, for example if I run "zfs diff" I get the following:

root[329]: zfs diff
must provide at least one snapshot name
usage:
        diff [-FHt] <snapshot> [snapshot|filesystem]

For the property list, run: zfs set|get

For the delegated permission list, run: zfs allow|unallow

Now if I give if a snapshot and a volume it works as follows:

root[330]: zfs list -t snapshot
NAME                              USED  AVAIL  REFER  MOUNTPOINT
rpool/ROOT/OI_151a2_dev@install   768M      -  2.74G  -
zp2m2s/pm@20120312                 70K      -  2.62G  -

root[331]: time zfs diff zp2m2s/pm@20120312 zp2m2s/pm
M       /pm/
M       /pm/TARFILES
M       /pm/cromeu
+       /pm/cromeu/E
0.0u 0.0s 0:00 20% 0+0k 0+0io 0pf+0w

I was curious as to what the options are. It appears from usr/src/cmd/zfs/zfs_main.c that they have to do with flags

Flag 'F' in the code ZFS_DIFF_CLASSIFY seems to list the file/object type

root[333]: time zfs diff -F zp2m2s/pm@20120312 zp2m2s/pm
M       /       /pm/
M       /       /pm/TARFILES
M       /       /pm/cromeu
+       F       /pm/cromeu/E
0.0u 0.0s 0:00 33% 0+0k 0+0io 0pf+0w

Flag 'H' in the code ZFS_DIFF_PARSEABLE - not sure what it does I could dig some more - but it list just like the default in my small limited test case.

root[335]: time zfs diff -H zp2m2s/pm@20120312 zp2m2s/pm
M       /pm/
M       /pm/TARFILES
M       /pm/cromeu
+       /pm/cromeu/E
0.0u 0.0s 0:00 33% 0+0k 0+0io 0pf+0w

Flag 't' in the code ZFS_DIFF_TIMESTAMP - seems to list the time of the change

root[334]: time zfs diff -t zp2m2s/pm@20120312 zp2m2s/pm
1331590148.212285380    M       /pm/
1331590240.024192970    M       /pm/TARFILES
1331590240.024174448    M       /pm/cromeu
1331590255.827126040    +       /pm/cromeu/E
0.0u 0.0s 0:00 33% 0+0k 0+0io 0pf+0w

Still the features should be documented in the 'zfs' manual page.


Related issues

Has duplicate illumos gate - Bug #545: no documentation for zfs 'diff' in zfs man pageClosed2010-12-18

Actions

History

#1

Updated by n2deep n2deep over 7 years ago

Hi Jon, this is good investigative work here, but seems to be a duplicate of #545:
https://www.illumos.org/issues/545

#2

Updated by Rich Lowe over 7 years ago

  • Subject changed from zfs manual page does not document use of "zfs diff"zfs manual page does not describe "zfs diff " to zfs manual page does not document use of "zfs diff"
#3

Updated by Rich Lowe about 7 years ago

  • Category set to manpage - manual pages
  • Status changed from New to In Progress
  • Assignee set to Rich Lowe
  • % Done changed from 0 to 90
  • Difficulty changed from Medium to Bite-size
  • Tags deleted (needs-triage)
#4

Updated by Rich Lowe about 7 years ago

  • Status changed from In Progress to Resolved
  • % Done changed from 90 to 100

Resolved in r13773 commit:00c2a08cf1bb

Also available in: Atom PDF