我在 Ubuntu Xenial (16.04) 上的 ZFS 问题
多年来,我一直在包维护者的 zfsonlinux.org 站点上运行 ZFS。事情一直很好。但是最近我在 Ubuntu 16.04 发布时升级到了它。我很高兴它内置了 ZFS。到目前为止,除了一件事之外,一切都运行良好。
zfs share -a
并且zfs share filesystem
不工作,因此,每当我重新启动系统时,zfs-share.service
都不会启用在 ZFS 中配置的 SMB 共享。对于 Debian 8.x 或更早版本的 Ubuntu 以及来自 zfsonlinux.org 的软件包,我没有遇到这个问题。
我已将此作为 ZoL 和 Ubuntu 的错误提交。我不知道那会走多远。我不知道这是一个错误还是 Ubuntu 或我的问题。所以我也希望这里的人会有一个想法或者可以确认这是他们也遇到的问题。
ZoL:https ://github.com/zfsonlinux/zfs/issues/4999
Ubuntu:https ://bugs.launchpad.net/ubuntu/+source/zfs-linux/+bug/1615405
有关我的实际问题,请参阅底部。
调试信息
没有股份!我也在几台客户端计算机上进行了验证 - 这就是发现问题的方式。
root@igor:~# net usershare list
root@igor:~#
重新启动后的Systemd zfs-share.status
似乎很好
root@igor:~# systemctl status zfs-share
● zfs-share.service - LSB: Network share OpenZFS datasets.
Loaded: loaded (/etc/init.d/zfs-share; static; vendor preset: enabled)
Active: active (exited) since Fri 2016-08-19 11:06:32 EDT; 4min 56s ago
Docs: man:systemd-sysv-generator(8)
Process: 6432 ExecStart=/etc/init.d/zfs-share start (code=exited, status=0/SUCCESS)
Tasks: 0
Memory: 0B
CPU: 0
Aug 19 11:06:23 igor systemd[1]: Starting LSB: Network share OpenZFS datasets....
Aug 19 11:06:25 igor zfs-share[6432]: * Sharing OpenZFS filesystems
Aug 19 11:06:32 igor zfs-share[6432]: ...done.
Aug 19 11:06:32 igor systemd[1]: Started LSB: Network share OpenZFS datasets..
重新启动后的Systemd smbd.service
似乎很好
● smbd.service - LSB: start Samba SMB/CIFS daemon (smbd)
Loaded: loaded (/etc/init.d/smbd; bad; vendor preset: enabled)
Active: active (running) since Fri 2016-08-19 11:27:44 EDT; 3min 4s ago
Docs: man:systemd-sysv-generator(8)
Process: 6629 ExecStart=/etc/init.d/smbd start (code=exited, status=0/SUCCESS)
Tasks: 4
Memory: 6.2M
CPU: 263ms
CGroup: /system.slice/smbd.service
├─6719 /usr/sbin/smbd -D
├─6720 /usr/sbin/smbd -D
└─6743 /usr/sbin/smbd -D
Aug 19 11:27:42 igor systemd[1]: Starting LSB: start Samba SMB/CIFS daemon (smbd)...
Aug 19 11:27:44 igor smbd[6629]: * Starting SMB/CIFS daemon smbd
Aug 19 11:27:44 igor smbd[6629]: ...done.
Aug 19 11:27:44 igor systemd[1]: Started LSB: start Samba SMB/CIFS daemon (smbd).
Aug 19 11:27:46 igor smbd[6844]: pam_unix(samba:session): session opened for user rbabchis by (uid=0)
数据集配置正确
root@igor:~# zfs get sharesmb pool2/Media
NAME PROPERTY VALUE SOURCE
pool2/Media sharesmb on local
root@igor:~# zfs get sharesmb pool2/home
NAME PROPERTY VALUE SOURCE
pool2/home sharesmb on local
即使我手动分享也没有任何反应
root@igor:~# zfs share -a
root@igor:~# net usershare list
root@igor:~# ls /var/lib/samba/usershares/
root@igor:~#
共享特定文件系统时已共享消息
root@igor:~# zfs share pool2/home
cannot share 'pool2/home': filesystem already shared
ZFS 代码使用 /etc/dfs/sharetab 但 Linux/Samba 不使用(启动后) https://github.com/zfsonlinux/zfs/issues/190
root@igor:~# cat /etc/dfs/sharetab
/pool2/home - smb on
/pool2/Media - smb on
strace -y zfs share -a看起来 ZFS 可能没有尝试共享数据集,因为它在 /etc/dfs/sharetab 中找到它们,但我可能误解了这一点。
root@igor:~# strace -y zfs share -a
execve("/sbin/zfs", ["zfs", "share", "-a"], [/* 21 vars */]) = 0
brk(NULL) = 0x2372000
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f100dfdf000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3</etc/ld.so.cache>
fstat(3</etc/ld.so.cache>, {st_mode=S_IFREG|0644, st_size=128650, ...}) = 0
mmap(NULL, 128650, PROT_READ, MAP_PRIVATE, 3</etc/ld.so.cache>, 0) = 0x7f100dfbc000
close(3</etc/ld.so.cache>) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
open("/usr/lib/libnvpair.so.1", O_RDONLY|O_CLOEXEC) = 3</usr/lib/libnvpair.so.1.0.1>
read(3</usr/lib/libnvpair.so.1.0.1>, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0@L\0\0\0\0\0\0"..., 832) = 832
fstat(3</usr/lib/libnvpair.so.1.0.1>, {st_mode=S_IFREG|0644, st_size=80896, ...}) = 0
mmap(NULL, 2175984, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3</usr/lib/libnvpair.so.1.0.1>, 0) = 0x7f100dba4000
mprotect(0x7f100dbb7000, 2093056, PROT_NONE) = 0
mmap(0x7f100ddb6000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3</usr/lib/libnvpair.so.1.0.1>, 0x12000) = 0x7f100ddb6000
close(3</usr/lib/libnvpair.so.1.0.1>) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
open("/usr/lib/libuutil.so.1", O_RDONLY|O_CLOEXEC) = 3</usr/lib/libuutil.so.1.0.1>
read(3</usr/lib/libuutil.so.1.0.1>, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\340V\0\0\0\0\0\0"..., 832) = 832
fstat(3</usr/lib/libuutil.so.1.0.1>, {st_mode=S_IFREG|0644, st_size=73648, ...}) = 0
mmap(NULL, 2173272, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3</usr/lib/libuutil.so.1.0.1>, 0) = 0x7f100d98c000
mprotect(0x7f100d99d000, 2093056, PROT_NONE) = 0
mmap(0x7f100db9c000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3</usr/lib/libuutil.so.1.0.1>, 0x10000) = 0x7f100db9c000
mmap(0x7f100db9e000, 2392, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f100db9e000
close(3</usr/lib/libuutil.so.1.0.1>) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
open("/usr/lib/libzpool.so.2", O_RDONLY|O_CLOEXEC) = 3</usr/lib/libzpool.so.2.0.0>
read(3</usr/lib/libzpool.so.2.0.0>, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\320}\2\0\0\0\0\0"..., 832) = 832
fstat(3</usr/lib/libzpool.so.2.0.0>, {st_mode=S_IFREG|0644, st_size=1281576, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f100dfde000
mmap(NULL, 4839192, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3</usr/lib/libzpool.so.2.0.0>, 0) = 0x7f100d4ec000
mprotect(0x7f100d61d000, 2097152, PROT_NONE) = 0
mmap(0x7f100d81d000, 32768, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3</usr/lib/libzpool.so.2.0.0>, 0x131000) = 0x7f100d81d000
mmap(0x7f100d825000, 1459992, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f100d825000
close(3</usr/lib/libzpool.so.2.0.0>) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
open("/usr/lib/libzfs.so.2", O_RDONLY|O_CLOEXEC) = 3</usr/lib/libzfs.so.2.0.0>
read(3</usr/lib/libzfs.so.2.0.0>, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\20\252\0\0\0\0\0\0"..., 832) = 832
fstat(3</usr/lib/libzfs.so.2.0.0>, {st_mode=S_IFREG|0644, st_size=275968, ...}) = 0
mmap(NULL, 2371208, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3</usr/lib/libzfs.so.2.0.0>, 0) = 0x7f100d2a4000
mprotect(0x7f100d2e6000, 2093056, PROT_NONE) = 0
mmap(0x7f100d4e5000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3</usr/lib/libzfs.so.2.0.0>, 0x41000) = 0x7f100d4e5000
close(3</usr/lib/libzfs.so.2.0.0>) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
open("/usr/lib/libzfs_core.so.1", O_RDONLY|O_CLOEXEC) = 3</usr/lib/libzfs_core.so.1.0.0>
read(3</usr/lib/libzfs_core.so.1.0.0>, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\260\21\0\0\0\0\0\0"..., 832) = 832
fstat(3</usr/lib/libzfs_core.so.1.0.0>, {st_mode=S_IFREG|0644, st_size=14544, ...}) = 0
mmap(NULL, 2109840, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3</usr/lib/libzfs_core.so.1.0.0>, 0) = 0x7f100d09c000
mprotect(0x7f100d09f000, 2093056, PROT_NONE) = 0
mmap(0x7f100d29e000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3</usr/lib/libzfs_core.so.1.0.0>, 0x2000) = 0x7f100d29e000
close(3</usr/lib/libzfs_core.so.1.0.0>) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
open("/lib/x86_64-linux-gnu/libpthread.so.0", O_RDONLY|O_CLOEXEC) = 3</lib/x86_64-linux-gnu/libpthread-2.23.so>
read(3</lib/x86_64-linux-gnu/libpthread-2.23.so>, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\360`\0\0\0\0\0\0"..., 832) = 832
fstat(3</lib/x86_64-linux-gnu/libpthread-2.23.so>, {st_mode=S_IFREG|0755, st_size=138744, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f100dfdd000
mmap(NULL, 2212904, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3</lib/x86_64-linux-gnu/libpthread-2.23.so>, 0) = 0x7f100ce7c000
mprotect(0x7f100ce94000, 2093056, PROT_NONE) = 0
mmap(0x7f100d093000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3</lib/x86_64-linux-gnu/libpthread-2.23.so>, 0x17000) = 0x7f100d093000
mmap(0x7f100d095000, 13352, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f100d095000
close(3</lib/x86_64-linux-gnu/libpthread-2.23.so>) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
open("/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3</lib/x86_64-linux-gnu/libc-2.23.so>
read(3</lib/x86_64-linux-gnu/libc-2.23.so>, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P\t\2\0\0\0\0\0"..., 832) = 832
fstat(3</lib/x86_64-linux-gnu/libc-2.23.so>, {st_mode=S_IFREG|0755, st_size=1864888, ...}) = 0
mmap(NULL, 3967488, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3</lib/x86_64-linux-gnu/libc-2.23.so>, 0) = 0x7f100caac000
mprotect(0x7f100cc6c000, 2093056, PROT_NONE) = 0
mmap(0x7f100ce6b000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3</lib/x86_64-linux-gnu/libc-2.23.so>, 0x1bf000) = 0x7f100ce6b000
mmap(0x7f100ce71000, 14848, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f100ce71000
close(3</lib/x86_64-linux-gnu/libc-2.23.so>) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
open("/lib/x86_64-linux-gnu/librt.so.1", O_RDONLY|O_CLOEXEC) = 3</lib/x86_64-linux-gnu/librt-2.23.so>
read(3</lib/x86_64-linux-gnu/librt-2.23.so>, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0!\0\0\0\0\0\0"..., 832) = 832
fstat(3</lib/x86_64-linux-gnu/librt-2.23.so>, {st_mode=S_IFREG|0644, st_size=31712, ...}) = 0
mmap(NULL, 2128832, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3</lib/x86_64-linux-gnu/librt-2.23.so>, 0) = 0x7f100c8a4000
mprotect(0x7f100c8ab000, 2093056, PROT_NONE) = 0
mmap(0x7f100caaa000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3</lib/x86_64-linux-gnu/librt-2.23.so>, 0x6000) = 0x7f100caaa000
close(3</lib/x86_64-linux-gnu/librt-2.23.so>) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
open("/lib/x86_64-linux-gnu/libuuid.so.1", O_RDONLY|O_CLOEXEC) = 3</lib/x86_64-linux-gnu/libuuid.so.1.3.0>
read(3</lib/x86_64-linux-gnu/libuuid.so.1.3.0>, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\20\25\0\0\0\0\0\0"..., 832) = 832
fstat(3</lib/x86_64-linux-gnu/libuuid.so.1.3.0>, {st_mode=S_IFREG|0644, st_size=18976, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f100dfdc000
mmap(NULL, 2113904, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3</lib/x86_64-linux-gnu/libuuid.so.1.3.0>, 0) = 0x7f100c69c000
mprotect(0x7f100c6a0000, 2093056, PROT_NONE) = 0
mmap(0x7f100c89f000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3</lib/x86_64-linux-gnu/libuuid.so.1.3.0>, 0x3000) = 0x7f100c89f000
close(3</lib/x86_64-linux-gnu/libuuid.so.1.3.0>) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
open("/lib/x86_64-linux-gnu/libz.so.1", O_RDONLY|O_CLOEXEC) = 3</lib/x86_64-linux-gnu/libz.so.1.2.8>
read(3</lib/x86_64-linux-gnu/libz.so.1.2.8>, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\360\35\0\0\0\0\0\0"..., 832) = 832
fstat(3</lib/x86_64-linux-gnu/libz.so.1.2.8>, {st_mode=S_IFREG|0644, st_size=104824, ...}) = 0
mmap(NULL, 2199880, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3</lib/x86_64-linux-gnu/libz.so.1.2.8>, 0) = 0x7f100c47c000
mprotect(0x7f100c495000, 2093056, PROT_NONE) = 0
mmap(0x7f100c694000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3</lib/x86_64-linux-gnu/libz.so.1.2.8>, 0x18000) = 0x7f100c694000
close(3</lib/x86_64-linux-gnu/libz.so.1.2.8>) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
open("/lib/x86_64-linux-gnu/libm.so.6", O_RDONLY|O_CLOEXEC) = 3</lib/x86_64-linux-gnu/libm-2.23.so>
read(3</lib/x86_64-linux-gnu/libm-2.23.so>, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0V\0\0\0\0\0\0"..., 832) = 832
fstat(3</lib/x86_64-linux-gnu/libm-2.23.so>, {st_mode=S_IFREG|0644, st_size=1088952, ...}) = 0
mmap(NULL, 3178744, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3</lib/x86_64-linux-gnu/libm-2.23.so>, 0) = 0x7f100c16c000
mprotect(0x7f100c274000, 2093056, PROT_NONE) = 0
mmap(0x7f100c473000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3</lib/x86_64-linux-gnu/libm-2.23.so>, 0x107000) = 0x7f100c473000
close(3</lib/x86_64-linux-gnu/libm-2.23.so>) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
open("/lib/x86_64-linux-gnu/libblkid.so.1", O_RDONLY|O_CLOEXEC) = 3</lib/x86_64-linux-gnu/libblkid.so.1.1.0>
read(3</lib/x86_64-linux-gnu/libblkid.so.1.1.0>, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\260\201\0\0\0\0\0\0"..., 832) = 832
fstat(3</lib/x86_64-linux-gnu/libblkid.so.1.1.0>, {st_mode=S_IFREG|0644, st_size=262408, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f100dfbb000
mmap(NULL, 2361576, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3</lib/x86_64-linux-gnu/libblkid.so.1.1.0>, 0) = 0x7f100bf24000
mprotect(0x7f100bf60000, 2093056, PROT_NONE) = 0
mmap(0x7f100c15f000, 20480, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3</lib/x86_64-linux-gnu/libblkid.so.1.1.0>, 0x3b000) = 0x7f100c15f000
mmap(0x7f100c164000, 2280, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f100c164000
close(3</lib/x86_64-linux-gnu/libblkid.so.1.1.0>) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f100dfba000
mmap(NULL, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f100dfb7000
arch_prctl(ARCH_SET_FS, 0x7f100dfb8780) = 0
mprotect(0x7f100ce6b000, 16384, PROT_READ) = 0
mprotect(0x7f100c89f000, 4096, PROT_READ) = 0
mprotect(0x7f100c15f000, 16384, PROT_READ) = 0
mprotect(0x7f100c473000, 4096, PROT_READ) = 0
mprotect(0x7f100c694000, 4096, PROT_READ) = 0
mprotect(0x7f100d093000, 4096, PROT_READ) = 0
mprotect(0x7f100caaa000, 4096, PROT_READ) = 0
mprotect(0x7f100db9c000, 4096, PROT_READ) = 0
mprotect(0x7f100ddb6000, 4096, PROT_READ) = 0
mprotect(0x7f100d29e000, 4096, PROT_READ) = 0
mprotect(0x7f100d81d000, 8192, PROT_READ) = 0
mprotect(0x7f100d4e5000, 4096, PROT_READ) = 0
mprotect(0x617000, 4096, PROT_READ) = 0
mprotect(0x7f100dfe1000, 4096, PROT_READ) = 0
munmap(0x7f100dfbc000, 128650) = 0
set_tid_address(0x7f100dfb8a50) = 7717
set_robust_list(0x7f100dfb8a60, 24) = 0
rt_sigaction(SIGRTMIN, {0x7f100ce81b90, [], SA_RESTORER|SA_SIGINFO, 0x7f100ce8d3d0}, NULL, 8) = 0
rt_sigaction(SIGRT_1, {0x7f100ce81c20, [], SA_RESTORER|SA_RESTART|SA_SIGINFO, 0x7f100ce8d3d0}, NULL, 8) = 0
rt_sigprocmask(SIG_UNBLOCK, [RTMIN RT_1], NULL, 8) = 0
getrlimit(RLIMIT_STACK, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
brk(NULL) = 0x2372000
brk(0x2393000) = 0x2393000
open("/usr/lib/locale/locale-archive", O_RDONLY|O_CLOEXEC) = 3</usr/lib/locale/locale-archive>
fstat(3</usr/lib/locale/locale-archive>, {st_mode=S_IFREG|0644, st_size=2977184, ...}) = 0
mmap(NULL, 2977184, PROT_READ, MAP_PRIVATE, 3</usr/lib/locale/locale-archive>, 0) = 0x7f100bc4c000
close(3</usr/lib/locale/locale-archive>) = 0
access("/sys/module/zfs", F_OK) = 0
access("/sys/module/zfs", F_OK) = 0
open("/dev/zfs", O_RDWR) = 3</dev/zfs>
close(3</dev/zfs>) = 0
open("/dev/zfs", O_RDWR) = 3</dev/zfs>
open("/etc/mtab", O_RDONLY) = 4</proc/7717/mounts>
open("/etc/dfs/sharetab", O_RDONLY) = 5</etc/dfs/sharetab>
open("/dev/zfs", O_RDWR) = 6</dev/zfs>
ioctl(3</dev/zfs>, _IOC(0, 0x5a, 0x04, 0x00), 0x7ffc53b06cc0) = 0
ioctl(3</dev/zfs>, _IOC(0, 0x5a, 0x12, 0x00), 0x7ffc53b06cd0) = 0
ioctl(3</dev/zfs>, _IOC(0, 0x5a, 0x05, 0x00), 0x7ffc53b03680) = 0
ioctl(3</dev/zfs>, _IOC(0, 0x5a, 0x14, 0x00), 0x7ffc53b06c90) = 0
ioctl(3</dev/zfs>, _IOC(0, 0x5a, 0x14, 0x00), 0x7ffc53b06c90) = 0
ioctl(3</dev/zfs>, _IOC(0, 0x5a, 0x14, 0x00), 0x7ffc53b06c90) = -1 ENOMEM (Cannot allocate memory)
ioctl(3</dev/zfs>, _IOC(0, 0x5a, 0x14, 0x00), 0x7ffc53b06c90) = 0
ioctl(3</dev/zfs>, _IOC(0, 0x5a, 0x14, 0x00), 0x7ffc53b03660) = -1 ESRCH (No such process)
ioctl(3</dev/zfs>, _IOC(0, 0x5a, 0x14, 0x00), 0x7ffc53b06c90) = 0
ioctl(3</dev/zfs>, _IOC(0, 0x5a, 0x14, 0x00), 0x7ffc53b03660) = -1 ESRCH (No such process)
ioctl(3</dev/zfs>, _IOC(0, 0x5a, 0x14, 0x00), 0x7ffc53b06c90) = -1 ENOMEM (Cannot allocate memory)
ioctl(3</dev/zfs>, _IOC(0, 0x5a, 0x14, 0x00), 0x7ffc53b06c90) = 0
ioctl(3</dev/zfs>, _IOC(0, 0x5a, 0x14, 0x00), 0x7ffc53b06c90) = 0
ioctl(3</dev/zfs>, _IOC(0, 0x5a, 0x14, 0x00), 0x7ffc53b06c90) = -1 ENOMEM (Cannot allocate memory)
ioctl(3</dev/zfs>, _IOC(0, 0x5a, 0x14, 0x00), 0x7ffc53b06c90) = 0
ioctl(3</dev/zfs>, _IOC(0, 0x5a, 0x14, 0x00), 0x7ffc53b06c90) = 0
ioctl(3</dev/zfs>, _IOC(0, 0x5a, 0x14, 0x00), 0x7ffc53b06c90) = -1 ENOMEM (Cannot allocate memory)
ioctl(3</dev/zfs>, _IOC(0, 0x5a, 0x14, 0x00), 0x7ffc53b06c90) = 0
ioctl(3</dev/zfs>, _IOC(0, 0x5a, 0x14, 0x00), 0x7ffc53b03660) = -1 ESRCH (No such process)
ioctl(3</dev/zfs>, _IOC(0, 0x5a, 0x14, 0x00), 0x7ffc53b06c90) = 0
ioctl(3</dev/zfs>, _IOC(0, 0x5a, 0x14, 0x00), 0x7ffc53b06c90) = 0
ioctl(3</dev/zfs>, _IOC(0, 0x5a, 0x14, 0x00), 0x7ffc53b06c90) = -1 ENOMEM (Cannot allocate memory)
ioctl(3</dev/zfs>, _IOC(0, 0x5a, 0x14, 0x00), 0x7ffc53b06c90) = 0
ioctl(3</dev/zfs>, _IOC(0, 0x5a, 0x14, 0x00), 0x7ffc53b06c90) = -1 ESRCH (No such process)
ioctl(3</dev/zfs>, _IOC(0, 0x5a, 0x12, 0x00), 0x7ffc53b06cd0) = 0
brk(0x23bf000) = 0x23bf000
ioctl(3</dev/zfs>, _IOC(0, 0x5a, 0x05, 0x00), 0x7ffc53b03680) = 0
brk(0x23af000) = 0x23af000
ioctl(3</dev/zfs>, _IOC(0, 0x5a, 0x14, 0x00), 0x7ffc53b06c90) = 0
ioctl(3</dev/zfs>, _IOC(0, 0x5a, 0x14, 0x00), 0x7ffc53b03660) = -1 ESRCH (No such process)
ioctl(3</dev/zfs>, _IOC(0, 0x5a, 0x14, 0x00), 0x7ffc53b06c90) = -1 ENOMEM (Cannot allocate memory)
ioctl(3</dev/zfs>, _IOC(0, 0x5a, 0x14, 0x00), 0x7ffc53b06c90) = 0
ioctl(3</dev/zfs>, _IOC(0, 0x5a, 0x14, 0x00), 0x7ffc53b06c90) = 0
ioctl(3</dev/zfs>, _IOC(0, 0x5a, 0x14, 0x00), 0x7ffc53b06c90) = 0
ioctl(3</dev/zfs>, _IOC(0, 0x5a, 0x14, 0x00), 0x7ffc53b06c90) = 0
ioctl(3</dev/zfs>, _IOC(0, 0x5a, 0x14, 0x00), 0x7ffc53b03660) = 0
ioctl(3</dev/zfs>, _IOC(0, 0x5a, 0x14, 0x00), 0x7ffc53b00030) = -1 ESRCH (No such process)
ioctl(3</dev/zfs>, _IOC(0, 0x5a, 0x14, 0x00), 0x7ffc53b03660) = -1 ESRCH (No such process)
ioctl(3</dev/zfs>, _IOC(0, 0x5a, 0x14, 0x00), 0x7ffc53b06c90) = -1 ESRCH (No such process)
ioctl(3</dev/zfs>, _IOC(0, 0x5a, 0x27, 0x00), 0x7ffc53b038e0) = 0
ioctl(3</dev/zfs>, _IOC(0, 0x5a, 0x27, 0x00), 0x7ffc53b038e0) = 0
open("/etc/mtab", O_RDONLY) = 7</proc/7717/mounts>
dup3(7</proc/7717/mounts>, 4</proc/7717/mounts>, 0) = 4</proc/7717/mounts>
close(7</proc/7717/mounts>) = 0
fstat(4</proc/7717/mounts>, {st_mode=S_IFREG|0444, st_size=0, ...}) = 0
read(4</proc/7717/mounts>, "sysfs /sys sysfs rw,nosuid,nodev"..., 1024) = 1024
read(4</proc/7717/mounts>, "0 0\ncgroup /sys/fs/cgroup/pids c"..., 1024) = 1024
read(4</proc/7717/mounts>, " mqueue rw,relatime 0 0\ndebugfs "..., 1024) = 1024
read(4</proc/7717/mounts>, " 0 0\nhugetlb /run/lxcfs/controll"..., 1024) = 1024
read(4</proc/7717/mounts>, "00,uid=127,gid=136 0 0\ntmpfs /ru"..., 1024) = 99
read(4</proc/7717/mounts>, "", 1024) = 0
fstat(5</etc/dfs/sharetab>, {st_mode=S_IFREG|0600, st_size=43, ...}) = 0
lseek(5</etc/dfs/sharetab>, 0, SEEK_SET) = 0
read(5</etc/dfs/sharetab>, "/pool2/home\t-\tsmb\ton\n/pool2/Medi"..., 4096) = 43
read(5</etc/dfs/sharetab>, "", 4096) = 0
lseek(5</etc/dfs/sharetab>, 0, SEEK_SET) = 0
read(5</etc/dfs/sharetab>, "/pool2/home\t-\tsmb\ton\n/pool2/Medi"..., 4096) = 43
lseek(5</etc/dfs/sharetab>, 43, SEEK_SET) = 43
read(5</etc/dfs/sharetab>, "", 4096) = 0
lseek(5</etc/dfs/sharetab>, 0, SEEK_SET) = 0
read(5</etc/dfs/sharetab>, "/pool2/home\t-\tsmb\ton\n/pool2/Medi"..., 4096) = 43
ioctl(3</dev/zfs>, _IOC(0, 0x5a, 0x3f, 0x00), 0x7ffc53b06dd0) = -1 EPERM (Operation not permitted)
close(3</dev/zfs>) = 0
close(4</proc/7717/mounts>) = 0
close(5</etc/dfs/sharetab>) = 0
close(6</dev/zfs>) = 0
exit_group(0) = ?
+++ exited with 0 +++
共享数据集的唯一方法是将sharesmb
属性重置为on
root@igor:~# zfs set sharesmb=on pool2/home
root@igor:~# net usershare list
pool2_home
root@igor:~# zfs set sharesmb=on pool2/Media
root@igor:~# net usershare list
pool2_home
pool2_Media
我的问题
我知道我可以通过在 /etc/rc.local 中添加这些条目来解决这个问题
zfs set sharesmb=on pool2/Main
zfs set sharesmb=on pool2/home
我会的。但是有谁知道为什么zfs share -a
不能按预期工作(一如既往)?有没有其他人经历过这个?也许它会影响所有 Ubuntu Xenial 安装,或者可能只是我。即使没有修复程序并且这是一个错误,我也想知道。
谢谢!
我找到了答案,不幸的是它并不好
我在 ZoL 票务系统上得到了答案。显然这个问题是已知的,并以某种方式进入了 Ubuntu,而 Ubuntu 让它飞起来:
https://github.com/zfsonlinux/zfs/issues/4999
虽然它被称为一个众所周知的问题,但它对我来说似乎并不为人所知。事实上它几个月前就开始工作了,我找不到任何票或谷歌搜索结果。
个人咆哮- 如果您对答案感到满意,请停止阅读此处。
我不知道 Ubuntu 如何处理这样的错误。我记得以前我管理 RedHat 系统时,他们实际上会修复其他人代码中的错误。太好了。在 Ubuntu LTS 中有一个“众所周知的”错误真的让我很烦恼,让我想知道它们都是其他软件包,还有哪些其他众所周知的错误被忽略了。
开发者在 github 上的这个 bug 报告中的评论非常有趣。当有可用的补丁程序时,ZoL 故意在他们的软件中留下错误。过去版本中的补丁!这让我非常失望。让我感到惊讶的是,Ubuntu 不会自己应用补丁,而是假装该软件在他们的新 LTS 版本上运行并且稳定。
我最近在将我的一个储物箱从 14.04 更新到 16.04 后遇到了这个问题
奇怪的是,我在更新的第一个盒子上没有遇到这个问题,尽管那是一个全新的重新安装而不是 dist 升级。
我发现主要问题是尽管设置了所有 sharemb=on 参数,但 /var/lib/samba/usershares/ 中没有用户共享条目
所以,我只是使用另一个盒子的文件作为模板手动创建了一个,重新启动了 samba,瞧,一切都恢复了。
不过,非常笨拙。