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