Получение списка серийников HDD подключённых к 3WARE контроллеру

Как получить список дисков подключённых к 3ware контроллеру?
До безобразия просто.

[root@s01-0 ~]# for i in `seq 0 15` ; do tw_cli /c0/p$i show serial; done | sed -e ‘/^$/d’ | awk ‘{print $4}’|sort
9QJ2K5A4
9QJ307QG
9QJ35GE8
9QJ36GDK
9QJ4AHDX
9QJ4DB7C
9QJ4DC4A
9QJ4DF2T
9QJ62GAH
9QJ64WS6
9QJ6RXHD
9QJ6XBJM
9QJ6YB9H
9QJ6YLB6
9QJ715VR
9QJ71V77

А зачем? А чтобы каталогизировать или например проверить на наличие проблемы в прошивке Seagete ES.2 1TB.
Проверить наличие проблем в прошивке дисков Seagate можно здесь

SNo Serial number Result Action
1 9QJ2K5A4 No download available for this serial number. No action required.
2 9QJ4DB7C No download available for this serial number. No action required.
3 9QJ6XBJM No download available for this serial number. No action required.
4 9QJ6YB9H No download available for this serial number. No action required.
5 9QJ35GE8 No download available for this serial number. No action required.
6 9QJ4DF2T No download available for this serial number. No action required.
7 9QJ64WS6 No download available for this serial number. No action required.
8 9QJ6YLB6 No download available for this serial number. No action required.
9 9QJ307QG No download available for this serial number. No action required.
10 9QJ4AHDX No download available for this serial number. No action required.
11 9QJ62GAH No download available for this serial number. No action required.
12 9QJ715VR No download available for this serial number. No action required.
13 9QJ36GDK No download available for this serial number. No action required.
14 9QJ4DC4A No download available for this serial number. No action required.
15 9QJ71V77 No download available for this serial number. No action required.
16 9QJ6RXHD No download available for this serial number. No action required.

[root@s01-0 ~]# for i in `seq 0 15` ; do tw_cli /c0/p$i show firmware; done | sed -e ‘/^$/d’
/c0/p0 Firmware Version = BN06
/c0/p1 Firmware Version = BN06
/c0/p2 Firmware Version = BN06
/c0/p3 Firmware Version = BN06
/c0/p4 Firmware Version = BN06
/c0/p5 Firmware Version = BN06
/c0/p6 Firmware Version = BN06
/c0/p7 Firmware Version = BN06
/c0/p8 Firmware Version = BN06
/c0/p9 Firmware Version = BN06
/c0/p10 Firmware Version = BN06
/c0/p11 Firmware Version = BN06
/c0/p12 Firmware Version = BN06
/c0/p13 Firmware Version = BN06
/c0/p14 Firmware Version = BN06
/c0/p15 Firmware Version = BN06

Получить smart параметры вместе с серийным номером диска.

[root@s01-0 ~]# for i in `seq 0 15` ; do smartctl -A -d 3ware,$i /dev/twa0|grep Reallocated_Sector_Ct; tw_cli /c0/p$i show serial|sed -e ‘/^$/d’; done
5 Reallocated_Sector_Ct 0x0033 100 100 036 Pre-fail Always – 0
/c0/p0 Serial = 9QJ2K5A4
5 Reallocated_Sector_Ct 0x0033 100 100 036 Pre-fail Always – 0
/c0/p1 Serial = 9QJ4DB7C
5 Reallocated_Sector_Ct 0x0033 100 100 036 Pre-fail Always – 0
/c0/p2 Serial = 9QJ64WS6
5 Reallocated_Sector_Ct 0x0033 100 100 036 Pre-fail Always – 0
/c0/p3 Serial = 9QJ715VR
5 Reallocated_Sector_Ct 0x0033 100 100 036 Pre-fail Always – 0
/c0/p4 Serial = 9QJ35GE8
5 Reallocated_Sector_Ct 0x0033 100 100 036 Pre-fail Always – 0
/c0/p5 Serial = 9QJ4DF2T
5 Reallocated_Sector_Ct 0x0033 100 100 036 Pre-fail Always – 5
/c0/p6 Serial = 9QJ6YLB6
5 Reallocated_Sector_Ct 0x0033 100 100 036 Pre-fail Always – 0
/c0/p7 Serial = 9QJ4DC4A
5 Reallocated_Sector_Ct 0x0033 100 100 036 Pre-fail Always – 0
/c0/p8 Serial = 9QJ307QG
5 Reallocated_Sector_Ct 0x0033 100 100 036 Pre-fail Always – 0
/c0/p9 Serial = 9QJ6XBJM
5 Reallocated_Sector_Ct 0x0033 100 100 036 Pre-fail Always – 0
/c0/p10 Serial = 9QJ4AHDX
5 Reallocated_Sector_Ct 0x0033 100 100 036 Pre-fail Always – 0
/c0/p11 Serial = 9QJ71V77
5 Reallocated_Sector_Ct 0x0033 100 100 036 Pre-fail Always – 0
/c0/p12 Serial = 9QJ36GDK
5 Reallocated_Sector_Ct 0x0033 100 100 036 Pre-fail Always – 0
/c0/p13 Serial = 9QJ6YB9H
5 Reallocated_Sector_Ct 0x0033 100 100 036 Pre-fail Always – 0
/c0/p14 Serial = 9QJ62GAH
5 Reallocated_Sector_Ct 0x0033 098 098 036 Pre-fail Always – 46
/c0/p15 Serial = 9QJ6RXHD

Для работы нужно взять утилиты tw_cli с сайта 3ware и smartmontools из репозиториев Linux.

Leave a Reply