Bug 3654 - Free disk space reporting does not adapt to newly created mount points
Summary: Free disk space reporting does not adapt to newly created mount points
Alias: None
Product: Samba 3.0
Classification: Unclassified
Component: File Services (show other bugs)
Version: 3.0.21c
Hardware: x86 Linux
: P3 normal
Target Milestone: none
Assignee: Samba Bugzilla Account
QA Contact: Samba QA Contact
Depends on:
Reported: 2006-04-03 11:14 UTC by Daniel Stodden
Modified: 2006-04-03 11:17 UTC (History)
0 users

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Stodden 2006-04-03 11:14:19 UTC
- Run a samba share on some arbitrary linux directory
           e.g. /media
- Access the share with e.g. smbclient
- Now mount an additional device,
           e.g. /media/usbdisk
- Enter /media/usbdisk with the above SMB/CIFS client
- See the number of available blocks.
  It will correspond to the free block count on the orginal
  device (the one where /media resides), not the one corresponding
  to the present device.

Theres quite a number of software on windows clients which
relies on correct numbers here, and will refuse to work
if the disk space reported does not match neither expectations 
nor reality.

I suppose the number remains cached somewhere in smbd. Should be
determined via statfs() upon request instead.
Comment 1 Jeremy Allison 2006-04-03 11:17:27 UTC
No, I'm afraid this isn't smbd, this is how UNIX works. If you do a statfs on /media, you get the free space on media - not including any mounted filesystems below it. If you want the free space on /media/usbstick you have to do a statfs on that pathname.
You need to use a dfree script that will aggregate free space on a pathname in order to make this work. This is left as an exercise for the submitter :-). This isn't a Samba bug.