Bug 7436 - Samba server returns incorrect SMB2 FS_FULL_SIZE_INFO for bytes avail and Sectors per Unit
Samba server returns incorrect SMB2 FS_FULL_SIZE_INFO for bytes avail and Sec...
Status: NEW
Product: Samba 3.6
Classification: Unclassified
Component: SMB2
unspecified
Other Linux
: P3 normal
: ---
Assigned To: Jeremy Allison
Samba QA Contact
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2010-05-18 18:27 UTC by Steve French
Modified: 2011-12-08 16:23 UTC (History)
3 users (show)

See Also:


Attachments
trace of stat -f to Samba server (from Linux smb2 kernel client) (1.37 KB, application/octet-stream)
2010-05-18 18:30 UTC, Steve French
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Steve French 2010-05-18 18:27:00 UTC
Samba server incorrectly returns same value for admin and user blocks available.

Also server reports 75% smaller blocksize than in cifs which causes "stat -f" to look different than before, and may cause rounding errors.  Went from 4K (in cifs, and actually what the host OS, Linux in this case) to reporting using  1K block size (in smb2 server now).
1K block sizes = (512 bytes sector * 2 sectors/allocation unit) should be 8 sectors/allocation-unit as before.

Notice that the remote (what the server reports) differs from what is reported locally vs. ext4 (see below output):

stevef@stevef-laptop:~/smb2$ stat -f /mnt
  File: "/mnt"
    ID: 0        Namelen: 4096    Type: UNKNOWN (0xfe534d42)
Block size: 1024       Fundamental block size: 1024
Blocks: Total: 34356412   Free: 13739320   Available: 13739320
Inodes: Total: 0          Free: 0
stevef@stevef-laptop:~/smb2$ stat -f /proc/fs
  File: "/proc/fs"
    ID: 0        Namelen: 255     Type: proc
Block size: 4096       Fundamental block size: 4096
Blocks: Total: 0          Free: 0          Available: 0
Inodes: Total: 0          Free: 0
stevef@stevef-laptop:~/smb2$ stat -f .
  File: "/home/stevef"
    ID: a00c7b3b58365b8e Namelen: 255     Type: ext2/ext3
Block size: 4096       Fundamental block size: 4096
Blocks: Total: 8589103    Free: 3873053    Available: 3400850
Comment 1 Steve French 2010-05-18 18:30:22 UTC
Created attachment 5719 [details]
trace of stat -f to Samba server (from Linux smb2 kernel client)
Comment 2 Karolin Seeger 2010-06-11 04:23:54 UTC
Change components
Comment 3 Tom Schulz 2011-09-12 15:45:38 UTC
I think that this is the same bug, so I will report this here. If you think that it is not, I can open a new bug.

I built and installed samba-3.6.0 on a Solaris 8 Sparc machine and enabled max protocol = smb2. One of our Windows 7 users could not create any files as Windows reported zero free space on the share. Solaris shows that there is free space as follows:

> df -k .
Filesystem            kbytes    used   avail capacity  Mounted on
seahorse:/disk_c0t2d0s6/users/klamerus
                     70714729 61854280 8153302    89%    /home/users/klamerus

For us this is a fatal bug.
Comment 4 Tom Schulz 2011-12-08 16:23:09 UTC
The problem with the incorrect free space being reported does not show up with samba-3.6.1, so I think that this is fixed. Could someone else confirm this?