<html><body><div style="font-family: lucida console,sans-serif; font-size: 12pt; color: #000000"><div><div><br></div><div>Hi,<br></div><div><br></div><div>I've started a new project on the forge, called gstatus.- wiki page is&nbsp;<span class="Object" id="OBJ_PREFIX_DWT1482_com_zimbra_url"><span class="Object" id="OBJ_PREFIX_DWT1483_com_zimbra_url"><a href="https://forge.gluster.org/gstatus/pages/Home" target="_blank" data-mce-href="https://forge.gluster.org/gstatus/pages/Home">https://forge.gluster.org/gstatus/pages/Home</a></span></span>&nbsp;</div><div><br></div><div>The idea is to provide admins with a single command to assess the state of the components of a cluster - nodes, bricks and volume states - together with capacity information.</div><div><br></div><div>It's the kind of feature that would be great (IMO) as a sub command of gluster i.e. gluster status - but as a stop gap here's the python project (we could even use this as a prototype!)</div><div><br></div><div>On the wiki page, you'll find some additional volume status definitions that I've dreamt up - online-degraded, online-partial, to describe the effect brick down events have on a volume's data availability. There are output examples on the wiki, but here's some examples to show you what you currently get from the tool&nbsp;</div><div><br></div><div>On my test 4-way cluster, this is what a healthy state looks like</div><div><p style="margin: 0px;" data-mce-style="margin: 0px;"><span style="font-family: 'courier new', courier, monaco, monospace, sans-serif;" data-mce-style="font-family: 'courier new', courier, monaco, monospace, sans-serif;">[root@rhs1-1 gstatus]# ./gstatus.py </span><br><span style="font-family: 'courier new', courier, monaco, monospace, sans-serif;" data-mce-style="font-family: 'courier new', courier, monaco, monospace, sans-serif;">Analysis complete</span></p><p style="margin: 0px;" data-mce-style="margin: 0px;"><span style="font-family: 'courier new', courier, monaco, monospace, sans-serif;" data-mce-style="font-family: 'courier new', courier, monaco, monospace, sans-serif;">&nbsp;</span></p><p style="margin: 0px;" data-mce-style="margin: 0px;"><span style="font-family: 'courier new', courier, monaco, monospace, sans-serif;" data-mce-style="font-family: 'courier new', courier, monaco, monospace, sans-serif;">Cluster Summary:</span><br><span style="font-family: 'courier new', courier, monaco, monospace, sans-serif;" data-mce-style="font-family: 'courier new', courier, monaco, monospace, sans-serif;"> Version - 3.4.0.44rhs Nodes - 4/ 4 Bricks - 4/ 4 Volumes - 1/ 1</span></p><p style="margin: 0px;" data-mce-style="margin: 0px;"><span style="font-family: 'courier new', courier, monaco, monospace, sans-serif;" data-mce-style="font-family: 'courier new', courier, monaco, monospace, sans-serif;">&nbsp;</span></p><p style="margin: 0px;" data-mce-style="margin: 0px;"><span style="font-family: 'courier new', courier, monaco, monospace, sans-serif;" data-mce-style="font-family: 'courier new', courier, monaco, monospace, sans-serif;">Volume Summary</span><br><span style="font-family: 'courier new', courier, monaco, monospace, sans-serif;" data-mce-style="font-family: 'courier new', courier, monaco, monospace, sans-serif;">&nbsp; myvol &nbsp;&nbsp;&nbsp;&nbsp;ONLINE (4/4 bricks online) - Distributed-Replicate</span><br><span style="font-family: 'courier new', courier, monaco, monospace, sans-serif;" data-mce-style="font-family: 'courier new', courier, monaco, monospace, sans-serif;"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Capacity: 64.53 MiB/19.97 GiB (used,total)</span></p><p style="margin: 0px;" data-mce-style="margin: 0px;"><span style="font-family: 'courier new', courier, monaco, monospace, sans-serif;" data-mce-style="font-family: 'courier new', courier, monaco, monospace, sans-serif;">&nbsp;</span></p><p style="margin: 0px;" data-mce-style="margin: 0px;"><span style="font-family: 'courier new', courier, monaco, monospace, sans-serif;" data-mce-style="font-family: 'courier new', courier, monaco, monospace, sans-serif;">Status Messages</span><br><span style="font-family: 'courier new', courier, monaco, monospace, sans-serif;" data-mce-style="font-family: 'courier new', courier, monaco, monospace, sans-serif;"> Cluster is healthy, all checks successful</span></p><p style="margin: 0px;" data-mce-style="margin: 0px;"><span style="font-family: 'courier new', courier, monaco, monospace, sans-serif;" data-mce-style="font-family: 'courier new', courier, monaco, monospace, sans-serif;">&nbsp;</span></p><p style="margin: 0px;" data-mce-style="margin: 0px;"><span style="font-family: arial, helvetica, sans-serif;" data-mce-style="font-family: arial, helvetica, sans-serif;">And then if I take a <strong>two nodes</strong> down, that provide bricks to the <strong>same replica set</strong>, I see;</span></p><p style="margin: 0px;" data-mce-style="margin: 0px;"><span style="font-family: 'courier new', courier, monaco, monospace, sans-serif;" data-mce-style="font-family: 'courier new', courier, monaco, monospace, sans-serif;">&nbsp;</span></p><p style="margin: 0px;" data-mce-style="margin: 0px;"><span style="font-family: 'courier new', courier, monaco, monospace, sans-serif;" data-mce-style="font-family: 'courier new', courier, monaco, monospace, sans-serif;">Analysis complete</span></p><p style="margin: 0px;" data-mce-style="margin: 0px;"><br></p><p style="margin: 0px;" data-mce-style="margin: 0px;"><span style="font-family: 'courier new', courier, monaco, monospace, sans-serif;" data-mce-style="font-family: 'courier new', courier, monaco, monospace, sans-serif;">Cluster Summary:</span><br><span style="font-family: 'courier new', courier, monaco, monospace, sans-serif;" data-mce-style="font-family: 'courier new', courier, monaco, monospace, sans-serif;"> Version - 3.4.0.44rhs Nodes - 2/ 4 Bricks - 2/ 4 Volumes - 0/ 1</span></p><p style="margin: 0px;" data-mce-style="margin: 0px;"><span style="font-family: 'courier new', courier, monaco, monospace, sans-serif;" data-mce-style="font-family: 'courier new', courier, monaco, monospace, sans-serif;">&nbsp;</span></p><p style="margin: 0px;" data-mce-style="margin: 0px;"><span style="font-family: 'courier new', courier, monaco, monospace, sans-serif;" data-mce-style="font-family: 'courier new', courier, monaco, monospace, sans-serif;">Volume Summary</span><br><span style="font-family: 'courier new', courier, monaco, monospace, sans-serif;" data-mce-style="font-family: 'courier new', courier, monaco, monospace, sans-serif;"> myvol &nbsp; ONLINE_PARTIAL (2/4 bricks online) - Distributed-Replicate</span><br><span style="font-family: 'courier new', courier, monaco, monospace, sans-serif;" data-mce-style="font-family: 'courier new', courier, monaco, monospace, sans-serif;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Capacity: 32.27 MiB/9.99 GiB (used,total)</span></p><p style="margin: 0px;" data-mce-style="margin: 0px;"><br></p><p style="margin: 0px;" data-mce-style="margin: 0px;"><span style="font-family: 'courier new', courier, monaco, monospace, sans-serif;" data-mce-style="font-family: 'courier new', courier, monaco, monospace, sans-serif;">Status Messages</span><br><span style="font-family: 'courier new', courier, monaco, monospace, sans-serif;" data-mce-style="font-family: 'courier new', courier, monaco, monospace, sans-serif;"> &nbsp;&nbsp;&nbsp;&nbsp;- rhs1-4 is down</span><br><span style="font-family: 'courier new', courier, monaco, monospace, sans-serif;" data-mce-style="font-family: 'courier new', courier, monaco, monospace, sans-serif;"> &nbsp;&nbsp;&nbsp;&nbsp;- rhs1-2 is down</span><br><span style="font-family: 'courier new', courier, monaco, monospace, sans-serif;" data-mce-style="font-family: 'courier new', courier, monaco, monospace, sans-serif;"> &nbsp;&nbsp;&nbsp;&nbsp;- Brick rhs1-4:/gluster/brick1 is down/unavailable</span><br><span style="font-family: 'courier new', courier, monaco, monospace, sans-serif;" data-mce-style="font-family: 'courier new', courier, monaco, monospace, sans-serif;"> &nbsp;&nbsp;&nbsp;&nbsp;- Brick rhs1-2:/gluster/brick1 is down/unavailable</span></p><p style="margin: 0px;" data-mce-style="margin: 0px;"><span style="font-family: 'courier new', courier, monaco, monospace, sans-serif;" data-mce-style="font-family: 'courier new', courier, monaco, monospace, sans-serif;"><br><br></span></p><p style="margin: 0px;" data-mce-style="margin: 0px;">Pretty much all the data for the volume,bricks and nodes, gets mapped into objects within the code so other checks can easily be added for things like</p><p style="margin: 0px;" data-mce-style="margin: 0px;">- filesystem type recommendations - not using XFS, or not using LVM ... make a recommendation</p><p style="margin: 0px;" data-mce-style="margin: 0px;">- check the brick mount options are correct and best practice</p><p style="margin: 0px;" data-mce-style="margin: 0px;">- show volume info in more detail - raw, and usable with a raw vs usable ratio, brick size stats - are they all the same?<br></p><p style="margin: 0px;" data-mce-style="margin: 0px;">- show volume layout (like lsgvt does), illustrating replica set relationships</p><p style="margin: 0px;" data-mce-style="margin: 0px;">- you could add a message based on space usage on the brick (high watermark warning, or overpopulated brick - please run rebalance type stuff)</p><p style="margin: 0px;" data-mce-style="margin: 0px;">etc etc</p><p style="margin: 0px;" data-mce-style="margin: 0px;">- add an option to write the data out in compact form, and then run it at interval through cron to create a log file - the log file could then be picked up by Justin's analytics tool to give volume space usage and component availabilty over time - a bit quick and dirty, I know ;)<br></p><p style="margin: 0px;" data-mce-style="margin: 0px;"><br></p></div><div>At the moment testing consists of vm's on my laptop - so who knows what bugs you may find :)<br></div><div><br></div><div>Any way if it's of interest give it a go.</div><div><br></div><div>Cheers,<br></div><div><br></div><div>Paul C<br></div><div><br></div></div></div></body></html>