Change dfree command to be a share level parameter.
[Samba.git] / docs / smbdotconf / misc / dfreecommand.xml
blobbe5f00aabd1b9662f01895c8f4deb819cd90b569
1 <samba:parameter name="dfree command"
2                  context="S"
3                          type="string"
4                  advanced="1" developer="1"
5                  xmlns:samba="http://www.samba.org/samba/DTD/samba-doc">
6 <description>
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 &quot;Abort Retry
13         Ignore&quot; 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
18         this function.</para>
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
24         heavy load.
25         </para>
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"> 
40 #!/bin/sh
41 df $1 | tail -1 | awk '{print $2&quot; &quot;$4}'
42 </programlisting>
43         </para>
45         <para>or perhaps (on Sys V based systems):
46 <programlisting format="linespecific"> 
47 #!/bin/sh
48 /usr/bin/df -k $1 | tail -1 | awk '{print $3&quot; &quot;$5}'
49 </programlisting>
50         </para>
51                 
52         <para>
53         Note that you may have to replace the command names with full path names on some systems.
54         </para>
56 </description>
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>
60 </samba:parameter>