-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathexclusions
32 lines (26 loc) · 1.31 KB
/
exclusions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/bin/bash
#######################################################
# Is this device on an exclusion list?
# 2023-04-03-01
# (c) 2019-2023 @doron - CC BY-SA 4.0
IsExcluded () {
## return 1 #***** Temporary placeholder ****
local DEV=${1#'/dev/'}
local MODEL=$(cat /sys/block/$DEV/device/model | Trim)
local REV=$(cat /sys/block/$DEV/device/rev | Trim)
local VENDOR=$(cat /sys/block/$DEV/device/vendor | Trim)
local CTRLID=$(GetCtrlID $DEV) # PCI ID
# This is the exception list. If it becomes larger - should improve search
## [[ "$MODEL" =~ ^ST[0-9]+NM[0-9]+3$ ]] || # Constellation ES.3
## [[ "$VENDOR" == "SEAGATE" ]] ||
[[ "$MODEL" =~ ^HUC[0-9]+CSS600$ ]] || # Hitachi HUCnnnnCSS600
[[ "$MODEL" =~ X422_[A-Z0-9]{5}600A10 ]] || # Netapp rebrands of the Hitachi
[[ "${MODEL}:${REV}" =~ MB8000JFECQ:HPD[4-7] ]] || # HPE MB8000JFECQ
[[ "${MODEL}:${REV}" =~ MBF2300RC:DA07 ]] || # Toshiba MBF2300RC (20201223)
[[ "$CTRLID" == "1000:0087:1590:0042" ]] || # HPE H221 (9207-8e) (20210217)
[[ "$CTRLID" == "9005:8076:15d9:1600" ]] || # SM/Adaptec (20210326) (hattip @half)
[[ "$CTRLID" == "103c:323b:103c:3351" ]] || # HP Smart Array P420 (thanks @SliMat)
[[ "${MODEL}" =~ MG06SCA ]] || # Toshiba MG06 (20230403)
false # End the || chain
}
#######################################################