Meu problema com o ZFS no Ubuntu Xenial (16.04)
Há anos que executo o ZFS no site zfsonlinux.org do mantenedor do pacote. As coisas têm sido boas. Mas recentemente atualizei para o Ubuntu 16.04 quando foi lançado. Fiquei empolgado por ter o ZFS integrado. E até agora tudo está funcionando muito bem, exceto uma coisa.
zfs share -a
e zfs share filesystem
não funcionam e por conta disso, sempre que reinicio o sistema, zfs-share.service
não habilita meus compartilhamentos SMB configurados no ZFS. Não tive esse problema com o Debian 8.x ou versões anteriores do Ubuntu com os pacotes do zfsonlinux.org.
Enviei isso como um bug com ZoL e Ubuntu. Eu não tenho ideia de quão longe isso irá. Não sei se é um bug ou um problema com o Ubuntu ou comigo. Portanto, também espero que alguém aqui tenha uma ideia ou possa confirmar isso como um problema que está tendo.
ZoL: https://github.com/zfsonlinux/zfs/issues/4999
Ubuntu: https://bugs.launchpad.net/ubuntu/+source/zfs-linux/+bug/1615405
Veja na parte inferior a minha pergunta real.
Informações de depuração
Sem compartilhamentos! Também verifiquei em vários computadores clientes - foi assim que o problema foi descoberto.
root@igor:~# net usershare list
root@igor:~#
Systemd zfs-share.status
após uma nova reinicialização parece bem
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
após uma nova reinicialização parece bem
● 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)
Os conjuntos de dados estão configurados corretamente
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
Mesmo quando eu compartilho manualmente nada acontece
root@igor:~# zfs share -a
root@igor:~# net usershare list
root@igor:~# ls /var/lib/samba/usershares/
root@igor:~#
Mensagem já compartilhada quando compartilho um sistema de arquivos específico
root@igor:~# zfs share pool2/home
cannot share 'pool2/home': filesystem already shared
O código ZFS usa /etc/dfs/sharetab, mas o Linux/Samba não (após a inicialização) 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 Parece que o ZFS não está tentando compartilhar os conjuntos de dados porque os encontra em /etc/dfs/sharetab, mas posso estar interpretando mal isso.
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 +++
A única maneira de obter os conjuntos de dados compartilhados é redefinir a sharesmb
propriedade paraon
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
Minha pergunta
Eu sei que posso corrigir isso adicionando essas entradas em /etc/rc.local
zfs set sharesmb=on pool2/Main
zfs set sharesmb=on pool2/home
E eu vou. Mas alguém sabe por zfs share -a
que não funciona como pretendido (como sempre funcionou)? Alguém mais experimentou isso? Talvez isso afete todas as instalações do Ubuntu Xenial ou talvez seja só eu. Mesmo que não haja correção e seja um bug, gostaria de saber.
Obrigado!
Eu encontrei minha resposta e infelizmente não é boa
Recebi uma resposta no sistema de tickets da ZoL. Aparentemente, esse problema é conhecido e, de alguma forma, chegou ao Ubuntu e o Ubuntu o deixou voar:
https://github.com/zfsonlinux/zfs/issues/4999
Embora seja declarado como um problema bem conhecido, não parece tão conhecido para mim. É fato que estava funcionando há alguns meses e não consegui encontrar nenhum tíquete para ele ou resultados do Google.
Retórica pessoal - pare de ler aqui se estiver satisfeito com a resposta.
Não sei como o Ubuntu lida com bugs como esse. Lembro-me de quando costumava gerenciar sistemas RedHat e eles realmente corrigiam bugs no código de outras pessoas. Foi ótimo. Ter um bug "conhecido" no Ubuntu LTS realmente me incomoda e me faz pensar sobre todos os outros pacotes e quais outros bugs conhecidos estão lá que estão sendo ignorados.
Os comentários feitos por um desenvolvedor neste relatório de bug no github são bastante interessantes. ZoL está intencionalmente deixando bugs em seu software quando eles têm patches disponíveis. Patches que estavam em versões anteriores! Isso é muito decepcionante para mim. E me surpreende que o próprio Ubuntu não aplique os patches, em vez de fingir que o software está funcionando e estável em seu novo lançamento LTS.
Recentemente, descobri isso depois de atualizar uma das minhas caixas de armazenamento de 14.04 para 16.04
Curiosamente, não encontrei isso na primeira caixa que atualizei, embora tenha sido uma reinstalação limpa e não um dist-upgrade.
Descobri que o principal problema era que, apesar de todos os parâmetros do sharemb=on estarem definidos, não havia entrada para o usershare em /var/lib/samba/usershares/
Então, acabei de criar um manualmente usando o arquivo da outra caixa como modelo, reiniciei o samba e pronto, tudo funciona novamente.
Muito kludgy, embora.