Bug 829783 - object-storage: tmp dir need to have some cleanup strategy
Summary: object-storage: tmp dir need to have some cleanup strategy
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: GlusterFS
Classification: Community
Component: object-storage
Version: pre-release
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Peter Portante
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-06-07 14:35 UTC by Saurabh
Modified: 2016-01-19 06:10 UTC (History)
4 users (show)

Fixed In Version: glusterfs-3.4.0
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-07-24 17:23:21 UTC
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Embargoed:


Attachments (Terms of Use)

Description Saurabh 2012-06-07 14:35:10 UTC
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 10:08:06 UTC
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 16:50:22 UTC
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 22:05:38 UTC
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 10:41:36 UTC
Patch submitted upstream. With this fix, there won't be any tmp directory at all.

Comment 5 Peter Portante 2013-04-03 14:20:39 UTC
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.