[Samba] Free space calculation gets it wrong

Alexander Skwar listen at alexander.skwar.name
Wed Jan 19 10:14:48 GMT 2005


Bart Hendrix schrieb:

> Could you please do the following command: df -h
> 
> And paste the result ;-)

Hm, I cannot. I made up the example to simplyfy it.

The closest I can offer to "df -h" output is what I wrote in the OP:

	Directory	Mountpoint	Free space
	/Shares		/		20MiB
	/Shares/CAD	/Shares/CAD	40GiB

So, in /Shares/CAD, there are 40 gibibytes available. In /, which
hosts the directory /Shares, there are only 20 mebibytes available.
When I'm in \\server\Shares\CAD with the Windows explorer, I see
that there are 20MiB available; it "should" have shown that there
are 40GiB.

Hmm, well, how about this output:

[11:12:01 vz6tml at s08nfs:/APPL_WIN32] $ df -h
Dateisystem          Gre Benut  Verf Ben% Eingehngt auf
/dev/vg00/lvol3       200M   56M  137M  29% /
/dev/vg00/lvol1        98M   41M   48M  46% /stand
/dev/vg00/lvol8       1,5G  717M  769M  49% /var
/dev/vg01/lvol8        15G   11G  3,8G  74% /var/opt/ignite/archives
/dev/vg00/lvol10      500M  357M  136M  73% /var/adm/sw
/dev/vg00/lvol9       2,1G  1,7M  2,0G   1% /var/adm/crash
/dev/vg00/lvol7       1,0G  944M   77M  93% /usr
/dev/vg01/lvol2       118G  116G  2,2G  99% /u
/dev/vg00/lvol6       2,0G  496M  1,5G  26% /tmp
/dev/vg01/lvol9       5,9G  1,7G  4,0G  30% /root/admin
/dev/vg01/lvol11       25G  2,6G   22G  11% /root/admin/catia
/dev/vg01/lvol15      9,9G  9,0G  880M  92% /root/admin/UG
/dev/vg00/lvol5       1,0G  964M   57M  95% /opt
/dev/vg01/lvol1       157G  122G   35G  78% /iman_vols_01
/dev/vg01/lvol10      9,8G  1,2G  8,4G  13% /home
/dev/vg01/lvol6       137G  124G   14G  91% /data
/dev/vg01/lvol4       5,0G  4,5G  486M  91% /data/dxt
/dev/vg01/lvol5       215G  211G  4,5G  98% /data/catdata
/dev/vg01/lvol14       59G   59G  288M 100% /data/PACKARD
/dev/vg01/lvol13      9,8G  3,7G  6,0G  39% /data/IEV
/dev/vg01/lvdelco     137G  106G   31G  78% /data/DELCO
/dev/vg01/lvol3        23G   21G  1,6G  94% /appl
/dev/vg01/lvomni1     4,9G  2,6G  2,2G  55% /test_archive
/dev/vg02/lvol1        20G   11G  9,4G  52% /data/dph01
[11:12:06 vz6tml at s08nfs:/APPL_WIN32] $ df -h .
Dateisystem          Gre Benut  Verf Ben% Eingehngt auf
/dev/vg00/lvol3       200M   56M  137M  29% /
[11:12:08 vz6tml at s08nfs:/APPL_WIN32] $ ls -la
insgesamt 7
lrwxrwxr-x    1 root     sys            15 2003-10-13 09:14 ews_build -> /data/ews_build
lrwxrwxr-x    1 root     sys            27 2003-10-31 14:33 imanhelp -> /data/httpd/htdocs/imanhelp
drwxr-xr-x    2 root     sys            96 2004-11-08 09:53 iman_portal
lrwxrwxr-x    1 root     sys            12 2003-12-12 07:57 oracle -> /appl/oracle
lrwxr-xr-x    1 root     sys            10 2005-01-19 10:07 TcE -> /appl/iman
lrwxr-xr-x    1 root     sys            14 2004-05-13 15:12 toolkits -> /appl/toolkits
lrwxrwxr-x    1 root     sys            12 2003-10-17 06:58 ugdsl3 -> /appl/ugdsl3
lrwxr-xr-x    1 root     sys            12 2004-05-13 13:08 ugdsl4 -> /appl/ugdsl4
lrwxr-xr-x    1 root     sys            12 2004-06-22 17:05 ugsite -> /appl/ugsite
lrwxr-xr-x    1 root     sys            14 2005-01-12 12:31 Unigraphics -> /root/admin/UG
drwxrwxr-x    3 root     sys          1024 2005-01-19 10:07 .
drwxr-xr-x   39 root     root         6144 2005-01-17 08:51 ..
[11:12:13 vz6tml at s08nfs:/APPL_WIN32] $ cd Unigraphics
[11:12:16 vz6tml at s08nfs:/APPL_WIN32/Unigraphics] $ df -h .
Dateisystem          Gre Benut  Verf Ben% Eingehngt auf
/dev/vg01/lvol15      9,9G  9,0G  880M  92% /root/admin/UG

The direcotry /APPL_WIN32 is shared as "appl". The server is named "cifs-srvr1".

[C:\Documents and Settings\vz6tml\Desktop]dir \\cifs-srvr1\appl

 Directory of  \\cifs-srvr1\appl\*

2005-01-19  10:07         <DIR>    .
2005-01-17   8:51         <DIR>    ..
2004-05-05  10:36         <DIR>    ews_build
2004-08-18  14:17         <DIR>    imanhelp
2004-11-08   9:53         <DIR>    iman_portal
2004-05-06   9:39         <DIR>    oracle
2005-01-19  10:09         <DIR>    TcE
2004-11-25  13:35         <DIR>    toolkits
2004-05-13  13:24         <DIR>    ugdsl3
2004-10-26  10:47         <DIR>    ugdsl4
2004-11-18  13:22         <DIR>    ugsite
2005-01-18  15:08         <DIR>    Unigraphics
              0 bytes in 0 files and 12 dirs
    142.651.392 bytes free

[C:\Documents and Settings\vz6tml\Desktop]dir \\cifs-srvr1\appl\Unigraphics

 Directory of  \\cifs-srvr1\appl\Unigraphics\*

2005-01-18  15:08         <DIR>    .
2005-01-18  11:43         <DIR>    ..
2004-10-27  15:59         <DIR>    license
2005-01-17  12:32         <DIR>    lost+found
2005-01-18   8:56         <DIR>    server_nx2
2005-01-18  13:52         <DIR>    server_visview
2005-01-18  15:18         <DIR>    tce-install
2005-01-12  15:15         <DIR>    ugnx2
2004-10-29  13:12         <DIR>    ugnx3
              0 bytes in 0 files and 9 dirs
    142.651.392 bytes free

In the second "dir" command, you see that the same free space is shown
as in the first dir command. 142.651.392 bytes is close to 137M shown
in the df output.

Alexander Skwar
-- 
Hi!  You have reached 555-0129. None of us are here to answer the phone and
the cat doesn't have opposing thumbs, so his messages are illegible.  Please
leave your name and message after the beep...
-------------------------------------------------------------------------


More information about the samba mailing list