考虑下面的命令和输出:
zfs send -Pvi \ tank/vms/langara@zfsnap-2016-05-11_00.00.00--1w \ tank/vms/langara@zfsnap-2016-05-13_00.00.00--1w \ | dd > /dev/null
运行1:
incremental zfsnap-2016-05-11_00.00.00--1w tank/vms/langara@zfsnap-2016-05-13_00.00.00--1w 4903284160 size 4903284160 17:29:42 1244483472 tank/vms/langara@zfsnap-2016-05-13_00.00.00--1w 17:29:43 2487508120 tank/vms/langara@zfsnap-2016-05-13_00.00.00--1w 17:29:44 3741453864 tank/vms/langara@zfsnap-2016-05-13_00.00.00--1w 9582310+895 records in 9582799+1 records out 4906393272 bytes (4.9 GB) copied, 3.94883 s, 1.2 GB/s
运行2:
incremental zfsnap-2016-05-11_00.00.00--1w tank/vms/langara@zfsnap-2016-05-13_00.00.00--1w 4903284160 size 4903284160 17:30:07 1209666712 tank/vms/langara@zfsnap-2016-05-13_00.00.00--1w 17:30:08 2411042632 tank/vms/langara@zfsnap-2016-05-13_00.00.00--1w 17:30:09 3632274072 tank/vms/langara@zfsnap-2016-05-13_00.00.00--1w 17:30:10 4853372344 tank/vms/langara@zfsnap-2016-05-13_00.00.00--1w 9582450+654 records in 9582799+1 records out 4906393272 bytes (4.9 GB) copied, 4.05346 s, 1.2 GB/s
不带-P选项运行:
total estimated size is 4.57G TIME SENT SNAPSHOT 17:36:23 1.11G tank/vms/langara@zfsnap-2016-05-13_00.00.00--1w 17:36:24 2.25G tank/vms/langara@zfsnap-2016-05-13_00.00.00--1w 17:36:25 3.39G tank/vms/langara@zfsnap-2016-05-13_00.00.00--1w 17:36:26 4.50G tank/vms/langara@zfsnap-2016-05-13_00.00.00--1w 9582443+679 records in 9582799+1 records out 4906393272 bytes (4.9 GB) copied, 4.01077 s, 1.2 GB/s
我有4个相关的问题。
-P开关列出的初始尺寸是否为估计值? 我认为这是没有-P开关,但没有澄清,这是一个估计。 zfs send输出的实际stream大小? zfs send的zfs send估计的stream大小,还是以干运行方式发送的唯一方法? logicalwritten (注意:不是一个真正的属性),会给我与written财产相同的信息,但使用未压缩的大小? Print machine-parsable verbose information about the stream package generated ,它是相同的信息,只是格式更好(例如,字节而不是转换为KB / MB / GB)。 另外,从你的例子4903284160/1024 ^ 3〜= 4.566,四舍五入到4.57,结束。 看看这个Oracle文档 ,可能会有所帮助:
Use the following dry-run syntax to estimate the size of the snapshot stream but not send it. # zfs send -rnv tank/source@snap1 estimated stream size: 10.0G You can monitor the progress of the send stream by inserting the pv command between the zfs send and the zfs receive commands. [...] When the snapshot stream is completely received, the progress monitor identifies the total size received. For example: # zfs send tank/source@snap1 | pv |zfs recv pond/target 10GB 0:01:55 [88.5MG/s] [ <=> ]
Solaris 11.3还引入了 send/recv 一些新的监视function ,将来可能会采用类似于illumos / OpenZFS的方法。
也许logicalused ? 从zfs的FreeBSD手册 (illumos也有这个属性,但手册页上没有描述):
logicalused The amount of space that is "logically" consumed by this dataset and all its descendents. See the used property. The logical space ignores the effect of the compression and copies properties, giving a quantity closer to the amount of data that applications see.