Project

General

Profile

Feature #1646

"zfs send" should estimate size of stream

Added by Matthew Ahrens almost 8 years ago. Updated almost 8 years ago.

Status:
Resolved
Priority:
Normal
Category:
zfs - Zettabyte File System
Start date:
2011-10-14
Due date:
% Done:

0%

Estimated time:
Difficulty:
Medium
Tags:
needs-triage

Description

"zfs send" should be able to estimate the size of the send stream, using the same underlying logic as the "zfs written@" property. This will be handled via the existing "zfs send -v" flag, plus two new flags: -n and -P:

manpage changes:

-n

Do a dry-run ("No-op") send. Do not generate any
actual send data. This is useful in conjunction
with the -v or -P flags to determine what data will
be sent.

-P

Print machine-parsable verbose information about the
stream package generated.

example:

$ zfs send -Rnv rpool/versions/2011.08.11.00/running/svc@2011.08.19.00
send from @ to rpool/versions/2011.08.11.00/running/svc@2011.08.12.00 estimated size is 14.4M
send from @2011.08.12.00 to rpool/versions/2011.08.11.00/running/svc@2011.08.15.00 estimated size is 9.03M
send from @2011.08.15.00 to rpool/versions/2011.08.11.00/running/svc@2011.08.19.00 estimated size is 13.5M
total estimated size is 37.0M

$ zfs send -RvP rpool/versions/2011.08.11.00/running/svc@2011.08.19.00 | wc -c
full    rpool/versions/2011.08.11.00/running/svc@2011.08.12.00  15117480
incremental     2011.08.12.00   rpool/versions/2011.08.11.00/running/svc@2011.08.15.00  9468864
incremental     2011.08.15.00   rpool/versions/2011.08.11.00/running/svc@2011.08.19.00  14195616
size    38781960
38868136

History

#1

Updated by Eric Schrock almost 8 years ago

  • Status changed from New to Resolved

changeset: 13509:04570f5cbeca
tag: tip
user: Matthew Ahrens <>
date: Sat Nov 05 17:34:13 2011 -0700

description:
1644 add ZFS "clones" property
1645 add ZFS "written" and "written@..." properties
1646 "zfs send" should estimate size of stream
1647 "zfs destroy" should determine space reclaimed by destroying multiple snapshots
1708 adjust size of zpool history data
Reviewed by: Richard Lowe <>
Reviewed by: George Wilson <>
Approved by: Gordon Ross <>

modified:
usr/src/cmd/truss/codes.c
usr/src/cmd/zfs/zfs_main.c
usr/src/cmd/zoneadmd/Makefile
usr/src/common/zfs/zfs_prop.c
usr/src/lib/libzfs/Makefile.com
usr/src/lib/libzfs/common/libzfs.h
usr/src/lib/libzfs/common/libzfs_dataset.c
usr/src/lib/libzfs/common/libzfs_impl.h
usr/src/lib/libzfs/common/libzfs_sendrecv.c
usr/src/lib/libzfs/common/libzfs_util.c
usr/src/lib/libzfs/common/mapfile-vers
usr/src/man/man1m/zfs.1m
usr/src/uts/Makefile.uts
usr/src/uts/common/fs/zfs/bpobj.c
usr/src/uts/common/fs/zfs/dmu_send.c
usr/src/uts/common/fs/zfs/dsl_dataset.c
usr/src/uts/common/fs/zfs/dsl_deadlist.c
usr/src/uts/common/fs/zfs/dsl_deleg.c
usr/src/uts/common/fs/zfs/dsl_pool.c
usr/src/uts/common/fs/zfs/spa_history.c
usr/src/uts/common/fs/zfs/sys/dmu.h
usr/src/uts/common/fs/zfs/sys/dsl_dataset.h
usr/src/uts/common/fs/zfs/sys/dsl_deleg.h
usr/src/uts/common/fs/zfs/zap_micro.c
usr/src/uts/common/fs/zfs/zfs_ioctl.c
usr/src/uts/common/sys/fs/zfs.h
added:
usr/src/lib/libzfs/common/libzfs_iter.c
removed:
usr/src/lib/libzfs/common/libzfs_graph.c

#2

Updated by Rich Lowe almost 8 years ago

  • Status changed from Resolved to In Progress

Backed out by r13511 commit:4bd28e91c699

Broke snapshots, BEs, possibly other things.

#3

Updated by Eric Schrock almost 8 years ago

  • Status changed from In Progress to Resolved

changeset: 13524:f0e12b33f77c
tag: tip
user: Matthew Ahrens <>
date: Thu Nov 17 10:14:36 2011 -0800

description:
1644 add ZFS "clones" property
1645 add ZFS "written" and "written@..." properties
1646 "zfs send" should estimate size of stream
1647 "zfs destroy" should determine space reclaimed by destroying multiple snapshots
1708 adjust size of zpool history data
Reviewed by: Richard Lowe <>
Reviewed by: George Wilson <>
Reviewed by: Albert Lee <>
Approved by: Garrett D'Amore <>

modified:
usr/src/cmd/ndmpd/ndmp/ndmpd_zfs.c
usr/src/cmd/truss/codes.c
usr/src/cmd/zfs/zfs_main.c
usr/src/common/zfs/zfs_prop.c
usr/src/lib/libbe/common/be_create.c
usr/src/lib/libzfs/Makefile.com
usr/src/lib/libzfs/common/libzfs.h
usr/src/lib/libzfs/common/libzfs_dataset.c
usr/src/lib/libzfs/common/libzfs_impl.h
usr/src/lib/libzfs/common/libzfs_sendrecv.c
usr/src/lib/libzfs/common/libzfs_util.c
usr/src/lib/libzfs/common/mapfile-vers
usr/src/man/man1m/zfs.1m
usr/src/uts/Makefile.uts
usr/src/uts/common/fs/zfs/bpobj.c
usr/src/uts/common/fs/zfs/dmu_send.c
usr/src/uts/common/fs/zfs/dsl_dataset.c
usr/src/uts/common/fs/zfs/dsl_deadlist.c
usr/src/uts/common/fs/zfs/dsl_deleg.c
usr/src/uts/common/fs/zfs/dsl_pool.c
usr/src/uts/common/fs/zfs/spa_history.c
usr/src/uts/common/fs/zfs/sys/dmu.h
usr/src/uts/common/fs/zfs/sys/dsl_dataset.h
usr/src/uts/common/fs/zfs/sys/dsl_deleg.h
usr/src/uts/common/fs/zfs/zap_micro.c
usr/src/uts/common/fs/zfs/zfs_ioctl.c
usr/src/uts/common/sys/fs/zfs.h
added:
usr/src/lib/libzfs/common/libzfs_iter.c
removed:
usr/src/lib/libzfs/common/libzfs_graph.c

Also available in: Atom PDF