e52a0cc23b
Signed-off-by: Raghavendra G <raghavendra@gluster.com> Signed-off-by: Anand Avati <avati@gluster.com> BUG: 2664 (Quota: recreating the volume on same bricks shows similar info as for earlier one using "list") URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2664
25 lines
533 B
Bash
Executable File
25 lines
533 B
Bash
Executable File
#!/bin/bash
|
|
|
|
# This script is used to remove xattrs set by quota translator on a path.
|
|
# It is generally invoked from quota-metadata-cleanup.sh, but can
|
|
# also be used stand-alone.
|
|
|
|
usage ()
|
|
{
|
|
echo >&2 "usage: $0 <path>"
|
|
}
|
|
|
|
main ()
|
|
{
|
|
[ $# -ne 1 ] && usage $0
|
|
|
|
XATTR_KEY_VALUE_PAIRS=`getfattr -h -d -m 'trusted.glusterfs.quota' $1 2>/dev/null | sed -e '/^# file/d'`
|
|
|
|
for i in $XATTR_KEY_VALUE_PAIRS; do
|
|
XATTR_KEY=`echo $i | sed -e 's/\([^=]*\).*/\1/g'`
|
|
setfattr -h -x $XATTR_KEY $1
|
|
done
|
|
}
|
|
|
|
main $@
|