[Pkg-zfsonlinux-devel] Bug#996173: zfsutils-linux: /etc/exports.d/zfs.exports incorrectly generated when dataset has a space in its mountpoint name
James Youngman
james at youngman.org
Mon Oct 11 19:58:07 BST 2021
Package: zfsutils-linux
Version: 2.0.3-9
Severity: important
"zfs share" generates this /etc/exports.d/zfs.exports file:
# !!! DO NOT EDIT THIS FILE MANUALLY !!!
/nas/video/TV/Historical Drama 192.168.15.0/24(sec=sys,rw,no_subtree_check,mountpoint)
/nas/video/TV/Historical Drama 192.168.122.0/24(sec=sys,ro,no_subtree_check,mountpoint)
The problem is that spaces are not allowed in the path name. Per `man
5 exports`:
Blank lines are ignored. A pound sign ("#") introduces a comment to
the end of the line. En‐ tries may be continued across newlines using
a backslash. If an export name contains spaces it should be quoted
using double quotes. You can also specify spaces or other unusual
character in the export name using a backslash followed by the
character code as three octal digits.
The relevant zfs datasets look like this:
$ sudo zfs list | grep Historical
zpool2/video/TV/Historical_Drama 352G 1.59T 352G /nas/video/TV/Historical Drama
$ sudo zfs get all zpool2/video/TV/Historical_Drama
NAME PROPERTY VALUE SOURCE
zpool2/video/TV/Historical_Drama type filesystem -
zpool2/video/TV/Historical_Drama creation Wed Dec 13 15:31 2017 -
zpool2/video/TV/Historical_Drama used 352G -
zpool2/video/TV/Historical_Drama available 1.59T -
zpool2/video/TV/Historical_Drama referenced 352G -
zpool2/video/TV/Historical_Drama compressratio 1.00x -
zpool2/video/TV/Historical_Drama mounted yes -
zpool2/video/TV/Historical_Drama quota none default
zpool2/video/TV/Historical_Drama reservation none default
zpool2/video/TV/Historical_Drama recordsize 128K default
zpool2/video/TV/Historical_Drama mountpoint /nas/video/TV/Historical Drama local
zpool2/video/TV/Historical_Drama sharenfs rw=@192.168.15.0/24,ro=@192.168.122.0/24,rw=192.168.122.100,rw=10.10.1.2 inherited from zpool2
zpool2/video/TV/Historical_Drama checksum on default
zpool2/video/TV/Historical_Drama compression on inherited from zpool2
zpool2/video/TV/Historical_Drama atime on default
zpool2/video/TV/Historical_Drama devices on default
zpool2/video/TV/Historical_Drama exec on default
zpool2/video/TV/Historical_Drama setuid on default
zpool2/video/TV/Historical_Drama readonly off default
zpool2/video/TV/Historical_Drama zoned off default
zpool2/video/TV/Historical_Drama snapdir hidden default
zpool2/video/TV/Historical_Drama aclmode discard default
zpool2/video/TV/Historical_Drama aclinherit restricted default
zpool2/video/TV/Historical_Drama createtxg 14679 -
zpool2/video/TV/Historical_Drama canmount on default
zpool2/video/TV/Historical_Drama xattr on default
zpool2/video/TV/Historical_Drama copies 1 default
zpool2/video/TV/Historical_Drama version 5 -
zpool2/video/TV/Historical_Drama utf8only off -
zpool2/video/TV/Historical_Drama normalization none -
zpool2/video/TV/Historical_Drama casesensitivity sensitive -
zpool2/video/TV/Historical_Drama vscan off default
zpool2/video/TV/Historical_Drama nbmand off default
zpool2/video/TV/Historical_Drama sharesmb off default
zpool2/video/TV/Historical_Drama refquota none default
zpool2/video/TV/Historical_Drama refreservation none default
zpool2/video/TV/Historical_Drama guid 11063892910235629563 -
zpool2/video/TV/Historical_Drama primarycache all default
zpool2/video/TV/Historical_Drama secondarycache all default
zpool2/video/TV/Historical_Drama usedbysnapshots 4.41M -
zpool2/video/TV/Historical_Drama usedbydataset 352G -
zpool2/video/TV/Historical_Drama usedbychildren 0B -
zpool2/video/TV/Historical_Drama usedbyrefreservation 0B -
zpool2/video/TV/Historical_Drama logbias latency default
zpool2/video/TV/Historical_Drama objsetid 1330 -
zpool2/video/TV/Historical_Drama dedup off default
zpool2/video/TV/Historical_Drama mlslabel none default
zpool2/video/TV/Historical_Drama sync standard default
zpool2/video/TV/Historical_Drama dnodesize legacy default
zpool2/video/TV/Historical_Drama refcompressratio 1.00x -
zpool2/video/TV/Historical_Drama written 0 -
zpool2/video/TV/Historical_Drama logicalused 351G -
zpool2/video/TV/Historical_Drama logicalreferenced 351G -
zpool2/video/TV/Historical_Drama volmode default default
zpool2/video/TV/Historical_Drama filesystem_limit none default
zpool2/video/TV/Historical_Drama snapshot_limit none default
zpool2/video/TV/Historical_Drama filesystem_count none default
zpool2/video/TV/Historical_Drama snapshot_count none default
zpool2/video/TV/Historical_Drama snapdev hidden default
zpool2/video/TV/Historical_Drama acltype off default
zpool2/video/TV/Historical_Drama context none default
zpool2/video/TV/Historical_Drama fscontext none default
zpool2/video/TV/Historical_Drama defcontext none default
zpool2/video/TV/Historical_Drama rootcontext none default
zpool2/video/TV/Historical_Drama relatime off default
zpool2/video/TV/Historical_Drama redundant_metadata all default
zpool2/video/TV/Historical_Drama overlay on default
zpool2/video/TV/Historical_Drama encryption off default
zpool2/video/TV/Historical_Drama keylocation none default
zpool2/video/TV/Historical_Drama keyformat none default
zpool2/video/TV/Historical_Drama pbkdf2iters 0 default
zpool2/video/TV/Historical_Drama special_small_blocks 0 default
-- System Information:
Debian Release: 11.1
APT prefers stable-updates
APT policy: (500, 'stable-updates'), (500, 'stable-security'), (500, 'stable')
Architecture: amd64 (x86_64)
Kernel: Linux 5.10.0-9-amd64 (SMP w/12 CPU threads)
Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_WARN, TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE
Locale: LANG=en_IE.UTF-8, LC_CTYPE=en_IE.UTF-8 (charmap=UTF-8), LANGUAGE=en_IE:en
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
Versions of packages zfsutils-linux depends on:
ii init-system-helpers 1.60
ii libblkid1 2.36.1-8
ii libc6 2.31-13+deb11u2
ii libnvpair3linux 2.0.3-9
ii libuuid1 2.36.1-8
ii libuutil3linux 2.0.3-9
ii libzfs4linux 2.0.3-9
ii libzpool4linux 2.0.3-9
ii python3 3.9.2-3
Versions of packages zfsutils-linux recommends:
ii lsb-base 11.1.0
ii zfs-dkms [zfs-modules] 2.0.3-9
ii zfs-zed 2.0.3-9
Versions of packages zfsutils-linux suggests:
ii nfs-kernel-server 1:1.3.4-6
ii samba-common-bin 2:4.13.5+dfsg-2
ii zfs-initramfs 2.0.3-9
-- Configuration Files:
/etc/sudoers.d/zfs [Errno 13] Permission denied: '/etc/sudoers.d/zfs'
-- no debconf information
More information about the Pkg-zfsonlinux-devel
mailing list