Spearfoot / disk-burnin-and-testing

Shell script for burn-in and testing of new or re-purposed drives
Other
835 stars 102 forks source link

Running the script returns "Please specify device type with the -d option." for 8 TB WD WD80EZAZ-11TDBA0 (in WD My Book) #2

Closed bcmryan closed 4 years ago

bcmryan commented 4 years ago

Hi, thank you so much for writing this little script! There were a few issues I had with running it on a new 8 TB WD WD80EZAZ-11TDBA0 in a My Book external hard drive enclosure.

First and foremost, running the script without any modification returned "Please specify device type with the -d option." After a bit of Googling, I found a post from 2014 on https://bugs.freedesktop.org/show_bug.cgi?id=79379 that led to me the solution: adding -d sat after every instance of smartctl in the code. It was quick and dirty, but it worked. I don't think that this can be directly implemented into the script because it may cause breakage for others, but I did want to post it somewhere where others can find it if they run into the same issue as I did. This looks to be a problem with smartctl not automatically recognizing the connector.

I also have some other suggestions for the readme file. Since root privileges were required when I ran the script, it might be useful to let people know that they can run the script in a single line on the terminal as sudo bash ./disk-burnin.sh sdX. Secondly, since the user does need to set the Dry_Run variable to 0, it might also be helpful to bold the line "The script is distributed with 'dry runs' enabled, so you will need to edit the Dry_Run variable, setting it to 0, in order to actually perform tests on drives." or potentially even have that echoed whenever a user tries to run the script. (I'm not an IT guy or programmer by trade, so I know that modifying scripts is something that might trip newcomers up.)

Thanks for your help with writing this script and making it available to others!

Spearfoot commented 4 years ago

Thanks for your comments!

You bring up some good points. I've modified the text to account for your observations about sudo and the Dry_Run setting.

With respect to the '-d' option, I'll have to compromise and mention that some users -- in particular those, like you, who use MyBook enclosures -- may need to edit the script to nail down the '-d' option setting for their particular environment.

emopinata commented 4 years ago

I actually ran into this issue this week while testing a batch of new Seagate Exos 8TB drives and an older Seagate NAS 6TB, all of which are standard internal drives. I'm using Proxmox 6.1 (so Debian Buster), with the drives in a NetApp DS4246 connected to an LSI 9207-8e. The smartctl version is the latest 7.1.

Once these drives are done testing (cause I need them in prod ASAP), I'm going to try and look at what can be done to make this easier in the script.