diff options
author | Pavan Sondur <pavan@gluster.com> | 2010-01-19 08:11:05 +0000 |
---|---|---|
committer | Anand V. Avati <avati@dev.gluster.com> | 2010-01-19 05:56:39 -0800 |
commit | a6a1f596a443b6a015dca6435f1d22fc582acc80 (patch) | |
tree | 2a3f876cc0eab33a225978d306a96a37a3e8f9a4 /extras/backend-cleanup.sh | |
parent | a23185f3a43ec95a56af9f0f543b67a1fcfb4852 (diff) |
extras: Add defrag scripts to the repository
Signed-off-by: Pavan Vilas Sondur <pavan@gluster.com>
Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
BUG: 478 (Add defrag scripts into glusterfs)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=478
Diffstat (limited to 'extras/backend-cleanup.sh')
-rw-r--r-- | extras/backend-cleanup.sh | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/extras/backend-cleanup.sh b/extras/backend-cleanup.sh new file mode 100644 index 000000000..755161f18 --- /dev/null +++ b/extras/backend-cleanup.sh @@ -0,0 +1,28 @@ +#!/bin/sh + +# This script can be used to cleanup the 'cluster/distribute' translator's +# stale link files. One may choose to run this only when number of subvolumes +# to distribute volume gets increased (or decreased) +# +# This script has to be run on the servers, which are exporting the data to +# GlusterFS +# +# (c) 2009 Gluster Inc <http://www.gluster.com/> + +set -e + +# Change the below variable as per the setup. +export_directory="/export/glusterfs" + +clean_dir() +{ + # Clean the 'link' files on backend + find "${export_directory}" -type f -perm +01000 -exec rm -v '{}' \; +} + +main() +{ + clean_dir ; +} + +main "$@" |