~ubuntu-branches/ubuntu/trusty/glusterfs/trusty

« back to all changes in this revision

Viewing changes to extras/backend-cleanup.sh

  • Committer: Bazaar Package Importer
  • Author(s): Patrick Matthäi
  • Date: 2010-02-09 18:53:10 UTC
  • mfrom: (1.2.4 upstream) (4.1.5 sid)
  • Revision ID: james.westby@ubuntu.com-20100209185310-ww8p82lsbosorg2u
* New upstream release.
* Uploading to unstable.
* Bump Standards-Version to 3.8.4 (no changes needed).

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/sh
 
2
 
 
3
# This script can be used to cleanup the 'cluster/distribute' translator's 
 
4
# stale link files. One may choose to run this only when number of subvolumes
 
5
# to distribute volume gets increased (or decreased) 
 
6
 
7
# This script has to be run on the servers, which are exporting the data to 
 
8
# GlusterFS
 
9
#
 
10
# (c) 2009 Gluster Inc <http://www.gluster.com/> 
 
11
 
 
12
set -e
 
13
 
 
14
# Change the below variable as per the setup.
 
15
export_directory="/export/glusterfs"
 
16
 
 
17
clean_dir()
 
18
{
 
19
    # Clean the 'link' files on backend
 
20
    find "${export_directory}" -type f -perm +01000 -exec rm -v '{}' \; 
 
21
}
 
22
 
 
23
main()
 
24
{
 
25
    clean_dir ;
 
26
}
 
27
 
 
28
main "$@"