1 <samba:parameter name="dfree command"
4 advanced="1" developer="1"
5 xmlns:samba="http://www.samba.org/samba/DTD/samba-doc">
8 <para>The <parameter moreinfo="none">dfree command</parameter> setting
9 should only be used on systems where a problem occurs with the
10 internal disk space calculations. This has been known to happen
11 with Ultrix, but may occur with other operating systems. The
12 symptom that was seen was an error of "Abort Retry
13 Ignore" at the end of each directory listing.</para>
15 <para>This setting allows the replacement of the internal routines to
16 calculate the total disk space and amount available with an external
17 routine. The example below gives a possible script that might fulfill
20 <para>In Samba version 3.0.21 this parameter has been changed to be
21 a per-share parameter, and in addition the parameter
22 <smbconfoption name="dfree cache time"/>dfree cache time was added
23 to allow the output of this script to be cached for systems under
27 <para>The external program will be passed a single parameter indicating
28 a directory in the filesystem being queried. This will typically consist
29 of the string <filename moreinfo="none">./</filename>. The script should return two
30 integers in ASCII. The first should be the total disk space in blocks,
31 and the second should be the number of available blocks. An optional
32 third return value can give the block size in bytes. The default
33 blocksize is 1024 bytes.</para>
35 <para>Note: Your script should <emphasis>NOT</emphasis> be setuid or
36 setgid and should be owned by (and writeable only by) root!</para>
38 <para>Where the script dfree (which must be made executable) could be:
39 <programlisting format="linespecific">
41 df $1 | tail -1 | awk '{print $2" "$4}'
45 <para>or perhaps (on Sys V based systems):
46 <programlisting format="linespecific">
48 /usr/bin/df -k $1 | tail -1 | awk '{print $3" "$5}'
53 Note that you may have to replace the command names with full path names on some systems.
57 <value type="default"><comment>By default internal routines for
58 determining the disk capacity and remaining space will be used.</comment></value>
59 <value type="example">/usr/local/samba/bin/dfree</value>