AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / server / 问题 / 776711
Accepted
Ryan J
Ryan J
Asked: 2016-05-14 15:50:15 +0800 CST2016-05-14 15:50:15 +0800 CST 2016-05-14 15:50:15 +0800 CST

`zfs send` 报告的大小是准确的还是估计的?

  • 772

考虑以下命令和输出:

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个相关问题。

  1. 随开关列出的初始尺寸-P是估计值吗?我认为这与没有开关的情况相同-P,但没有说明这是一个估计值。
  2. 发送完成后,有没有办法zfs send输出实际的流大小?
  3. 有什么方法可以计算出zfs send使用现有 ZFS 属性估计的流大小,还是干运行发送的唯一方法?
  4. 有没有类似的东西logicalwritten(注意:不是真正的财产)可以给我与财产相同的信息written,但使用未压缩的尺寸?
zfs zfsonlinux
  • 1 1 个回答
  • 2141 Views

1 个回答

  • Voted
  1. Best Answer
    user121391
    2016-05-18T01:58:19+08:002016-05-18T01:58:19+08:00
    1. 我会从手册页描述Print machine-parsable verbose information about the stream package generated中判断它是相同的信息,只是格式更好(例如,字节而不是转换为 KB/MB/GB)。此外,从您的示例 4903284160/1024^3~=4.566,四舍五入到 4.57,它检查出来。
    2. 看看这个 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东西将来可能会被 illumos/OpenZFS 采用。

    3. 估计的尺寸已经有了,你说的是实际尺寸吗?不幸的是,无法获得真实尺寸,详情请参阅此线程。
    4. 也许logicalused?从FreeBSD 的手册页(zfsillumos 也有该属性,但手册页缺少描述):

      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.
      
    • 2

相关问题

  • 从现有目录创建 zfs 的正确方法?

  • 如何将 ZFS ACL 从一个文件克隆到另一个文件?

  • ZFS 在演示期间在舞台上失败。这是正常行为吗?

  • Sneakernet 作为备份策略有意义吗?

  • ZFS 与 XFS

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    新安装后 postgres 的默认超级用户用户名/密码是什么?

    • 5 个回答
  • Marko Smith

    SFTP 使用什么端口?

    • 6 个回答
  • Marko Smith

    命令行列出 Windows Active Directory 组中的用户?

    • 9 个回答
  • Marko Smith

    什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同?

    • 3 个回答
  • Marko Smith

    如何确定bash变量是否为空?

    • 15 个回答
  • Martin Hope
    Tom Feiner 如何按大小对 du -h 输出进行排序 2009-02-26 05:42:42 +0800 CST
  • Martin Hope
    Noah Goodrich 什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同? 2009-05-19 18:24:42 +0800 CST
  • Martin Hope
    Brent 如何确定bash变量是否为空? 2009-05-13 09:54:48 +0800 CST
  • Martin Hope
    cletus 您如何找到在 Windows 中打开文件的进程? 2009-05-01 16:47:16 +0800 CST

热门标签

linux nginx windows networking ubuntu domain-name-system amazon-web-services active-directory apache-2.4 ssh

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve