Description of problem: we need to have some cleanup for tmp directory regularly after certain intervals. [root@gqac022 async_pending]# cd .. [root@gqac022 AUTH_test]# ls -R cont* cont1: cont2: cont3: cont4: cont5: [root@gqac022 AUTH_test]# ls async_pending cont1 cont2 cont3 cont4 cont5 tmp [root@gqac022 AUTH_test]# du -h tmp/ 20G tmp/ [root@gqac022 AUTH_test]# df -h Filesystem Size Used Avail Use% Mounted on /dev/mapper/vg_gqac022-lv_root 50G 25G 23G 52% / tmpfs 24G 1.1M 24G 1% /dev/shm /dev/sda1 485M 31M 429M 7% /boot /dev/mapper/vg_gqac022-lv_home 366G 21G 346G 6% /home localhost:test 732G 36G 697G 5% /mnt/gluster-object/AUTH_test [root@gqac022 AUTH_test]# Version-Release number of selected component (if applicable): 3.3.0qa45, swift-rc-rpms How reproducible: found after creating large number of objects Steps to Reproduce: 1. create large number of objects and after a certain time the tmp directory seems to have grown in size 2. 3. Actual results: Expected results: Additional info: if we already have some strategy for cleanup please update about that one.
tmp directory contains incompletely uploaded files. So, having them is waste of storage. We should come up with the scheme to periodically delete the contents of tmp directory.
This bug will most likely be fixed as a result of fixing https://bugzilla.redhat.com/show_bug.cgi?id=876660. Since I am working on that, I'll take this bug as well.
We should probably not being using a single temporary directory for all temp file creations on volume, but just create temporary files locally. And the temp file should be auto-deleted on clean-up if it fails to be renamed (if we don't already do that, or should be fixed if that is not working correctly).
Patch submitted upstream. With this fix, there won't be any tmp directory at all.
Not only do we need to consider Comment 3, but we need to be sure these temp files are not presented as objects in container *and* directory object listings.