BASH   278
050 raid status
Guest on 9th March 2023 12:26:46 AM


  1. #!/bin/sh
  2.  
  3. PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin
  4.  
  5. echo ''
  6. echo RAID Controller, Array and Drive status:
  7. echo ''
  8.  
  9. cd /var/tmp
  10.  
  11. hpacucli controller slot=0 show status 2>/dev/null | sed -n '/^Smart/,$p'
  12. hpacucli controller slot=0 array all show status 2>/dev/null | grep array
  13. hpacucli controller slot=0 physicaldrive all show status 2>/dev/null | grep physicaldrive
  14.  
  15. for d in 0 1 2 3
  16. do
  17.   echo ''
  18.   echo -n "SMART status for drive $d: "
  19.   smartctl -H -l selftest -d cciss,$d /dev/ciss0 | sed -n '4,$p'
  20. done

Raw Paste

Login or Register to edit or fork this paste. It's free.