Type: Defectgood first issue
説明
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