zfs icon indicating copy to clipboard operation
zfs copied to clipboard

Not having NFS installed breaks unmount/destroy/etc

Open rincebrain opened this issue 3 years ago • 2 comments

System information

Type Version/Name
Distribution Name Debian
Distribution Version 11.4
Kernel Version 5.10.0-whogivesadamn
Architecture x86_64
OpenZFS Version 5360076

Describe the problem you're observing

Attempting to unmount a dataset on a system without exportfs results in:

$ sudo ./zpool destroy testpool
cannot unshare '/testpool/tmp': system error: NFS share removal failed
could not destroy 'testpool': could not unmount datasets
$ ls -al /usr/sbin/exportfs
ls: cannot access '/usr/sbin/exportfs': No such file or directory

Reverting 5360076 fixes this, though I still see a logged Permission denied the ZFS utilities must be run as root. in the thing I was originally doing which is absent if I install exportfs et al (scripts/zfs-tests.sh -t tests/functional/redacted_send/redacted_compressed), though that's probably orthogonal.

Describe how to reproduce the problem

As above.

Include any warning/errors/backtraces from the system logs

N/A

rincebrain avatar Jul 11 '22 17:07 rincebrain

I can repro the same. Not good!

Rudd-O avatar Aug 02 '22 20:08 Rudd-O

The program should simply ignore a situation where exportfs is absent, especially if sharenfs is off (which is my case)!

Rudd-O avatar Aug 02 '22 20:08 Rudd-O

This issue has been automatically marked as "stale" because it has not had any activity for a while. It will be closed in 90 days if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Aug 07 '23 04:08 stale[bot]

Sounds like a candidate to battle the bot...

AllKind avatar Aug 08 '23 06:08 AllKind

A side issue which partially resolves this, do the RPM/DEBs depend on NFS such that this is only a build-from-source issue?

gdevenyi avatar Aug 08 '23 17:08 gdevenyi

The native Debian packages have a suggests/recommends for nfs-kernel-server, so no, and the RPM packages just mention NFS existing, so no, at a glance.

rincebrain avatar Aug 08 '23 17:08 rincebrain