为什么`zfs list` 和`zpool list` 报告我的raidz2 池的大小非常不同?

mkc*_*mkc 15 zfs zfsonlinux

我有一个带有 8 个 zpools 的 ZFS 服务器。每个池是 12 个 6TB 磁盘,采用 10+2 RAIDZ 配置。因此,每个池的原始存储空间为 12*6=72 TB,可用空间为 10*6=60 TB。但是,当我使用zfs listvs. using查询它时,我看到不同的结果zpool list,如下所示:

# zfs list
NAME     USED  AVAIL  REFER  MOUNTPOINT
intp1    631K  48.0T   219K  /intp1
intp2    631K  48.0T   219K  /intp2
intp3    631K  48.0T   219K  /intp3
jbodp4   631K  48.0T   219K  /jbodp4

# zpool list
NAME     SIZE  ALLOC   FREE  EXPANDSZ   FRAG    CAP  DEDUP  HEALTH  ALTROOT
intp1     65T  1.02M  65.0T         -     0%     0%  1.00x  ONLINE  -
intp2     65T  1020K  65.0T         -     0%     0%  1.00x  ONLINE  -
intp3     65T  1.02M  65.0T         -     0%     0%  1.00x  ONLINE  -
jbodp4    65T  1.02M  65.0T         -     0%     0%  1.00x  ONLINE  -
Run Code Online (Sandbox Code Playgroud)

有人可以帮助我理解为什么会出现这种差异吗?

eww*_*ite 12

我很惊讶你有这么大的设置。你构建了这个数组吗?由于池设计,这可能是性能不佳的安排。

无论哪种方式,zpool手册页都解释了这一点。zfs list将显示您的可用空间。该zpool列表将奇偶校验空间显示为存储空间。

   used                Amount of storage space used within the pool.

   The  space  usage properties report actual physical space available to the storage pool. The physical
   space can be different from the total amount of space that any contained datasets can  actually  use.
   The  amount  of  space used in a raidz configuration depends on the characteristics of the data being
   written. In addition, ZFS reserves some space for internal accounting that the zfs(8)  command  takes
   into  account, but the zpool command does not. For non-full pools of a reasonable size, these effects
   should be invisible. For small pools, or pools that are close to being completely  full,  these  dis-
   crepancies may become more noticeable.
Run Code Online (Sandbox Code Playgroud)

  • 我想您忘记了 6Tb 磁盘并不是真正的 6Tb,因为磁盘制造商之间存在阴谋,因为他们认为 1 GB 不是 1 073 741 824 字节,应该是,而是 1 000 000 000 字节。这需要会计方面的一些重要空间。 (3认同)
  • @RyanBabchishin 作者是商业 ZFS 存储软件供应商 [Nexenta](https://nexenta.com/products/nexentastor) 的工程师。这些建议基于经验、性能和对文件系统的透彻理解。我并不是说人们不能按照他们想要的方式配置东西或者它不会工作:这不是最优的。在 OP 的情况下,他的随机 I/O 性能将在 12 盘设计下受到影响。 (2认同)
  • @drookie,你是对的。`lsblk -b` 给了我每个磁盘的字节大小,它是 5.4TB 而不是我之前想象的 6TB。 (2认同)