Storcli: Difference between revisions
(13 intermediate revisions by the same user not shown) | |||
Line 8: | Line 8: | ||
=HOWTO= | =HOWTO= | ||
==Virtual Devices== | |||
storcli /c0/v1 set name=myname | |||
note: do not confuse VG with DG | |||
===Create mirror=== | |||
storcli /c0 add vd type=r1 drives=15:8,12 | |||
===Create RAID 10 device=== | |||
storcli64 /c0 add vd type=r10 drives=252:4-7 pdperarray=2 | |||
==Add new/replacement disk== | ==Add new/replacement disk== | ||
Show all should tell you s(Slot), dg, array and row, then: | Show all should tell you s(Slot), dg, array and row, then: | ||
Line 24: | Line 34: | ||
==Drive mappings== | ==Drive mappings== | ||
sg_map -x | sg_map -x | ||
Output: /dev/sgXX <host_number> <bus> <scsi_id> <lun> <scsi_type> | Output: /dev/sgXX <host_number> <bus> <scsi_id> <lun> <scsi_type> <disk> | ||
/dev/sg11 7 0 1 0 0 /dev/sdl | /dev/sg11 7 0 1 0 0 /dev/sdl | ||
<scsi_id> is VD in storcli output, this is not always same as DG :) | <scsi_id> is VD(DID?) in storcli output, this is not always same as DG :) | ||
TODO find out where that '7' comes from | TODO find out where that '7' comes from | ||
==Identify disks== | |||
lsblk -dno name,hctl | |||
# 0:0:24:0 | |||
Third number is the DID from storcli /cX show | |||
==Alarm== | ==Alarm== | ||
Line 50: | Line 69: | ||
===BBU status values=== | ===BBU status values=== | ||
Check [https://github.com/prometheus-community/node-exporter-textfile-collector-scripts/issues/27 here] for more confusion | Check [https://github.com/prometheus-community/node-exporter-textfile-collector-scripts/issues/27 here] for more confusion | ||
*0: OK | *0: OK | ||
*8: charging or not full, unclear | *8: charging or not full, unclear | ||
*16: cachevault? | *16: cachevault? | ||
*32: manual learn requested | *32: manual learn requested | ||
*40: learning? | |||
*112: discharging for learning cycle? | |||
{| class="wikitable" | |||
|+ BBU status values | |||
|- | |||
! Dec !! Binary !! Hex !! Description | |||
|- | |||
| 8 || 1000 || 0x08 || charging? | |||
|- | |||
| 16 || 10000 || 0x10 || discharging? | |||
|- | |||
| 32 || 100000 || 0x20 || Learn Cycle Requested | |||
|- | |||
| 64 || 1000000 || 0x40 || Learn Cycle Active | |||
|- | |||
| 1024 || 10000000000 || 0x400 || Replace battery | |||
|- | |||
| 2024 || 100000000000 || 0x800 || Total failure to communicate with BBU | |||
|- | |||
| 2152 || 100001101000 || 0x868 || ?? | |||
|} | |||
==Get smart status of disk== | ==Get smart status of disk== | ||
/dev/bus/0 -d sat+megaraid,14 | /dev/bus/0 -d sat+megaraid,14 | ||
Where '''14''' is disk ID, not Slot number | Where '''14''' is disk ID (DID), not Slot number | ||
==Set disk to JBOD== | ==Set disk to JBOD== | ||
Line 133: | Line 174: | ||
There migh be a "cachevault"? | There migh be a "cachevault"? | ||
storcli /c0/cv show status | storcli /c0/cv show status | ||
==Error messagess== | |||
===Description = physical disk does not have appropriate attributes=== | |||
Does it happen to show DG as "F"? | |||
try | |||
storcli /c0/fall show | |||
and | |||
storcli /c0/fall delete | |||
Also set to UGood | |||
===Description = operation not possible for current RAID level, Cannot create configuration with 1 span=== | |||
You might want to check for pdperarray | |||
[[Category:Raid]] |
Latest revision as of 09:33, 30 August 2024
Links
HOWTO
Virtual Devices
storcli /c0/v1 set name=myname
note: do not confuse VG with DG
Create mirror
storcli /c0 add vd type=r1 drives=15:8,12
Create RAID 10 device
storcli64 /c0 add vd type=r10 drives=252:4-7 pdperarray=2
Add new/replacement disk
Show all should tell you s(Slot), dg, array and row, then:
storcli /c0/e32/s12 insert dg=0 array=0 row=0 storcli /c0/e32/s12 start rebuild
Locate a disk
storcli /c0/e8/s2 start locate
Show rebuild status
storcli /c0 /eall /sall show rebuild
Drive mappings
sg_map -x
Output: /dev/sgXX <host_number> <bus> <scsi_id> <lun> <scsi_type> <disk>
/dev/sg11 7 0 1 0 0 /dev/sdl
<scsi_id> is VD(DID?) in storcli output, this is not always same as DG :)
TODO find out where that '7' comes from
Identify disks
lsblk -dno name,hctl # 0:0:24:0
Third number is the DID from storcli /cX show
Alarm
Silence alarm
storcli /c0 set alarm=off
BBU
Show time
storcli /c0 show time
Get BBU status
storcli /cx/bbu show all
BBU start learn
storcli /cx/bbu start learn
BBU status values
Check here for more confusion
- 0: OK
- 8: charging or not full, unclear
- 16: cachevault?
- 32: manual learn requested
- 40: learning?
- 112: discharging for learning cycle?
Dec | Binary | Hex | Description |
---|---|---|---|
8 | 1000 | 0x08 | charging? |
16 | 10000 | 0x10 | discharging? |
32 | 100000 | 0x20 | Learn Cycle Requested |
64 | 1000000 | 0x40 | Learn Cycle Active |
1024 | 10000000000 | 0x400 | Replace battery |
2024 | 100000000000 | 0x800 | Total failure to communicate with BBU |
2152 | 100001101000 | 0x868 | ?? |
Get smart status of disk
/dev/bus/0 -d sat+megaraid,14
Where 14 is disk ID (DID), not Slot number
Set disk to JBOD
If disk still in an array, first delete that :) Looks like disks should be in state UGood
storcli /cx[/ex]/sx set jbod
If that fails try:
storcli /c0 set jbod=on
this might/should set all unused drives to jbod
Else look at:
storcli /c0/e9/s0 start erase simple
or if that fails
storcli /c0/e9/s0 start erase
this takes a while, check with
storcli /c0/e9/s0 show erase
FAQ
Failure 255 Operation not allowed.
Disk still in an array?
Output
UGood F
Disk contains foreign config, clear with
storcli /c0/fall del
Virtual Devices
NRWBD
NR=No Read Ahead WB = Write Back D = Direct IO
Cache settings
read ahead
usually on, pointless i reads are very random
write back
Faster, assumes you have BBU
FAQ
List controllers
storcli show all
VD settings with SSD
Set bootable
storcli /c0/e10/s0 set bootdrive= on|off
NO read ahead, write through
storcli /c0 /v2 set wrcache=wt
No read ahead
storcli /c0 /v2 set rdcache=nora
Changing cache settings
storcli /c0 /v1 set wrcache=wt|wb|awb storcli /c0 /v1 set rdcache=ra|nora
ErrMsg: use /cx/cv
There migh be a "cachevault"?
storcli /c0/cv show status
Error messagess
Description = physical disk does not have appropriate attributes
Does it happen to show DG as "F"? try
storcli /c0/fall show
and
storcli /c0/fall delete
Also set to UGood
Description = operation not possible for current RAID level, Cannot create configuration with 1 span
You might want to check for pdperarray