Bug 829783 - object-storage: tmp dir need to have some cleanup strategy
object-storage: tmp dir need to have some cleanup strategy
Status: CLOSED CURRENTRELEASE
Product: GlusterFS
Classification: Community
Component: object-storage (Show other bugs)
pre-release
x86_64 Linux
unspecified Severity medium
: ---
: ---
Assigned To: Peter Portante
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-06-07 10:35 EDT by Saurabh
Modified: 2016-01-19 01:10 EST (History)
4 users (show)

See Also:
Fixed In Version: glusterfs-3.4.0
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-07-24 13:23:21 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Saurabh 2012-06-07 10:35:10 EDT
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.
Comment 1 Junaid 2012-06-26 06:08:06 EDT
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.
Comment 2 Peter Portante 2012-11-14 11:50:22 EST
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.
Comment 3 Peter Portante 2012-11-19 17:05:38 EST
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).
Comment 4 Junaid 2013-04-03 06:41:36 EDT
Patch submitted upstream. With this fix, there won't be any tmp directory at all.
Comment 5 Peter Portante 2013-04-03 10:20:39 EDT
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.

Note You need to log in before you can comment on or make changes to this bug.