Thomas Bork
2002-Oct-03 14:55 UTC
[Samba] Fw: 'max_four_gig' parameter to normalize to 4GB
Hi @all, sorry for the repost but there was no answer and this is very important for me and the users of fli4l.> Hi, > > at first sorry for my bad english... > > I'm working on a little samba package for a routing projekt: > > www.fli4l.de > > This is a router, which runs from a single floppy. For easier use of > printing functions for Win-Clients and for simple shares my package > comes with Samba, with an very old version (1.9.18p10). I need this > old version because she is very small and fits on the floppy. > New versions of the fli4l-router allow an install on compact flashand> hard disk drives. > > The problem is: > > Samba 1.9.18p10 cannot show the real space on big hard disk drives. > There is only shown 4GB (3,96 GB). The "dfree command" doesn't solve > the problem: > > dfree command = /usr/bin/dfree > > #!/bin/sh > #df $1 | tail -1 | awk '{print $2" "$4}' > set -f > set -- `/bin/df $1 | sed -n '$p'` > echo "$2 $4" > > Here is the output for df and dfree of /dev/hda4: > > router 2.0.4 # df > Filesystem 1k-blocks Used Available Use% Mounted on > /dev/ram 3899 1032 2867 26% / > /dev/hda2 63917 5723 58194 9% /opt > /dev/hda1 31640 4538 27102 14% /boot > /dev/hda4 5913931 212 5913719 0% > /usr/local/data > > router 2.0.4 # dfree /dev/hda4 > 5913931 5913719 > > This should be a free space of > > 5913719 / 1024 / 1024 = 5,63976192474365234375 GB > > W2K, XP, Win9x/Me only showing 3,96 GB - I don't know why. > > With the same Kernelversion, a newer Samba-Version (2.2.5) and the > same dfree command there are correct outputs (www.eisfair.org). > > I searched the net for a solution and found Samba cvs messages like > this: > > *** > smbd/dfree.c: Added 'max_four_gig' parameter to normalize to 4GB when > asked > (used to be the default). > smbd/open.c smbd/reply.c smbd/trans2.c: > Changed to allow a <4GB volume size to be returned on a > trans2 > qfsinfo level 1 call. NT clients refuse to do the correct call to > Samba servers > (Herb recons it's the unicode bit) - this allows even a level 1 to > return a > volume size up to 9444732961341243916800 bytes (should be enough for > now, > until we get the unicode support added :-). > Jeremy. > *** > > I there a way for me to correct the old version 1.9.18p10 for showing > the reals free space on big disks? Your help is very appreciated. > > tomA little bit shorter: I need a patch for 1.9.18p10 for showing correct free space on big harddisks (>4GB) with or without dfree command. I'm not an expert in C programming. Can anybody help me by this? tom
Andrew Bartlett
2002-Oct-03 23:28 UTC
[Samba] Fw: 'max_four_gig' parameter to normalize to 4GB
Thomas Bork wrote:> > Hi @all, > > sorry for the repost but there was no answer and this is very important > for me and the users of fli4l.I *really* don't expect you will find 'easy' solutions to the hundreds of bugfixes in Samba since 1.9.18p10. Even if you 'fix' this one, there will be *many* others. There are other approaches to reducing binary size - look into the MAX_DEBUG_LEVEL #define in local.h, and look into making a single binary, using one main() and using argv[0] to distinguish between programs, but getting samba small *is* hard. Andrew Bartlett -- Andrew Bartlett abartlet@pcug.org.au Manager, Authentication Subsystems, Samba Team abartlet@samba.org Student Network Administrator, Hawker College abartlet@hawkerc.net http://samba.org http://build.samba.org http://hawkerc.net