Kaperstone / mogilefs

Automatically exported from code.google.com/p/mogilefs
0 stars 0 forks source link

mogzoneinfo review request #70

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
mogadm check is great for seeing the overall picture but once you've got more 
than one zone splitting out how much space is available in each becomes an 
issue.

I used the check code as a start for the 'mogzoneinfo' command. It's output is 
similar but splits out the status and statistics (Disk space, etc) per zone 
instead of overall. I also subtracted out the min_free_space value in the 
available space calculation as it impacts the actual space mogilefs will use.

I find it useful - perhaps it can be included with the MogileFS::Network 
package if others do as well (or maybe integrated back into mogadm if everyone 
finds it useful)

Example output:

mogzoneinfo

Checking trackers...
  tracker1.dc1:6001 ... OK
  tracker1.dc1:6001 ... OK
  tracker2.dc2:6001 ... OK
  tracker2.dc2:6001 ... OK

ZONE: dc1
    [ 1] storage1.dc1 ... OK
    [ 2] storage2.dc1 ... OK
    . . .
    [ X] storageX.dc1 ... OK
ZONE: dc2
    [10] storage1.dc2 ... OK
    [11] storage2.dc2 ... OK
    . . .
    [ Y] storageY.dc2 ... OK

ZONE: dc1
      host device         size(G)    used(G)    free(G)   use%   ob state   I/O%
      ---- ------------ ---------- ---------- ---------- ------ ---------- -----
      [ 1] dev1          916.893    826.990     41.075  95.52%  writeable   0.3
      [ 1] dev2          916.893    827.170     40.895  95.54%  writeable   2.0
      . . .
      [ X] devX          916.893    827.011     41.054  95.52%  writeable   0.0
      ---- ------------ ---------- ---------- ---------- ------
                 total: 30000.00   29000.00   1000.00  99.00%

ZONE: dc2
      host device         size(G)    used(G)    free(G)   use%   ob state   I/O%
      ---- ------------ ---------- ---------- ---------- ------ ---------- -----
      [10] dev1          916.893    826.990     41.075  95.52%  writeable   0.3
      [11] dev2          916.893    827.170     40.895  95.54%  writeable   2.0
      . . .
      [ Y] devY          916.893    827.011     41.054  95.52%  writeable   0.0
      ---- ------------ ---------- ---------- ---------- ------
                 total: 30000.00   29000.00   1000.00  99.00%

NOTE: SOME DEVICES SHOW NEGATIVE FREE SPACE AVAILABLE, THIS IS DUE TO THE 
'min_free_space' SETTING
    Current 'min_free_space' value = 48.828125 GB

Original issue reported on code.google.com by jed.dan...@gmail.com on 21 Aug 2012 at 7:16

Attachments: