Bug 11792 - Windows CIFS client shows the entire volume size instead of the allocated quota size for a mapped network drive
Summary: Windows CIFS client shows the entire volume size instead of the allocated quo...
Alias: None
Product: Samba 4.1 and newer
Classification: Unclassified
Component: File services (show other bugs)
Version: 4.1.20
Hardware: All All
: P5 normal (vote)
Target Milestone: ---
Assignee: Samba QA Contact
QA Contact: Samba QA Contact
Depends on:
Reported: 2016-03-14 11:47 UTC by Guruprasad
Modified: 2016-03-21 14:43 UTC (History)
2 users (show)

See Also:

Snapshot of Windows client showing disk size instead of quota size (134.80 KB, image/png)
2016-03-14 11:47 UTC, Guruprasad
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Guruprasad 2016-03-14 11:47:54 UTC
Created attachment 11917 [details]
Snapshot of Windows client showing disk size instead of quota size

System Configuration: Linux - Debian Wheezy
Samba: 4.1.22


available= yes
restrict anonymous= 0
server string= linux-debian
Workgroup= WORKGROUP
security= user
domain master= auto
preferred master= auto
local master= yes
os level= 20
invalid users= bin daemon adm sync shutdown halt mail news uucp gopher
map to guest= Bad User
host msdfs= yes
strict allocate= no
encrypt passwords= yes
passdb backend= smbpasswd
printcap name= lpstat
printable= no
load printers= yes
max smbd processes= 500
getwd cache= yes
syslog= 0
use sendfile= yes
log level= 0
max log size= 50
unix extensions= no
veto files= /.AppleDouble/.AppleDB/.bin/.AppleDesktop/Network Trash Folder/Temporary Items/:2eDS_Store/
dos charset= ascii
state directory= /mnt/system/samba/system
server max protocol = NT1

path= /mnt/disks/testshare
max connections= 150
directory mode= 0777
create mode= 0777
follow symlinks= yes
wide links= no
nt acl support= no
dos filemode= no
writeable= no
valid users= "admin" "test"
store dos attributes= yes
write list= "admin" "test"

I have two users, out of which i have specified quota size for the "test" user as 1 GB. And the repquota output is as follows:

repquota -F vfsv1 -uv  /mnt/disks/
*** Report for user quotas on device /dev/mapper/56dab44f_vg-lv1d4d8f94
Block grace time: 7days; Inode grace time: 7days
                        Block limits                File limits
User            used    soft    hard  grace    used  soft  hard  grace
root      --     112       0       0             10     0     0       
nobody    --      28       0       0              6     0     0       
test      --       0       0 1048576              1     0     0       

Total blocks: 7
Data blocks: 1
Entries: 3
Used average: 3.000000

When i try to access my share from one of my Windows7 machine, by mapping a network drive, i could see the disk space instead of quota size (when i logged in with the user "test"). I have 1Gb quota size for the user "test". But windows client shows 403Gb space. i.e it shows the underneath disk space and not the quota space.

Please find the attachment for the snapshot.
Comment 1 Uri Simchoni 2016-03-15 18:25:54 UTC
According to discussion on samba-technical, the output of "smbd -b | grep QUOTA" is empty - does not include "WITH_QUOTAS", which is the pre-requisite for supporting quota in free-disk-space calculation.

How was samba built? Is it the standard debian package?

Comment 2 Guruprasad 2016-03-21 14:43:06 UTC
Ya.. Because of my compilation issues i have set "--without-quotas". Now after removing it., I am able to get it. Thanks everyone