HP Tools per il controller SAS [SSACLI]
venerdì, 19 Ottobre 2018
Crea un file hp.list in /etc/apt/sources.list.d contenente
deb http://downloads.linux.hpe.com/SDR/repo/mcp stretch/current non-free
Importa le chiavi:
curl http://downloads.linux.hpe.com/SDR/hpPublicKey1024.pub | apt-key add - curl http://downloads.linux.hpe.com/SDR/hpPublicKey2048.pub | apt-key add - curl http://downloads.linux.hpe.com/SDR/hpPublicKey2048_key1.pub | apt-key add - curl http://downloads.linux.hpe.com/SDR/hpePublicKey2048_key1.pub | apt-key add -
Aggiorna i repository:
apt-get update apt dist-upgrade
Installa i pacchetti del controller:
apt install ssacli ssaducli amsd hponcfg
Licenze SMARTCACHE
HPE Manual
ssacli ctrl slot=0 lk all show ssacli ctrl slot=0 add lk=3MXBB-P2ZCC-ML82H-PB8CS-ZXXXX
HPE Smart Array P408i-a SR Gen10 in Slot 0 (Embedded)
licensekey 3MXBB-P2ZCC-ML82H-PB8CS-ZLZNR (OK)
Attivare rc.local Rc.local in Debian stretch
Inserire in rc.local:
echo 655360 > /proc/sys/vm/min_free_kbytes echo 0 > /proc/sys/kernel/hung_task_timeout_secs echo 1 > /proc/sys/vm/swappiness echo 50 > /proc/sys/vm/vfs_cache_pressure echo 1 > /proc/sys/kernel/dmesg_restrict ssacli controller slot=0 modify cacheratio=70/30 ssacli controller slot=0 modify dwc=enable HBA=( sda sdb ) for DISK in "${HBA[@]}" do echo noop > /sys/block/$DISK/queue/scheduler echo 1024 > /sys/block/$DISK/queue/nr_requests echo 1024 > /sys/block/$DISK/queue/read_ahead_kb sdparm --set WCE=1 /dev/$DISK 2>/dev/null done
Inserire in .bashrc:
ssacli ctrl all show status ssacli ctrl slot=0 pd all show status ssacli ctrl slot=0 ld all show
In cron.hourly:
#!/bin/bash # Check for HP Smart Array Controller ssacli ctrl all show config | grep "Smart Array" &>/dev/null # If Smart Array Controller exists continue with script if not exit script if [ $? -eq 0 ]; then # Check HP Smart Array disk status for string "OK" ssacli ctrl slot=0 pd all show status | grep physicaldrive | grep -vi "OK" &>/dev/null # If all disks do not report "OK" then continue with script otherwise exit. if [ $? -eq 1 ]; then exit 0 else # Display hostname, HP serial number, disks and RAID configuration of disks # that failed ALERT="ALERT-$(date +%Y%m%d-%H%M%S)" echo "Hostname: $(hostname)" > /root/$ALERT echo "HP Serial Number: $(dmidecode -t 1 | grep "Serial" | awk '{print $3}')" >> /root/$ALERT echo "----------------------------------------------------------------------------" >> /root/$ALERT ssacli ctrl all show config >> /root/$ALERT cat /root/$ALERT | mail -s "$(hostname)-$ALERT" <..> -c<..> ssacli ctrl slot=0 pd all show detail >> /root/$ALERT exit 1 fi else echo "HP Smart Array Card not installed" exit 0 fi
andrea
- Pubblicato il Sistemistica, Tips & Tricks
Non ci sono commenti