bhyve vm の centos7。
ファイルとして確保した領域に zero を書くと、ホスト型の zfs の REFER は下がるのか。
結論からすれば、下がった。
# ゲストはインデント
host# zfs get compression zroot/vm/centos7_shred
NAME PROPERTY VALUE SOURCE
zroot/vm/centos7_shred compression lz4 inherited from zroot
host# zfs list zroot/vm/centos7 zroot/vm/centos7_shred
NAME USED AVAIL REFER MOUNTPOINT
zroot/vm/centos7 2.72G 876G 2.60G /vm/centos7
zroot/vm/centos7_shred 4.98M 876G 1.83G /vm/centos7_shred
# BlueOnyx-5209R-CentOS-7.8-20200520.iso/ks/kick_ext4.cfg インストール直後
guest# df -m /home
Filesystem 1M-blocks Used Available Use% Mounted on
/dev/mapper/VolGroup00-home 5129 88 4759 2% /home
guest# time dd if=/dev/urandom of=/home/big bs=1M count=4759
4759+0 records in
4759+0 records out
4990173184 bytes (5.0 GB) copied, 31.6832 s, 158 MB/s
real 0m31.686s
user 0m0.004s
sys 0m24.158s
guest# df /home (-m 付け忘れた)
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/mapper/VolGroup00-home 5251176 4962400 0 100% /home
host# zfs list zroot/vm/centos7 zroot/vm/centos7_shred
NAME USED AVAIL REFER MOUNTPOINT
zroot/vm/centos7 2.72G 872G 2.60G /vm/centos7
zroot/vm/centos7_shred 4.68G 872G 6.47G /vm/centos7_shred
guest# time shred -n 3 -z /home/big
real 2m8.844s
user 0m6.503s
sys 0m11.173s
guest# df /home
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/mapper/VolGroup00-home 5251176 4962400 0 100% /home
guest# rm /home/big
guest# df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/mapper/VolGroup00-home 5251176 89180 4872204 2% /home
host# zfs list zroot/vm/centos7 zroot/vm/centos7_shred
NAME USED AVAIL REFER MOUNTPOINT
zroot/vm/centos7 2.72G 876G 2.60G /vm/centos7
zroot/vm/centos7_shred 32.5M 876G 1.82G /vm/centos7_shred