<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Jun 22, 2017 at 4:56 PM, Sanoj Unnikrishnan <span dir="ltr"><<a href="mailto:sunnikri@redhat.com" target="_blank">sunnikri@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><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="m_6929076792786032996gmail-comment_text_5" class="m_6929076792786032996gmail-bz_comment_text m_6929076792786032996gmail-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></div></div></blockquote><div>Can you send this as patch ? Keep the script in 'extras/quota/good-script-name.sh' <br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div> </div><div>2) To recusively get the quota xattr on a FS tree use:<br><a href="https://gist.github.com/sanoj-unnikrishnan/740b177cbe9c3277123cf08d875a6bf8" target="_blank">https://gist.github.com/sanoj-<wbr>unnikrishnan/<wbr>740b177cbe9c3277123cf08d875a6b<wbr>f8</a><br></div><div><br></div></div></div></div></blockquote><div><br></div><div>Cool, even this can get into project if you wish. A blog post on how using this helped maintaining Quota feature would help other admins IMO.<br><br></div><div>Regards,<br></div><div>Amar<br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div></div><div>Regards,<br></div><div>Sanoj<br></div><div><br><br></div></div></div></div>
<br>______________________________<wbr>_________________<br>
Gluster-devel mailing list<br>
<a href="mailto:Gluster-devel@gluster.org">Gluster-devel@gluster.org</a><br>
<a href="http://lists.gluster.org/mailman/listinfo/gluster-devel" rel="noreferrer" target="_blank">http://lists.gluster.org/<wbr>mailman/listinfo/gluster-devel</a><br></blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div>Amar Tumballi (amarts)<br></div></div></div></div></div>
</div></div>