hdm scan
[5000A72030097FE9]
Device Type = SCSI Device
Device Path = /dev/sdd
UID = 5000A72030097FE9
Alias = @scsi0
Vendor Name = STEC
Model Name = Z16IZF2E-2TBUCZ
hdm manage-firmware --load --activate --file E4Z1.G4-SK04-72R35-YN-v4.0.4.RC11-b1975 --path /dev/sdd
Results for manage-firmware: Operation succeeded.
./sdmcmd64 scanLocal
Results for ScanLocal
operationResult = Success
devices.count = 7
devices[0] = other:Drive0
devices[1] = gen4sas:Drive6
devices[2] = gen4sas:Drive5
devices[3] = gen4sas:Drive4
devices[4] = gen4sas:Drive3
devices[5] = other:Drive2
devices[6] = other:Drive1
./sdmcmd64 ClearSmartAlerts target=gen4sas:Drive3
Results for ClearSmartAlerts
operationResult = Success
target = gen4sas:Drive3
time ./sdmcmd64 Format target=gen4sas:Drive3 sectorSize=512 difLevel=None
Results for Format
operationResult = Success
target = gen4sas:Drive3
real 1m42.699s
user 0m0.000s
sys 0m0.005s
time ./sdmcmd64 Format target=gen4sas:Drive3 sectorSize=512 difLevel=None
Results for Format
operationResult = Success
target = gen4sas:Drive3
real 0m4.739s
user 0m0.003s
sys 0m0.002s
./sdmcmd64 GetDriveSize target=gen4sas:Drive3
Results for GetDriveSize
operationResult = Success
target = gen4sas:Drive3
hostBlocks = 3907029168
userBlocks = 6821 0x1aa5
Really great work @jap! Thanks for sharing.hello,
good news comig - i have a working recipe howto repair drives and therefore fix the mentioned speed degradation.
1) you need to download some files from Index of /public/hgst_2tb/util
2) update drive firmware (maybe not necessary, but wise) - scan is needed, without scan hdm can't update firmware
- E4Z1.G4-SK04-72R35-YN-v4.0.4.RC11-b1975 - newest firmware
- hdm-core_3.4.0-8.ga_amd64.deb - utility for loading firmware
- sdmcmd64.2.0.0.124.tar.gz - utility for STEC drives
- smartmontools-6.0-stec.tar.gz - modified smartmontools which can read extended STEC info
3) use sdmcdm64 utility and scan for available drivesCode:hdm scan [5000A72030097FE9] Device Type = SCSI Device Device Path = /dev/sdd UID = 5000A72030097FE9 Alias = @scsi0 Vendor Name = STEC Model Name = Z16IZF2E-2TBUCZ hdm manage-firmware --load --activate --file E4Z1.G4-SK04-72R35-YN-v4.0.4.RC11-b1975 --path /dev/sdd Results for manage-firmware: Operation succeeded.
4) use sdmcdm64 utilty to clear SMART errorCode:./sdmcmd64 scanLocal Results for ScanLocal operationResult = Success devices.count = 7 devices[0] = other:Drive0 devices[1] = gen4sas:Drive6 devices[2] = gen4sas:Drive5 devices[3] = gen4sas:Drive4 devices[4] = gen4sas:Drive3 devices[5] = other:Drive2 devices[6] = other:Drive1
5) use sdmcdm64 utility to format the drive. it's needed to do format twice - after first format the drive reports zero size (0 sectors capacity),Code:./sdmcmd64 ClearSmartAlerts target=gen4sas:Drive3 Results for ClearSmartAlerts operationResult = Success target = gen4sas:Drive3
but after second format everything will be ok and drive gets his 2TB capacity back.
6) check the formatted drive, it should look like followingCode:time ./sdmcmd64 Format target=gen4sas:Drive3 sectorSize=512 difLevel=None Results for Format operationResult = Success target = gen4sas:Drive3 real 1m42.699s user 0m0.000s sys 0m0.005s time ./sdmcmd64 Format target=gen4sas:Drive3 sectorSize=512 difLevel=None Results for Format operationResult = Success target = gen4sas:Drive3 real 0m4.739s user 0m0.003s sys 0m0.002s
Now the drive is back in good state, no speed probles, no errors.Code:./sdmcmd64 GetDriveSize target=gen4sas:Drive3 Results for GetDriveSize operationResult = Success target = gen4sas:Drive3 hostBlocks = 3907029168 userBlocks = 6821 0x1aa5
That's all. So easy it is
Jan
#!/usr/bin/python
# 2010302 jan@panoch.com
# scan all connected STEC drives
# with sdmcmd utility
import re
import subprocess
from pprint import pprint
def SysCmdLines (cmd):
"""Do system command and return lines"""
p = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
return p.stdout.readlines()
#
# main
#
hosts = []
for line in SysCmdLines("./sdmcmd64 ScanLocal"):
line = line.rstrip()
if "devices[" in line:
# print "line=[%s]" % line
m = re.search(r" = (\S+)$", line)
if m and not "other:" in m.group(1):
host = m.group(1)
hosts.append(host)
# print "found host=[%s]" % (host)
# pprint(hosts)
serials = {}
for host in hosts:
# print "host="+host
for line in SysCmdLines("./sdmcmd64 GetInfo target="+host):
line = line.rstrip()
if " = " in line:
# print "line=[%s]" % line
m = re.search(r"serialNumber = '(\S+)", line)
if m:
sn = m.group(1)
serials[host] = sn
# collect info
infofname = sn+".txt"
diagfname = sn+".bin"
info = ''
info += "".join(SysCmdLines("./sdmcmd64 GetInfo target="+host))
info += "".join(SysCmdLines("./sdmcmd64 GetState target="+host))
info += "".join(SysCmdLines("./sdmcmd64 GetStatistics level=SinceMade target="+host))
info += "".join(SysCmdLines("echo 'diagnosticType=Type1';./sdmcmd64 RunDiagnostic diagnosticType=Type1 target="+host))
info += "".join(SysCmdLines("echo 'diagnosticType=Type2';./sdmcmd64 RunDiagnostic diagnosticType=Type2 target="+host))
info += "".join(SysCmdLines("echo 'diagnosticType=Type3';./sdmcmd64 RunDiagnostic diagnosticType=Type3 target="+host))
info += "".join(SysCmdLines("echo 'diagnosticType=Type4';./sdmcmd64 RunDiagnostic diagnosticType=Type4 target="+host))
info += "".join(SysCmdLines("echo 'diagnosticType=Type5';./sdmcmd64 RunDiagnostic diagnosticType=Type5 target="+host))
info += "".join(SysCmdLines("./sdmcmd64 TestUnit target="+host))
info += "".join(SysCmdLines("./sdmcmd64 CaptureFieldData target="+host+" filename="+diagfname))
# write info to file
with open(infofname,"w") as text_file:
text_file.write(info)
print "found host=[%s] serial=[%s] - info_file=[%s] diag_file=[%s]" % (host,sn,infofname,diagfname)
#!/usr/bin/python
# 2010302 jan@panoch.com
# scan all connected STEC drives
# with sdmcmd utility
import re
import subprocess
from pprint import pprint
def SysCmdLines (cmd):
"""Do system command and return lines"""
p = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
return p.stdout.readlines()
#
# main
#
hosts = []
for line in SysCmdLines("./smartctl-stec --scan"):
line = line.rstrip()
if "/dev/" in line:
# print "line=[%s]" % line
m = re.search(r"^(/dev/\S+) ", line)
if m:
host = m.group(1)
hosts.append(host)
# print "found host=[%s]" % (host)
# pprint(hosts)
# quit()
serials = {}
slog = ''
for host in hosts:
# print "host="+host
sinfo = ''
maxtemp = mintemp = mmin = mmax = maxspent = 0
stec = False
for line in SysCmdLines("./smartctl-stec -a "+host):
sinfo += line
line = line.rstrip()
if True or ":" in line:
# print "line=[%s]" % line
m = re.search(r"Serial Number:\s+(\S+)", line, re.IGNORECASE)
if m:
sn = m.group(1)
serials[host] = sn
m = re.search(r"^Max Temp\s+(\S+)", line, re.IGNORECASE)
if m:
maxtemp = m.group(1)
m = re.search(r"^Min Temp\s+(\S+)", line, re.IGNORECASE)
if m:
mintemp = m.group(1)
m = re.search(r"Power-On Hour when Maximum Temperature Occurred (\S+)", line, re.IGNORECASE)
if m:
hmax = int(m.group(1))/60
m = re.search(r"Power-On Hour when Minimum Temperature Occurred (\S+)", line, re.IGNORECASE)
if m:
hmin = int(m.group(1))/60
m = re.search(r"Total spent Time Over Ref (\S+)", line, re.IGNORECASE)
if m:
hmaxspent = int(m.group(1))/60
m = re.search(r"Vendor:\s+STEC", line, re.IGNORECASE)
if m:
stec = True
# collect info
# print "sn="+sn
sinfofname = "smartctl-"+sn+".txt"
if stec:
print "sn="+sn+" maxtemp="+maxtemp+" mintemp="+mintemp+" hmax="+str(hmax)+" hmin="+str(hmin)+" hmaxspent="+str(hmaxspent)
slog += "sn="+sn+" maxtemp="+maxtemp+" mintemp="+mintemp+" hmax="+str(hmax)+" hmin="+str(hmin)+" hmaxspent="+str(hmaxspent)+"\n"
# write sinfo to file
with open(sinfofname,"w") as text_file:
text_file.write(sinfo)
#quit()
# write slog to file
with open('scan_stec_ssd_smartctl.log',"a") as text_file:
text_file.write(slog)
it worksReally great work @jap! Thanks for sharing.
Hope this really works!
Verstuurd vanaf mijn ONEPLUS A5000 met Tapatalk
ceph osd df
ID CLASS WEIGHT REWEIGHT SIZE USE AVAIL %USE VAR PGS
6 hdd 0.40929 1.00000 419G 112G 306G 26.78 0.98 61
7 hdd 0.40929 1.00000 419G 112G 307G 26.73 0.98 60
8 hdd 0.40929 1.00000 419G 105G 313G 25.24 0.92 57
9 hdd 0.40929 1.00000 419G 143G 275G 34.30 1.25 78
10 ssd2 1.81929 1.00000 1862G 533G 1329G 28.64 1.05 128
12 ssd2 1.81929 1.00000 1862G 533G 1329G 28.62 1.05 128
0 ssd 0.36378 1.00000 372G 39504M 333G 10.36 0.38 256
2 hdd 0.40929 1.00000 419G 119G 299G 28.53 1.04 65
3 hdd 0.40929 1.00000 419G 108G 310G 25.80 0.94 58
4 hdd 0.40929 1.00000 419G 109G 309G 26.17 0.96 59
5 hdd 0.40929 1.00000 419G 136G 282G 32.56 1.19 74
13 ssd2 1.81929 1.00000 1862G 603G 1259G 32.39 1.18 145
14 ssd2 1.81929 1.00000 1862G 464G 1398G 24.92 0.91 111
1 ssd 0.36378 1.00000 372G 39505M 333G 10.36 0.38 256
TOTAL 11549G 3158G 8390G 27.35
MIN/MAX VAR: 0.38/1.25 STDDEV: 7.06
After repair the speed is ok, i registere no speed problem or slowness.How's the speed now?
I see the python scripts on your site, however I get a 403 denied when I try to download them. I've copied them from here, but thought you might want to know.hello,
i wrote a couple of small utilities in python to scan information from STEC drives - just for myself to save time and to do a easy automation.
maybe the utilities can be usefull for others too:
Index of /public/hgst_2tb/util
1) scan_stec_ssd_sdmcmd.py - scan all STEC drives in system and save info from each drive (in file named by drive's serial number)
2) scan_stec_ssd_smartctl.py - scan all STEC drives in system and save info from each drive (in file named by drive's serial number)
Bye
Jan
Thank you, i fixed the mentioned problem. Try to look once more to the link. The problem was, that the server tried to execute those scripts instead of just serve them as source code..I see the python scripts on your site, however I get a 403 denied when I try to download them. I've copied them from here, but thought you might want to know.
Thanks for your hard work on this!
First: thanks for you great job here!
- i tested till now first 2 drives and it looks like the max temperature was 82 and 84 grad celsius
it works
Code:ceph osd df ID CLASS WEIGHT REWEIGHT SIZE USE AVAIL %USE VAR PGS 6 hdd 0.40929 1.00000 419G 112G 306G 26.78 0.98 61 7 hdd 0.40929 1.00000 419G 112G 307G 26.73 0.98 60 8 hdd 0.40929 1.00000 419G 105G 313G 25.24 0.92 57 9 hdd 0.40929 1.00000 419G 143G 275G 34.30 1.25 78 10 ssd2 1.81929 1.00000 1862G 533G 1329G 28.64 1.05 128 12 ssd2 1.81929 1.00000 1862G 533G 1329G 28.62 1.05 128 0 ssd 0.36378 1.00000 372G 39504M 333G 10.36 0.38 256 2 hdd 0.40929 1.00000 419G 119G 299G 28.53 1.04 65 3 hdd 0.40929 1.00000 419G 108G 310G 25.80 0.94 58 4 hdd 0.40929 1.00000 419G 109G 309G 26.17 0.96 59 5 hdd 0.40929 1.00000 419G 136G 282G 32.56 1.19 74 13 ssd2 1.81929 1.00000 1862G 603G 1259G 32.39 1.18 145 14 ssd2 1.81929 1.00000 1862G 464G 1398G 24.92 0.91 111 1 ssd 0.36378 1.00000 372G 39505M 333G 10.36 0.38 256 TOTAL 11549G 3158G 8390G 27.35 MIN/MAX VAR: 0.38/1.25 STDDEV: 7.06
what model of SAS controller have you used to update firmware?hello,
good news coming - i have a working recipe howto repair drives and therefore fix the mentioned speed degradation.
Jan
You don't belive the spec sheets postet in this thread?How reliable are these drives? Depending on the applications that were using these drives, they could be very "worn off" before they have been retired. Can you check how many bytes were written and lifetime left on these SSDs?
Thank you for your recommendations!hello,
good news coming - i have a working recipe howto repair drives and therefore fix the mentioned speed degradation.
....
Now the drive is back in good state, no speed probles, no errors.
That's all. So easy it is
Even if it now looks easy and simple, the way to this recipe was relativeluy long and time consuming..
Jan