ZFS Diff - 需要 diff 委派权限

ZFS Diff - 需要 diff 委派权限

今天以非 root身份运行时zfs diff,出现一个错误:

Unable to obtain diffs: 
   The sys_mount privilege or diff delegated permission is needed
   to execute the diff ioctl

在谷歌中搜索diff delegated permission没有给出任何结果。

什么是 diff 委派权限以及如何绕过这个阻止以允许非 root 用户运行zfs diff

答案1

通过发出以下命令向相关用户授予diff权限,可以解决此问题:ZFS

sudo zfs allow <user> diff <zpool>/<dataset>

例如:授予jblogs数据集上的diff 权限rpool/USERDATA

sudo zfs allow jblogs diff rpool/USERDATA

相关内容