Re: Status of vfs object expand_msdfs
Eibo Thieme via samba <[email protected]> Mon, 9 Mar 2026 11:10:31 +0100
| Newsgroups | gmane.network.samba.general |
|---|---|
| Message-ID | <[email protected]> |
Am 06.02.26 um 14:56 schrieb Eibo Thieme via samba:
> Samba 4.13.13
> Devuan Chimaera
> Windows 11
Sorry for this dumb mistake. vfs_object_expand_msdfs ist working fine
with Samba 4.17.12.
Problem solved, can recommend this setup.
Eibo
>
> My current setup consists of 9 locations connected via slow VPNs, each
> with their own Samba server acting as a DC and fileserver (this is not
> recommended but it works quite well for several years now). I would
> like to consolidate some shares to a central DFS location with
> referrals pointing to the nearest server. This would perfectly be
> provided by the expand_msdfs vfs module, but unfortunately it does not
> work.
>
> smb.conf, same except for netbios name changed on all servers:
>
> [global]
> bind interfaces only = Yes
> interfaces = lo eth1
> netbios name = FILESERVER1
> realm = TEST.COM
> server services = s3fs, rpc, nbt, wrepl, ldap, cldap, kdc,
> drepl, winbindd, ntp_signd, kcc, dnsupdate
> workgroup = TEST
> server role = active directory domain controller
> idmap_ldb:use rfc2307 = yes
> ntlm auth = yes
> lanman auth = no
> client lanman auth = no
> comment =
> host msdfs = yes
> log level = 1 vfs:10
> ...
> [dfs]
> path = /home/dfsroot
> msdfs root = yes
> vfs objects = dfs_samba4,acl_xattr,expand_msdfs
> ...
>
> Links in /home/dfsroot created by
>
> ln -s "msdfs:@ref@/templates" templates
>
> File ref containing:
>
> 192.168.10 fileserver1.test.com
> 192.168.20 filesserver2.test.com
> fileserver1.test.com
>
> Doubleclick in Windows Explorer on this link will throw an error
> saying this share is not accessible. With this loglevel I see the
> following in the logs (more debug log at the end):
>
> [2026/02/06 13:14:20.537260, 10, pid=10707, effective(0, 0), real(0,
> 0), class=vfs] ../../source3/smbd/vfs.c:66(vfs_find_backend_entry)
> vfs_find_backend_entry called for expand_msdfs
> Successfully loaded vfs module [expand_msdfs] with the new modules
> system
>
> ...
>
> [2026/02/06 13:14:20.536509, 3, pid=10707, effective(3000021, 100),
> real(3000021, 0), class=vfs]
> ../../source3/modules/vfs_default.c:257(vfswrap_get_dfs_referrals)
> Path \fileserver1\dfs\templates to alternate path(s): \@ref@\templates.
> ...
>
> [2026/02/06 13:14:20.536545, 1]
> ../../librpc/ndr/ndr.c:478(ndr_print_function_debug)
> dfs_GetDFSReferral: struct dfs_GetDFSReferral
> ...
> netw_address : *
> netw_address :
> '\@ref@\templates'
>
> What I do not see are the debug messages mentioned in the source like
> this in vfs_expand_msdfs.c:
>
> DEBUG(0,("can't open IP map %s. Error %s\n",
> mapfile, strerror(errno) ));
>
> Even though I should have seen this error message I did place the file
> ref in several locations and tried using a fully qualified path to the
> file ref. I also tried changing the order of vfs objects.
>
> What did work was server based DFS with regular links pointing to
> several file locations, even though it appears to always prefer the
> first fileserver in the link:
>
> ln -s 'msdfs:fileserver2/templates,msdfs:fileserver1/templates'
> templates2
>
> Domain based DFs did not work from Windows 11 and 10, so on
> \\test.com\ the share DFS is visible besides sysvol and other shares
> but it will throw an error when I try to open it, different from the
> sysvol folder which may be descended into. It does work with smbclient
> though.
>
> Have I missed something? Is expand_msdfs no longer operational?
>
> Regards,
> Eibo
>
>
> #### full debug
>
> [2026/02/06 13:14:20.532834, 1]
> ../../librpc/ndr/ndr.c:478(ndr_print_function_debug)
> dfs_GetDFSReferral: struct dfs_GetDFSReferral
> in: struct dfs_GetDFSReferral
> req: struct dfs_GetDFSReferral_in
> max_referral_level : 0x0004 (4)
> servername :
> '\filerserver1\dfs\templates'
> [2026/02/06 13:14:20.533013, 3, pid=10707, effective(0, 0), real(0,
> 0), class=vfs] ../../source3/smbd/vfs.c:115(vfs_init_default)
> Initialising default vfs hooks
> [2026/02/06 13:14:20.533046, 3, pid=10707, effective(0, 0), real(0,
> 0), class=vfs] ../../source3/smbd/vfs.c:141(vfs_init_custom)
> Initialising custom vfs hooks from [/[Default VFS]/]
> [2026/02/06 13:14:20.533068, 10, pid=10707, effective(0, 0), real(0,
> 0), class=vfs] ../../source3/smbd/vfs.c:66(vfs_find_backend_entry)
> vfs_find_backend_entry called for /[Default VFS]/
> Successfully loaded vfs module [/[Default VFS]/] with the new
> modules system
> [2026/02/06 13:14:20.533096, 3, pid=10707, effective(0, 0), real(0,
> 0), class=vfs] ../../source3/smbd/vfs.c:141(vfs_init_custom)
> Initialising custom vfs hooks from [expand_msdfs]
> [2026/02/06 13:14:20.533116, 10, pid=10707, effective(0, 0), real(0,
> 0), class=vfs] ../../source3/smbd/vfs.c:66(vfs_find_backend_entry)
> vfs_find_backend_entry called for expand_msdfs
> Successfully loaded vfs module [expand_msdfs] with the new modules
> system
> [2026/02/06 13:14:20.533141, 3, pid=10707, effective(0, 0), real(0,
> 0), class=vfs] ../../source3/smbd/vfs.c:141(vfs_init_custom)
> Initialising custom vfs hooks from [acl_xattr]
> [2026/02/06 13:14:20.533160, 10, pid=10707, effective(0, 0), real(0,
> 0), class=vfs] ../../source3/smbd/vfs.c:66(vfs_find_backend_entry)
> vfs_find_backend_entry called for acl_xattr
> Successfully loaded vfs module [acl_xattr] with the new modules system
> [2026/02/06 13:14:20.533184, 3, pid=10707, effective(0, 0), real(0,
> 0), class=vfs] ../../source3/smbd/vfs.c:141(vfs_init_custom)
> Initialising custom vfs hooks from [dfs_samba4]
> [2026/02/06 13:14:20.533202, 10, pid=10707, effective(0, 0), real(0,
> 0), class=vfs] ../../source3/smbd/vfs.c:66(vfs_find_backend_entry)
> vfs_find_backend_entry called for dfs_samba4
> Successfully loaded vfs module [dfs_samba4] with the new modules system
> [2026/02/06 13:14:20.533250, 2, pid=10707, effective(0, 0), real(0,
> 0), class=vfs]
> ../../source3/modules/vfs_acl_xattr.c:289(connect_acl_xattr)
> connect_acl_xattr: setting 'inherit acls = true' 'dos filemode =
> true' and 'force unknown acl user = true' for service dfs
> [2026/02/06 13:14:20.536110, 10, pid=10707, effective(0, 0), real(0,
> 0), class=vfs]
> ../../source3/modules/vfs_default.c:180(vfswrap_fs_capabilities)
> vfswrap_fs_capabilities: timestamp resolution of sec available on
> share dfs, directory /home/dfsroot
> [2026/02/06 13:14:20.536171, 4, pid=10707, effective(3000021, 100),
> real(3000021, 0), class=vfs] ../../source3/smbd/vfs.c:939(vfs_ChDir)
> vfs_ChDir to /home/dfsroot
> [2026/02/06 13:14:20.536204, 5, pid=10707, effective(3000021, 100),
> real(3000021, 0), class=vfs] ../../source3/smbd/vfs.c:1001(vfs_ChDir)
> vfs_ChDir: vfs_ChDir got /home/dfsroot
> [2026/02/06 13:14:20.536260, 10, pid=10707, effective(3000021, 100),
> real(3000021, 0), class=vfs]
> ../../source3/smbd/vfs.c:1327(check_reduced_name)
> check_reduced_name: check_reduced_name [.] [/home/dfsroot]
> [2026/02/06 13:14:20.536286, 10, pid=10707, effective(3000021, 100),
> real(3000021, 0), class=vfs]
> ../../source3/smbd/vfs.c:1389(check_reduced_name)
> check_reduced_name realpath [.] -> [/home/dfsroot]
> [2026/02/06 13:14:20.536307, 5, pid=10707, effective(3000021, 100),
> real(3000021, 0), class=vfs]
> ../../source3/smbd/vfs.c:1495(check_reduced_name)
> check_reduced_name: . reduced to /home/dfsroot
> [2026/02/06 13:14:20.536378, 5, pid=10707, effective(3000021, 100),
> real(3000021, 0), class=vfs]
> ../../source3/modules/vfs_default.c:486(vfswrap_read_dfs_pathat)
> vfswrap_read_dfs_pathat: test -> msdfs:@ref@/templates
> [2026/02/06 13:14:20.536418, 4, pid=10707, effective(3000021, 100),
> real(3000021, 0), class=vfs] ../../source3/smbd/vfs.c:939(vfs_ChDir)
> vfs_ChDir to /tmp
> [2026/02/06 13:14:20.536449, 5, pid=10707, effective(3000021, 100),
> real(3000021, 0), class=vfs] ../../source3/smbd/vfs.c:1001(vfs_ChDir)
> vfs_ChDir: vfs_ChDir got /tmp
> [2026/02/06 13:14:20.536509, 3, pid=10707, effective(3000021, 100),
> real(3000021, 0), class=vfs]
> ../../source3/modules/vfs_default.c:257(vfswrap_get_dfs_referrals)
> Path \fileserver1\dfs\templates to alternate path(s): \@ref@\templates.
> [2026/02/06 13:14:20.536531, 10, pid=10707, effective(3000021, 100),
> real(3000021, 0), class=vfs]
> ../../source3/modules/vfs_default.c:369(vfswrap_get_dfs_referrals)
> [2026/02/06 13:14:20.536545, 1]
> ../../librpc/ndr/ndr.c:478(ndr_print_function_debug)
> dfs_GetDFSReferral: struct dfs_GetDFSReferral
> out: struct dfs_GetDFSReferral
> resp : *
> resp: struct dfs_referral_resp
> path_consumed : 0x0024 (36)
> nb_referrals : 0x0001 (1)
> header_flags : 0x00000002 (2)
> 0: DFS_HEADER_FLAG_REFERAL_SVR
> 1: DFS_HEADER_FLAG_STORAGE_SVR
> 0: DFS_HEADER_FLAG_TARGET_BCK
> referral_entries: ARRAY(1)
> referral_entries: struct dfs_referral_type
> version : 0x0003 (3)
> referral : union
> dfs_referral_version(case 3)
> v3: struct dfs_referral_v3
> size : 0x0022 (34)
> server_type :
> DFS_SERVER_NON_ROOT (0)
> entry_flags :
> UNKNOWN_ENUM_VALUE (0)
> ttl :
> 0x00000258 (600)
> referrals : union
> dfs_referral(case 0)
> r1: struct dfs_normal_referral
> DFS_path : *
> DFS_path :
> '\fileserver1\dfs\templates'
> DFS_alt_path : *
> DFS_alt_path :
> '\fileserver1\dfs\templates'
> netw_address : *
> netw_address :
> '\@ref@\templates'
> service_site_guid : union
> dfs_padding(case 16)
> value: ARRAY(16)
> [0] : 0x00 (0)
> [1] : 0x00 (0)
> [2] : 0x00 (0)
> [3] : 0x00 (0)
> [4] : 0x00 (0)
> [5] : 0x00 (0)
> [6] : 0x00 (0)
> [7] : 0x00 (0)
> [8] : 0x00 (0)
> [9] : 0x00 (0)
> [10] : 0x00 (0)
> [11] : 0x00 (0)
> [12] : 0x00 (0)
> [13] : 0x00 (0)
> [14] : 0x00 (0)
> [15] : 0x00 (0)
> [2026/02/06 13:14:20.537015, 10, pid=10707, effective(3000021, 100),
> real(3000021, 0), class=vfs]
> ../../source3/modules/vfs_default.c:203(vfswrap_get_dfs_referrals)
> [2026/02/06 13:14:20.537037, 1]
> ../../librpc/ndr/ndr.c:478(ndr_print_function_debug)
> dfs_GetDFSReferral: struct dfs_GetDFSReferral
> in: struct dfs_GetDFSReferral
> req: struct dfs_GetDFSReferral_in
> max_referral_level : 0x0004 (4)
> servername : '\fileserve1\dfs\templates'
>
>
--
Tel: +491775062083
https://bsky.app/profile/eibo.bsky.social
https://www.xing.com/profile/Eibo_Thieme
https://www.linkedin.com/in/eibo-thieme-89207589
--
To unsubscribe from this list go to the following URL and read the
instructions: https://lists.samba.org/mailman/options/samba