Description of problem: A user has his home directory mounted on gluster volume with quota enabled on the root of his directory (/home/user). As a admin I would want to limit quota on the "Downloads" directory to 50G. Now, when the user downloads 23G of data into the directory and checks the output of "df -h", he is confused since in "df -h" he sees "Used" as 15G whereas the data he downloaded is 23G. Version-Release number of selected component (if applicable): glusterfs-server-3.4.0.39rhs-1.el6rhs.x86_64 How reproducible: Always Steps to Reproduce: 1. Configure 2x2 volume. 2. Enable quota and set deem-statfs to on 3. Set limit usage on / to 200G 4. Set limit usage on a directory (Downloads) to 50G 5. Set soft and hard timeout to 0 6. Download some data (23G in this case) into this directory. (I used firefox to download some iso's). Actual results: "df -h" on Downloads shows "Used" as 15G. Expected results: "df -h" on Downloads shows "Used" as 23G. Additional info: However, when I disable quota and repeat steps 2,3,4, I could see the correct value in the output of "df -h".
[root@server1 ~]# gluster vol info Volume Name: shanks-quota Type: Distributed-Replicate Volume ID: 2e661bf1-828d-412e-92cb-8eceacf29f5f Status: Started Number of Bricks: 2 x 2 = 4 Transport-type: tcp Bricks: Brick1: 10.70.43.3:/rhs/shanks-quota/quota1 Brick2: 10.70.43.199:/rhs/shanks-quota/quota1 Brick3: 10.70.43.156:/rhs/shanks-quota/quota1 Brick4: 10.70.43.1:/rhs/shanks-quota/quota1 Options Reconfigured: features.hard-timeout: 0 features.soft-timeout: 0 features.quota-deem-statfs: on features.quota: on Server: [root@server1 ~]# gluster vol quota shanks-quota list Path Hard-limit Soft-limit Used Available -------------------------------------------------------------------------------- / 200.0GB 80% 14.0GB 186.0GB /shanks/Downloads 50.0GB 80% 14.0GB 36.0GB <<<<<<<<<<<<<<< [root@server1 ~]# Client: [root@localhost Downloads]# df -h /home/shanks/Downloads Filesystem Size Used Avail Use% Mounted on 10.70.43.3:/shanks-quota 50G 15G 36G 29% /home <<<<<<<<<<<<<<< [root@localhost Downloads]# [root@localhost Downloads]# ls -lh /home/shanks/Downloads/ total 23G <<<<<<<<<<<<<<< -rw-rw-r--. 1 shanks shanks 3.0G Nov 7 2013 en_windows_7_enterprise_with_sp1_x64_dvd_u_677651.iso -rw-rw-r--. 1 shanks shanks 2.3G Nov 7 2013 en_windows_7_enterprise_x86_dvd_x15-70745.iso -rw-rw-r--. 1 shanks shanks 3.3G Nov 7 2013 en_windows_8_enterprise_x64_dvd_917522(1).iso -rw-rw-r--. 1 shanks shanks 3.3G Nov 7 2013 en_windows_8_enterprise_x64_dvd_917522.iso -rw-rw-r--. 1 shanks shanks 3.0G Nov 7 2013 en_windows_server_2008_r2_with_sp1_x64_dvd_617601.iso -rw-rw-r--. 1 shanks shanks 1.9G Nov 7 2013 en_windows_server_2008_with_sp2_x86_dvd_342333.iso -rw-rw-r--. 1 shanks shanks 2.5G Nov 7 2013 en_windows_server_2008_x64_dvd_x14-26714.iso -rw-rw-r--. 1 shanks shanks 3.5G Nov 7 2013 en_windows_server_2012_x64_dvd_915478.iso [root@localhost Downloads]# Work-around Server: [root@server1 ~]# gluster vol quota shanks-quota list Path Hard-limit Soft-limit Used Available -------------------------------------------------------------------------------- / 200.0GB 80% 14.0GB 186.0GB /shanks/Downloads 50.0GB 80% 14.0GB 36.0GB [root@server1 ~]# gluster vol quota shanks-quota list Path Hard-limit Soft-limit Used Available -------------------------------------------------------------------------------- / 200.0GB 80% 14.0GB 186.0GB /shanks/Downloads 50.0GB 80% 14.0GB 36.0GB [root@server1 ~]# gluster vol quota shanks-quota disable Disabling quota will delete all the quota configuration. Do you want to continue? (y/n) y volume quota : success [root@server1 ~]# gluster vol quota shanks-quota enable volume quota : success [root@server1 ~]# gluster vol set shanks-quota features.quota-deem-statfs on volume set: success [root@server1 ~]# gluster vol quota shanks-quota limit-usage / 200GB volume quota : success [root@server1 ~]# gluster vol quota shanks-quota limit-usage /shanks/Downloads 50GB volume quota : success [root@server1 ~]# gluster vol quota shanks-quota list Path Hard-limit Soft-limit Used Available -------------------------------------------------------------------------------- / 200.0GB 80% 22.5GB 177.5GB /shanks/Downloads 50.0GB 80% 22.5GB 27.5GB <<<<<<<<<<<<<<< [root@server1 ~]# Client: [root@localhost Downloads]# df -h /home/shanks/Downloads Filesystem Size Used Avail Use% Mounted on 10.70.43.3:/shanks-quota 50G 23G 28G 45% /home <<<<<<<<<<<<<<< [root@localhost Downloads]# ls -lh /home/shanks/Downloads/ total 23G -rw-rw-r--. 1 shanks shanks 3.0G Nov 7 2013 en_51.iso -rw-rw-r--. 1 shanks shanks 2.3G Nov 7 2013 en_45.iso -rw-rw-r--. 1 shanks shanks 3.3G Nov 7 2013 en_22(1).iso -rw-rw-r--. 1 shanks shanks 3.3G Nov 7 2013 en_22.iso -rw-rw-r--. 1 shanks shanks 3.0G Nov 7 2013 en_01.iso -rw-rw-r--. 1 shanks shanks 1.9G Nov 7 2013 en_33.iso -rw-rw-r--. 1 shanks shanks 2.5G Nov 7 2013 en_14.iso -rw-rw-r--. 1 shanks shanks 3.5G Nov 7 2013 en_78.iso [root@localhost Downloads]#
Don't see this with the latest build. Version: glusterfs-server-3.4.0.44rhs-1.el6rhs.x86_64 [root@localhost ~]# df -h /home/shanks/Downloads/ Filesystem Size Used Avail Use% Mounted on 10.70.42.214:/shanks-vol 150G 51G 100G 34% /home [root@localhost ~]# [root@localhost ~]# ls -lh /home/shanks/Downloads/ total 51G -rw-rw-r--. 1 shanks shanks 792M Nov 14 06:07 en.iso -rw-rw-r--. 1 shanks shanks 792M Nov 14 06:07 en1.iso ...
Fix for bug 1027364 seems to have solved this. Since earlier I was consistently seeing this problem, not anymore with the latest build as per comment #2. Hence marking it as VERIFIED.
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. http://rhn.redhat.com/errata/RHBA-2013-1769.html