Git Product home page Git Product logo

megaclisas-status's People

Contributors

ksonney avatar macmonac avatar npinto avatar omame avatar orteko avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Forkers

macmonac

megaclisas-status's Issues

Script crashes if first VD is not zero.

# python megaclisas-status.py
Traceback (most recent call last):
  File "megaclisas-status.py", line 295, in <module>
    data, good_arrays, bad_arrays, good_disks, bad_disks = get_raid_status()
  File "megaclisas-status.py", line 237, in get_raid_status
    array_details = get_array_info(controller_id, array_id)
  File "megaclisas-status.py", line 144, in get_array_info
    return (_id, raid_type, size, state, in_progress, cachecade_info)
UnboundLocalError: local variable 'raid_type' referenced before assignment

The initial cause is that get_array_info doesn't handle errors. Underlying that is the assumption that the LDs will run sequentially from 0 to ((megacli -LdGetNum -aN) - 1). On my controller the first two LDs were removed so the count runs from 2 to ((megacli -LdGetNum -aN) + 1).

# megacli -LdGetNum -a0

 Number of Virtual Drives Configured on Adapter 0: 11

Exit Code: 0x0b
# megacli -LDInfo -l0 -a0


Adapter 0 -- Virtual Drive Information:
Adapter 0: Virtual Drive 0 Does not Exist.

Exit Code: 0x01
# megacli -LDInfo -Lall -aAll -NoLog|grep 'Virtual Drive:'
Virtual Drive: 2 (Target Id: 2)
Virtual Drive: 3 (Target Id: 3)
Virtual Drive: 4 (Target Id: 4)
Virtual Drive: 5 (Target Id: 5)
Virtual Drive: 6 (Target Id: 6)
Virtual Drive: 7 (Target Id: 7)
Virtual Drive: 8 (Target Id: 8)
Virtual Drive: 9 (Target Id: 9)
Virtual Drive: 10 (Target Id: 10)
Virtual Drive: 11 (Target Id: 11)
Virtual Drive: 12 (Target Id: 12)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.