The scripts within this project are for useful operations across all supported operating systems for any drive procedures such as Burn-In/Erase processes.
- Warnings
- Getting Started
- Prerequisites
- Setup
- Scripts
- Deployment
- Dependencies
- Notes
- Test Environments
- Contributing
- Support
- Versioning
- Authors
- Copyright
- License
- Acknowledgments
| Executing Burn-In/Erase scripts will destroy data! | ||
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
- Utility-Scripts exist at the same directory path
In order to use the scripts within this package, you will need to clone, or download, the Utility-Scripts repository into the same top-level directory path.
/path/to/Utility-Scripts
/path/to/Drive-Scripts
A script to begin a drive Burn-In for a collection of drives.
The following steps will be performed:
- Start a new TMUX session named “drive_burnin[_{session_suffix}]” (The brackets ([]) indicate the format used if a suffix is provided)
- Pull drive list from passed in values or grab all available SMART drives
- Prompt for the user to confirm, if not ask about each drive
- Setup a TMUX grid layout for all drives being burned in
- Attach to the new TMUX session
- Start the Burn-In process
- End the TMUX session, if chosen, on detach
Usage
[bash] ./burnin_drives.sh [auto_skip] [drives_override] [zero_drives]
[session_suffix] [end_on_detach]
Options
| Option Flag | Description |
|---|---|
| N/A | N/A |
Parameters
| Parameter | Description |
|---|---|
| Automated Skip | Continue without prompting |
| Drives Override | Array of drive IDs to burn-in |
| Zero Drives | Zero the drives after testing has completed |
| Session Suffix | Suffix to add to the session name |
| End On Detach | End process when the TMUX session is detached |
Examples
- ./burnin_drives.sh "/dev/da0 /dev/da1 /dev/da2"
- ./burnin_drives.sh "/dev/da0 /dev/da1 /dev/da2" true
- ./burnin_drives.sh "/dev/da0 /dev/da1 /dev/da2" false "session2"
- ./burnin_drives.sh "/dev/da0 /dev/da1 /dev/da2" false "session2" true
- ./burnin_drives.sh "auto_skip""/dev/da0 /dev/da1 /dev/da2" false "session2" true
Drives Tested
| Status | Component |
|---|---|
| ✅ | WD Red Plus (8TB) |
| ✅ | WD Red Plus (6TB) |
| ✅ | WD Red (6TB) |
| ✅ | WD Red Plus (3TB) |
| ✅ | Kingston 240GB A400 |
A script to begin a drive Burn-In for a single drive.
The following steps will be performed:
- Pull drive info and display it
- Run a SMART conveyance test
- Run a SMART short test
- Run a SMART long test
- Read SMART results and display them
- Run a basic imaging write test
- Read SMART results and display them
- Run a basic imaging read test
- Read SMART results and display them
- HDD/SSD Specific Steps
- HDD
- Run a basic imaging read-write test
- Read SMART results and display them
- Run a destructive BadBlocks test
- Read SMART results and display them
- SSD
- Nothing at this time
- HDD
- Run a SMART conveyance test
- Run a SMART short test
- Run a SMART long test
- Read SMART results and display them
- If desired, zero-out the drive, otherwise write random data across it
- Pull drive info and display it
Usage
[bash] ./burnin_drive.sh [auto_skip] <drive> [zero_drive]
Options
| Option Flag | Description |
|---|---|
| N/A | N/A |
Parameters
| Parameter | Description |
|---|---|
| Automated Skip | Continue without prompting |
| Drive | Drive to test |
| Zero Drive | Zero the drive after testing has completed |
Examples
- ./burnin_drive.sh "/dev/da1"
- ./burnin_drive.sh "/dev/da1" true
- ./burnin_drive.sh "auto_skip" "/dev/da1" true
Drives Tested
| Status | Component |
|---|---|
| ✅ | WD Red Plus (8TB) |
| ✅ | WD Red Plus (6TB) |
| ✅ | WD Red (6TB) |
| ✅ | WD Red Plus (3TB) |
| ✅ | Kingston 240GB A400 |
A script to begin a drive erase for a collection of drives.
The following steps will be performed:
- Start a new TMUX session named “drive_erase[_{session_suffix}]” (The brackets ([]) indicate the format used if a suffix is provided)
- Pull drive list from passed in values or grab all available SMART drives
- Prompt for the user to confirm, if not ask about each drive
- Setup a TMUX grid layout for all drives being erased
- Attach to the new TMUX session
- Start the Erase process
- End the TMUX session, if chosen, on detach
Usage
[bash] ./erase_drives.sh [auto_skip] [drives_override] [session_suffix]
[end_on_detach]
Options
| Option Flag | Description |
|---|---|
| N/A | N/A |
Parameters
| Parameter | Description |
|---|---|
| Automated Skip | Continue without prompting |
| Drives Override | Array of drive IDs to erase |
| Session Suffix | Suffix to add to the session name |
| End On Detach | End process when the TMUX session is detached |
Examples
- ./erase_drives.sh "/dev/da0 /dev/da1 /dev/da2"
- ./erase_drives.sh "/dev/da0 /dev/da1 /dev/da2" "session2"
- ./erase_drives.sh "/dev/da0 /dev/da1 /dev/da2" "session2" true
- ./erase_drives.sh "auto_skip" "/dev/da0 /dev/da1 /dev/da2" "session2" true
Drives Tested
| Status | Component |
|---|---|
| ✅ | WD Red Plus (8TB) |
| ✅ | WD Red Plus (6TB) |
| ✅ | WD Red (6TB) |
| ✅ | WD Red Plus (3TB) |
| ✅ | Kingston 240GB A400 |
A script to begin a drive erase for a single drive.
The following steps will be performed:
- Pull drive info and display it
- HDD/SSD Specific Steps
- HDD
- Run a pass with a RANDOM pattern
- Run a pass with a RANDOM pattern
- Run a pass with a ZERO pattern
- SSD
- Run a pass with a RANDOM pattern
- Run a pass with a RANDOM pattern
- Run a pass with a ZERO pattern
- HDD
- Pull drive info and display it
Usage
[bash] ./erase_drive.sh [auto_skip] <drive>
Options
| Option Flag | Description |
|---|---|
| N/A | N/A |
Parameters
| Parameter | Description |
|---|---|
| Automated Skip | Continue without prompting |
| Drive | Drive to erase |
Examples
- ./erase_drive.sh "/dev/da3"
- ./erase_drive.sh "auto_skip" "/dev/da3"
Drives Tested
| Status | Component |
|---|---|
| ✅ | WD Red Plus (8TB) |
| ✅ | WD Red Plus (6TB) |
| ✅ | WD Red (6TB) |
| ✅ | WD Red Plus (3TB) |
| ✅ | Kingston 240GB A400 |
This section provides additional notes about how to deploy this on a live system.
- Utility-Scripts - A collection of utility scripts.
This project does not contain any additional notes at this time.
| Status | System |
|---|---|
| ✅ | MacOS 11.2.x |
| ✅ | MacOS 11.1.x |
| ✅ | MacOS 11.0.x |
| ✅ | TrueNAS 12.0-U2.1 |
| ✅ | TrueNAS 12.0-U2 |
| ✅ | TrueNAS 12.0-U1.1 |
| ✅ | TrueNAS 12.0-U1 |
| ✅ | TrueNAS 12.0-RELEASE |
| ℹ️ | TrueNAS < 12.0-RELEASE |
| ℹ️ | FreeNAS < TrueNAS 12.0-RELEASE |
| Status | Component |
|---|---|
| ✅ | MacBook Pro (15-inch, 2018) |
Please read CODE_OF_CONDUCT for details on our Code of Conduct and CONTRIBUTING for details on the process for submitting pull requests.
Please read SUPPORT for details on how to request support from the team. For any security concerns, please read SECURITY for our related process.
We use Semantic Versioning for versioning. For available releases, please see the available tags or look through our Release Notes. For extensive documentation of changes between releases, please see the Changelog.
- Jack Thorp - Initial work - jhthorp
See also the list of contributors who participated in this project.
Copyright © 2020 - 2021, Jack Thorp and associated contributors.
This project is licensed under the GNU General Public License - see the LICENSE for details.
- N/A