openzfs/zfs

umount: only root can use "--types" option

オープン

#8,478 opened on 2019/03/06

 (15 件のコメント) (0 件のリアクション) (0 人の担当者)C (1,703 件のフォーク)batch import
Type: Defectgood first issue

Repository metrics

Stars
 (9,908 個のスター)
PR merge metrics
 (平均マージ 5d 21h) (30d で 62 merged PRs)

説明

System information

Type Version/Name
Distribution Name Ubuntu
Distribution Version bionic (18.04.2)
Linux Kernel 4.15.0-46-generic
Architecture x86_64
ZFS Version 0.7.5-1ubuntu16
SPL Version 0.7.5-1ubuntu1

Describe the problem you're observing

When I try to create a volume as a non root user, I get a pretty warning explaining that as a non root user zfs can't mount the volume. When I try to destroy a volume as a non root user, I get a technical warning (from /bin/umount)

The equivalent error can be seen here:

$ /bin/umount x --types foo
umount: only root can use "--types" option

Ideally, just as zfs create gives a human readable warning when it knows it can't mount a volume, zfs destroy should give a human readable warning when it knows it can't unmount a volume.

Describe how to reproduce the problem

$ sudo zfs allow user create,mount,destroy pool/vol
$ zfs create pool/vol/test
filesystem successfully created, but it may only be mounted by root
$ sudo zfs mount pool/vol/test
$ zfs destroy pool/vol/test
umount: only root can use "--types" option
cannot unmount '/vol/test': umount failed

Include any warning/errors/backtraces from the system logs

コントリビューターガイド