Description of problem: Directory quota is ignored by command "cp *" Version-Release number of selected component (if applicable): glusterfs 3.6.2 How reproducible: 100% reproducible Steps to Reproduce: 1. Have quota on /cifs_share/Dir3: Path Hard-limit Soft-limit Used Available Soft-limit exceeded? Hard-limit exceeded? --------------------------------------------------------------------------------------------------------------------------- /cifs_share/Dir3 20.0MB 80% 17.0MB 3.0MB Yes No 2. Check contents of the /Dir3 ls /samba/nas-volume-0001/cifs_share/Dir3/ glusterfs-3.2.7.tar glusterfs-3.3.0.tar.gz glusterweb-f88e119.tar.gz 3. Copy 30 files with total size of 165MB to the /Dir3 cp *.log /samba/nas-volume-0001/cifs_share/Dir3/ 4. Check quota: gluster volume quota nas-volume-0001 list Path Hard-limit Soft-limit Used Available Soft-limit exceeded? Hard-limit exceeded? --------------------------------------------------------------------------------------------------------------------------- /cifs_share/Dir3 20.0MB 80% 182.7MB 0Bytes Yes Yes 5. Check files at the /Dir3 ls /samba/nas-volume-0001/cifs_share/Dir3/ admin.log fo_handler.log ipmi_sel_current.log nas_vol_seg_repair-nas-metadata-on-SC-10.10.63.182_nas-metadata.log sfcmd_iping.log sfcm_nas_monitor.log stonefly.log dbUpgrade.log fo_handler_service.log isns_update.log sfapi_handler_9003.log sfcmd.log sffe_err.log traps.log do_command.log glusterfs-3.2.7.tar lu_stats.log sfapi_handler.log sfcmd_service.log sffe_monitor.log utils.log ff1000.log glusterfs-3.3.0.tar.gz ms_service_.log sfapi_handler_service.log sfcm_handler.log sfvs.log ffmirrord.log glusterweb-f88e119.tar.gz ms_service.log sfapi.log sfcm.log sfvs_ports.log 6. Files at the source directory: ls *.log admin.log ffmirrord.log isns_update.log nas_vol_seg_repair-nas-metadata-on-SC-10.10.63.182_nas-metadata.log sfapi.log sfcm_handler.log sffe_monitor.log traps.log dbUpgrade.log fo_handler.log lu_stats.log sfapi_handler_9003.log sfcmd_iping.log sfcm.log sfvs.log utils.log do_command.log fo_handler_service.log ms_service_.log sfapi_handler.log sfcmd.log sfcm_nas_monitor.log sfvs_ports.log ff1000.log ipmi_sel_current.log ms_service.log sfapi_handler_service.log sfcmd_service.log sffe_err.log stonefly.log Actual results: Copy was executed as an atomic command and all files were copied in a bulk. Expected results: Copy has to copy files one-by-one until the hard-limit quota is reached. Additional info:
Hi, The reason that quota has not restricted while copying may be because of the soft and hard timeouts not set to 0. I ran the same steps as mentioned above with hard and soft timeout set to 0s and quota shows "Disk quota exceeded" as expected. Could you please make the following changes and check it again? 'gluster volume quota <VOLNAME> soft-timeout 0s' 'gluster volume quota <VOLNAME> hard-timeout 0s' Please refer here: https://gluster.readthedocs.org/en/latest/Administrator%20Guide/Directory%20Quota/ to know more about timeouts. -- Regards, Manikandan Selvaganesh.
Manikandan, Yes, the timeout settings able enforce quota now. There are still some time between moment when the quota is enforced and "cp" is stopped, so the "cp" is able to copy some additional data above the limit. And some file are not copied because the disk quota exceeded. Thanks! Best regards! (In reply to Manikandan from comment #1) > Hi, > > The reason that quota has not restricted while copying may be because of the > soft and hard timeouts not set to 0. > > I ran the same steps as mentioned above with hard and soft timeout set to 0s > and quota shows "Disk quota exceeded" as expected. > > Could you please make the following changes and check it again? > > 'gluster volume quota <VOLNAME> soft-timeout 0s' > 'gluster volume quota <VOLNAME> hard-timeout 0s' > > Please refer here: > https://gluster.readthedocs.org/en/latest/Administrator%20Guide/ > Directory%20Quota/ to know more about timeouts. > > > > -- > Regards, > Manikandan Selvaganesh.
Hi, There is always a small window where quota can exceed depending on IO and also the quota limit set value. Closing the bug as it's an expected behavior. -- Regards, Manikandan Selvaganesh.