glusterfs/extras/backend-cleanup.sh
Niels de Vos 11f6ad26fe scripts: correct the usage of -perm in backend-cleanup.sh
extras/backend-cleanup.sh uses deprecated find -perm +xxx syntax:

  find [...] -perm +01000 [...]

This GNU extension syntax is deprecated and does not work in GNU
findutils 4.5.11 and later. Please change to find -perm /xxx instead.

The new syntax was introduced in 4.2.25 (October 2005) and should
therefore be available on any relevant system.

BUG: 1294223
Change-Id: Ice742957dd24f0ab4f70a8569dff6f2536e9ac1e
Reported-by: Andreas Metzler <ametzler@bebt.de>
Signed-off-by: Niels de Vos <ndevos@redhat.com>
Reviewed-on: http://review.gluster.org/13080
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
2016-01-14 03:40:58 -08:00

29 lines
623 B
Bash

#!/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) 2010 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 "$@"