1VFS_FILEID(8) System Administration tools VFS_FILEID(8)
2
3
4
6 vfs_fileid - Generates file_id structs with unique device id values for
7 cluster setups
8
10 vfs objects = fileid
11
13 This VFS module is part of the samba(7) suite.
14
15 Samba uses file_id structs to uniquely identify files for locking
16 purpose. By default the file_id contains the device and inode number
17 returned by the stat() system call. As the file_id is a unique
18 identifier of a file, it must be the same on all nodes in a cluster
19 setup. This module overloads the SMB_VFS_FILE_ID_CREATE() operation and
20 generates the device number based on the configured algorithm (see the
21 "fileid:algorithm" option).
22
23 When using the fsname or fsid algorithm a stat() and statfs() call is
24 required for all mounted file systems to generate the file_id. If e.g.
25 an NFS file system is unresponsive such a call might block and the smbd
26 process will become unresponsive. Use the "fileid:fstype deny",
27 "fileid:fstype allow", "fileid:mntdir deny", or "fileid:mntdir allow"
28 options to ignore potentially unresponsive file systems.
29
31 fileid:algorithm = ALGORITHM
32 Available algorithms are fsname, fsname_nodirs, fsid and hostname.
33 The default value is fsname.
34
35 The fsname algorithm generates device id by hashing the kernel
36 device name.
37
38 The fsname_nodirs algorithm generates device id by hashing the
39 kernel device name for files and by hashing the hostname for
40 directories. This can be used to deliberately break lock coherency
41 for directories in a cluster.
42
43 The fsid algorithm generates the device id from the f_fsid returned
44 from the statfs() syscall.
45
46 The hostname algorithm generates device id by hashing the hostname.
47 This can be used to deliberately break lock coherency in a cluster.
48
49 The fsname_norootdir algorithm generates device ids by hashing the
50 kernel device name, except for the root directory of shares where
51 it will use the hostname algorithm. This can be used to
52 deliberately break lock coherency in a cluster for the root
53 directory of a share.
54
55 fileid:mapping = ALGORITHM
56 This option is the legacy version of the fileid:algorithm option,
57 which was used in earlier versions of fileid mapping feature in
58 custom Samba 3.0 versions.
59
60 fileid:fstype deny = LIST
61 List of file system types to be ignored for file_id generation.
62
63 fileid:fstype allow = LIST
64 List of file system types to be allowed for file_id generation. If
65 this option is set, file system types not listed here are ignored.
66
67 fileid:mntdir deny = LIST
68 List of file system mount points to be ignored for file_id
69 generation.
70
71 fileid:mntdir allow = LIST
72 List of file system mount points to be allowed for file_id
73 generation. If this option is set, file system mount points not
74 listed here are ignored.
75
76 fileid:nolockinode
77 This option triggers use of the fileid hostname algorithm for the
78 configured inode which can be used to deliberately break lock
79 coherency for the corresponding file or directory in a cluster.
80
82 Usage of the fileid module with the fsid algorithm:
83
84 [global]
85 vfs objects = fileid
86 fileid:algorithm = fsid
87
89 This man page is part of version 4.11.4 of the Samba suite.
90
92 The original Samba software and related utilities were created by
93 Andrew Tridgell. Samba is now developed by the Samba Team as an Open
94 Source project similar to the way the Linux kernel is developed.
95
96
97
98Samba 4.11.4 12/16/2019 VFS_FILEID(8)