<div dir="ltr"><div>I have written some scripts that may help RCA quota accounting related issue in future.<br></div>Please use them when necessary.<br><div><br><div><div>1) Below script will compare accounting done by 'du' with that done by quota and compare them.<br></div><div>Requires input : mountpoint and volname. <br></div><div>ouput: /tmp/gluster_files.tar<br></div><div><pre id="gmail-comment_text_5" class="gmail-bz_comment_text gmail-bz_wrap_comment_text">cd <mountpoint>
du -h | head -n -1 | tr -d '.' |awk '{ for (i = 2; i <= NF; i++) { printf("%s ", $i);} print "" }' > /tmp/gluster_1
cat /tmp/gluster_1 | sed 's/ $//' | sed 's/ /\\ /g' | sed 's/(/\\(/g' | sed 's/)/\\)/g' |xargs gluster v quota <volname> list > /tmp/gluster_2
du -h | head -n -1 |awk '{ for (i = 2; i <= NF; i++) { printf("%s %s", $i, $1);} print "" }' | tr -d '.' > /tmp/gluster_3
cat /tmp/gluster_2 /tmp/gluster_3 | sort > /tmp/gluster_4
find . -type d > /tmp/gluster_5
tar -cvf /tmp/gluster_files.tar /tmp/gluster_*</pre><br> </div><div>2) To recusively get the quota xattr on a FS tree use:<br><a href="https://gist.github.com/sanoj-unnikrishnan/740b177cbe9c3277123cf08d875a6bf8">https://gist.github.com/sanoj-unnikrishnan/740b177cbe9c3277123cf08d875a6bf8</a><br></div><div><br></div><div>Regards,<br></div><div>Sanoj<br></div><div><br><br></div></div></div></div>