[Samba] samba 4.5.1 tdb panic with ZFS

Brian Candler b.candler at pobox.com
Tue Dec 6 16:06:18 UTC 2016


On 06/12/2016 14:48, Brian Candler wrote:
> root at wrn-dc1:~# samba-tool domain provision --server-role=dc 
> --use-rfc2307 --dns-backend=SAMBA_INTERNAL --realm=AD.EXAMPLE.NET 
> --domain=AD
> Administrator password will be set randomly!
> You are not root or your system do not support xattr, using tdb 
> backend for attributes.

Aside: the zfs "xattr" property is already on by default. Inside the 
container it works for me with user xattrs:


root at wrn-dc1:~# setfattr -n user.bar -v baz /tmp/foo
root at wrn-dc1:~# getfattr -n user.bar /tmp/foo
getfattr: Removing leading '/' from absolute path names
# file: tmp/foo
user.bar="baz"

But when I strace "samba-tool domain provision":

open("/usr/local/samba/tmpE7Z_yH", O_RDWR|O_CREAT|O_EXCL|O_NOFOLLOW, 
0600) = 3
fcntl(3, F_GETFD)                       = 0
fcntl(3, F_SETFD, FD_CLOEXEC)           = 0
fstat(3, {st_mode=S_IFREG|0600, st_size=0, ...}) = 0
fcntl(3, F_GETFL)                       = 0x28002 (flags 
O_RDWR|O_LARGEFILE|O_NOFOLLOW)
setxattr("/usr/local/samba/tmpE7Z_yH", "security.NTACL", 
"\1\0\1\0\0\0\2\0\1\0\0\200\34\0\0\0(\0\0\0\0\0
\0\0\0\0\0\0\1\1\0\0\0\0\0\5 \0\0\0\1\1\0\0\0\0\0\5 \0\0", 52, 0) = -1 
EPERM (Operation not permitted)
write(2, "You are not root or your system "..., 89You are not root or 
your system do not support xattr, using tdb backend for attributes.
) = 89
close(3)                                = 0
unlink("/usr/local/samba/tmpE7Z_yH")    = 0
write(2, "not using extended attributes to"..., 171not using extended 
attributes to store ACLs and other metadata. If you intend to use this 
provision in production, rerun the script as root on a system supporting 
xattrs.
) = 171

And indeed:

root at wrn-dc1:~# setfattr -n security.NTACL -v baz /tmp/foo
setfattr: /tmp/foo: Operation not permitted

The samba wiki only mentions zfs in passing in two places. Searching 
further, it looks like Samba has ZFS support when run on Solaris:
https://lists.samba.org/archive/samba/2012-August/168660.html
and possibly FreeBSD. For Ubuntu I tried doing "apt-get install 
libzfslinux-dev" and re-running "./configure", but there is no mention 
of zfs in its output.

Ah OK... I've just seen Rowland's reply, "Just don't use ZFS". That's 
clear enough :-)

Regards,

Brian.



More information about the samba mailing list