mirror of
https://github.com/Spearfoot/disk-burnin-and-testing.git
synced 2025-12-15 15:53:16 +00:00
fix markdownlint issues in README.md
This commit is contained in:
30
README.md
30
README.md
@@ -1,8 +1,11 @@
|
|||||||
# Shell script for burn-in and testing of drives
|
# Shell script for burn-in and testing of drives
|
||||||
|
|
||||||
## Purpose
|
## Purpose
|
||||||
|
|
||||||
`disk-burnin.sh` is a POSIX-compliant shell script I wrote to simplify the process of burning-in disks. It is intended for use only on disks which do not contain data, such as new disks or disks which are being tested or re-purposed. I was inspired by the ["How To: Hard Drive Burn-In Testing"](https://forums.freenas.org/index.php?threads/how-to-hard-drive-burn-in-testing.21451/) thread on the FreeNAS forum and I want to give full props to the good folks who contributed to that thread.
|
`disk-burnin.sh` is a POSIX-compliant shell script I wrote to simplify the process of burning-in disks. It is intended for use only on disks which do not contain data, such as new disks or disks which are being tested or re-purposed. I was inspired by the ["How To: Hard Drive Burn-In Testing"](https://forums.freenas.org/index.php?threads/how-to-hard-drive-burn-in-testing.21451/) thread on the FreeNAS forum and I want to give full props to the good folks who contributed to that thread.
|
||||||
|
|
||||||
## Warnings
|
## Warnings
|
||||||
|
|
||||||
Be warned that:
|
Be warned that:
|
||||||
|
|
||||||
* This script runs the `badblocks` program in destructive mode, which erases any data on the disk. Therefore, please be careful! __Do not run this script on disks containing data you value!__
|
* This script runs the `badblocks` program in destructive mode, which erases any data on the disk. Therefore, please be careful! __Do not run this script on disks containing data you value!__
|
||||||
@@ -10,11 +13,12 @@ Be warned that:
|
|||||||
* Must be run as 'root', so either log on using the root account or use the `sudo` command, for example: `sudo ./disk_burnin.sh sda`
|
* Must be run as 'root', so either log on using the root account or use the `sudo` command, for example: `sudo ./disk_burnin.sh sda`
|
||||||
|
|
||||||
## Tests
|
## Tests
|
||||||
|
|
||||||
Performs these steps:
|
Performs these steps:
|
||||||
|
|
||||||
1. Run SMART short test
|
1. Run SMART short test
|
||||||
1. Run `badblocks`
|
2. Run `badblocks`
|
||||||
1. Run SMART extended test
|
3. Run SMART extended test
|
||||||
|
|
||||||
The script calls `sleep` after starting each SMART test, using a duration based on the polling interval reported by the disk, after which it polls for test completion.
|
The script calls `sleep` after starting each SMART test, using a duration based on the polling interval reported by the disk, after which it polls for test completion.
|
||||||
|
|
||||||
@@ -34,13 +38,15 @@ These indicate possible problems with the drive. You therefore may wish to abort
|
|||||||
The script extracts the drive model and serial number and creates a log filename of the form `burnin-[model]_[serial number].log`.
|
The script extracts the drive model and serial number and creates a log filename of the form `burnin-[model]_[serial number].log`.
|
||||||
|
|
||||||
## `badblocks` Options
|
## `badblocks` Options
|
||||||
|
|
||||||
`badblocks` is invoked with the following options:
|
`badblocks` is invoked with the following options:
|
||||||
- `-b 4096` : Use a block size of 4096
|
|
||||||
- `-e 1` : Abort the test if an error is found (remove this option for full testing of drives)
|
* `-b 4096` : Use a block size of 4096
|
||||||
- `-v` : Verbose mode
|
* `-e 1` : Abort the test if an error is found (remove this option for full testing of drives)
|
||||||
- `-o` : Write list of bad blocks found (if any) to a file named `burnin-[model]_[serial number].bb`
|
* `-v` : Verbose mode
|
||||||
- `-s` : Show progress
|
* `-o` : Write list of bad blocks found (if any) to a file named `burnin-[model]_[serial number].bb`
|
||||||
- `-w` : Write-mode test, writes four patterns (0xaa, 0x55, 0x44, 0x00) on every disk block
|
* `-s` : Show progress
|
||||||
|
* `-w` : Write-mode test, writes four patterns (0xaa, 0x55, 0x44, 0x00) on every disk block
|
||||||
|
|
||||||
The only required command-line argument is the device specifier, e.g.:
|
The only required command-line argument is the device specifier, e.g.:
|
||||||
|
|
||||||
@@ -71,6 +77,7 @@ Also note that `badblocks` may issue the following warning under FreeBSD/FreeNAS
|
|||||||
## Operating System Compatibility
|
## Operating System Compatibility
|
||||||
|
|
||||||
Tested under:
|
Tested under:
|
||||||
|
|
||||||
* FreeNAS 9.10.2-U1 (FreeBSD 10.3-STABLE)
|
* FreeNAS 9.10.2-U1 (FreeBSD 10.3-STABLE)
|
||||||
* FreeNAS 11.1-U7 (FreeBSD 11.1-STABLE)
|
* FreeNAS 11.1-U7 (FreeBSD 11.1-STABLE)
|
||||||
* FreeNAS 11.2-U8 (FreeBSD 11.2-STABLE)
|
* FreeNAS 11.2-U8 (FreeBSD 11.2-STABLE)
|
||||||
@@ -80,16 +87,19 @@ Tested under:
|
|||||||
## Drive Models Tested
|
## Drive Models Tested
|
||||||
|
|
||||||
The script should run successfully on any SATA disk with SMART capabilities, which includes just about all modern drives. It has been tested on these particular devices:
|
The script should run successfully on any SATA disk with SMART capabilities, which includes just about all modern drives. It has been tested on these particular devices:
|
||||||
|
|
||||||
* HGST Deskstar NAS, UltraStar, UltraStar He10, and UltraStar He12 models
|
* HGST Deskstar NAS, UltraStar, UltraStar He10, and UltraStar He12 models
|
||||||
* Western Digital Gold, Black, and Re models
|
* Western Digital Gold, Black, and Re models
|
||||||
|
|
||||||
## Prerequisites
|
## Prerequisites
|
||||||
Requires the smartmontools, available at https://www.smartmontools.org
|
|
||||||
|
Requires the smartmontools, available at [www.smartmontools.org](https://www.smartmontools.org)
|
||||||
|
|
||||||
Uses: `grep`, `pcregrep`, `awk`, `sed`, `tr`, `sleep`, `badblocks`
|
Uses: `grep`, `pcregrep`, `awk`, `sed`, `tr`, `sleep`, `badblocks`
|
||||||
|
|
||||||
Tested with the static analysis tool at https://www.shellcheck.net to insure that the code is POSIX-compliant and free of issues.
|
Tested with the static analysis tool at [www.shellcheck.net](https://www.shellcheck.net) to insure that the code is POSIX-compliant and free of issues.
|
||||||
|
|
||||||
## Author
|
## Author
|
||||||
|
|
||||||
Written by Keith Nash, March 2017.
|
Written by Keith Nash, March 2017.
|
||||||
Modified on 19 August 2020.
|
Modified on 19 August 2020.
|
||||||
|
|||||||
Reference in New Issue
Block a user