{"id":13587959,"url":"https://github.com/DncrJim/disktest","last_synced_at":"2025-04-08T02:34:26.471Z","repository":{"id":55148411,"uuid":"298133410","full_name":"DncrJim/disktest","owner":"DncrJim","description":"script for testing incoming sata/sas drives","archived":false,"fork":false,"pushed_at":"2023-07-09T15:23:56.000Z","size":39,"stargazers_count":2,"open_issues_count":6,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-04-02T17:04:59.981Z","etag":null,"topics":["badblocks","bash","hacktoberfest","smartctl","zfs"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/DncrJim.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-09-24T01:05:18.000Z","updated_at":"2024-08-01T16:33:58.460Z","dependencies_parsed_at":"2024-08-01T16:44:08.964Z","dependency_job_id":null,"html_url":"https://github.com/DncrJim/disktest","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DncrJim%2Fdisktest","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DncrJim%2Fdisktest/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DncrJim%2Fdisktest/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DncrJim%2Fdisktest/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DncrJim","download_url":"https://codeload.github.com/DncrJim/disktest/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247765071,"owners_count":20992227,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["badblocks","bash","hacktoberfest","smartctl","zfs"],"created_at":"2024-08-01T15:06:26.611Z","updated_at":"2025-04-08T02:34:26.207Z","avatar_url":"https://github.com/DncrJim.png","language":"Shell","readme":"# disktest\nscript for testing incoming sata/sas disks\n\n## Instructions\n\nmust be run as root\n\n`-y`  Will not prompt before erasing data\\\n\\\n`-a`  all tests, `-slbw` (`z` will be added when complete)\\\n`-s`  short S.M.A.R.T test `smartctl -t short`\\\n`-l`  long S.M.A.R.T test `smartctl -t long`\\\n`-b`  `badblocks` 4 passes of write/read\\\n`-w`  write speed test\\\n`-z`  `.zfs` test (not yet implemented)\\\n\\\n`-u`  unattended mode (not yet implemented)\\\n`-m`  Sends email 0 = no emails, 1 (default) = email status updates, 2 = email full log each time\\\n`-e`  Sets email address, default `root`\\\n`-f`  Formats disk after testing\\\n`-d`  Sets disk `sdxx`\n\nfull command, run all tests, erase data, and format: `sudo /disktest.sh -ayf -d sdxx`\n\n### Dependencies\n  * `smartctl` (smartmontools)\n  * `badblocks` (e2fsprogs)     .only applies to badblocks test\n  * `zfs`                       .only applies to zfs test\n  * `f3`                        .only applies to zfs test\n  * `parted`                    .only applies to zfs test or formatting\n\n### Other Notes\ndesigned for sata/sas disks only, ATA info reporting is not enabled\n\n## Testing Sequence (checks indicate sections with completed programing)\n- [x] smart test - Short\n- [x] smart test - Long\n- [x] badblocks - standard 4 pass r/w\n- [x] test/report disk r/w speed\n- [ ] zfs r/w test under compression\n  - [ ] create single disk zfs pool w/ compression\n  - [ ] run standard single pass r/w test\n  - [ ] destroy zfs pool\n- [ ] run short/long smart test again at end?\n  - [ ] create flag for this?\n\n## Possible Future Development\n- [x] insert time stamps in log\n- [ ] check for dependencies (based on selected flags) before running\n- [ ] update \"**skipping\" and \"**starting\" inserts to make sure they log correctly\n- [x] confirm if r/w speed test is destructive\n  - [ ] optional: add r/w test for when disk is in use?\n- [ ] add confirmation messages at beginning of script\n  - [ ] confirm device name and\n  - [x] if badblocks/zfs is selected, confirm data erasure\n- [ ] set up to run program in background\n- [ ] allow input of a list of multiple disks\n- [ ] flags for automatic enable/disable of individual tests\n  - [ ] -u flag for run in unattended mode (background/disown)\n  - [ ] -z flag for zfs\n- [ ] add test to check for disks reporting fake size (f3?)\n- [ ] have program check for dependencies before running\n","funding_links":[],"categories":["Shell"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FDncrJim%2Fdisktest","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FDncrJim%2Fdisktest","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FDncrJim%2Fdisktest/lists"}