Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for hdparm based drive wipe #167

Merged

Conversation

mmlb
Copy link
Member

@mmlb mmlb commented Jul 8, 2024

What does this PR do

Similar to what we're doing for NVME devices, this command supports
Sanitizing and Erasing and decides which function and parameters to use
depending on the capabilities reported by the drive.

Sanitize is preferred over erase. Cryptographic scramble is preferred of
block erase within Sanitize.

I reused the nvme sanitize/erase type since utils is all one big package
anyway to avoid confusion. If we ever split each utility into its own
package (as I want) then we'll just create a more specific type for
hdparm.

@mmlb mmlb force-pushed the crypto-scramble-based-wipes-for-sed-drives branch 3 times, most recently from 3079cb4 to ef4f73c Compare July 8, 2024 16:17
Similar to what we're doing for NVME devices, this command supports
Sanitizing and Erasing and decides which function and parameters to use
depending on the capabilities reported by the drive.

Sanitize is preferred over erase. Cryptographic scramble is preferred of
block erase within Sanitize.

I reused the nvme sanitize/erase type since utils is all one big package
anyway to avoid confusion. If we ever split each utility into its own
package (as I want) then we'll just create a more specific type for
hdparm.
@mmlb mmlb force-pushed the crypto-scramble-based-wipes-for-sed-drives branch from 341bc2e to b39e610 Compare July 8, 2024 16:52
@mmlb mmlb force-pushed the crypto-scramble-based-wipes-for-sed-drives branch from 6273469 to 42f0690 Compare July 8, 2024 17:24
examples/diskwipe/main.go Show resolved Hide resolved
utils/hdparm.go Show resolved Hide resolved
utils/hdparm.go Show resolved Hide resolved
utils/hdparm.go Show resolved Hide resolved
utils/hdparm.go Show resolved Hide resolved
@mmlb mmlb requested a review from joelrebel July 9, 2024 11:37
@mmlb mmlb enabled auto-merge July 9, 2024 12:42
@mmlb mmlb merged commit ececddd into metal-toolbox:main Jul 9, 2024
5 checks passed
@mmlb mmlb deleted the crypto-scramble-based-wipes-for-sed-drives branch July 9, 2024 12:58
mmlb referenced this pull request in metal-toolbox/vogelkop Jul 9, 2024
)

[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
|
[github.com/metal-toolbox/ironlib](https://github.com/metal-toolbox/ironlib)
| `v0.3.0` -> `v0.4.0` |
[![age](https://developer.mend.io/api/mc/badges/age/go/github.com%2fmetal-toolbox%2fironlib/v0.4.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/go/github.com%2fmetal-toolbox%2fironlib/v0.4.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/go/github.com%2fmetal-toolbox%2fironlib/v0.3.0/v0.4.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/go/github.com%2fmetal-toolbox%2fironlib/v0.3.0/v0.4.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>metal-toolbox/ironlib
(github.com/metal-toolbox/ironlib)</summary>

###
[`v0.4.0`](https://github.com/metal-toolbox/ironlib/releases/tag/v0.4.0)

[Compare
Source](https://github.com/metal-toolbox/ironlib/compare/v0.3.0...v0.4.0)

#### What's Changed

- Update module golang.org/x/net to v0.26.0 by
[@&#8203;renovate](https://github.com/renovate) in
[https://github.com/metal-toolbox/ironlib/pull/162](https://github.com/metal-toolbox/ironlib/pull/162)
- Update module github.com/beevik/etree to v1.4.0 by
[@&#8203;renovate](https://github.com/renovate) in
[https://github.com/metal-toolbox/ironlib/pull/155](https://github.com/metal-toolbox/ironlib/pull/155)
- Update anchore/sbom-action action to v0.16.0 by
[@&#8203;renovate](https://github.com/renovate) in
[https://github.com/metal-toolbox/ironlib/pull/156](https://github.com/metal-toolbox/ironlib/pull/156)
- Update docker/build-push-action action to v6 by
[@&#8203;renovate](https://github.com/renovate) in
[https://github.com/metal-toolbox/ironlib/pull/164](https://github.com/metal-toolbox/ironlib/pull/164)
- Add support for hdparm based drive wipe by
[@&#8203;mmlb](https://github.com/mmlb) in
[https://github.com/metal-toolbox/ironlib/pull/167](https://github.com/metal-toolbox/ironlib/pull/167)
- Change Info log messages by [@&#8203;mmlb](https://github.com/mmlb)
in
[https://github.com/metal-toolbox/ironlib/pull/169](https://github.com/metal-toolbox/ironlib/pull/169)

**Full Changelog**:
metal-toolbox/ironlib@v0.3.0...v0.4.0

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/metal-toolbox/vogelkop).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy40MjUuMSIsInVwZGF0ZWRJblZlciI6IjM3LjQyNS4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants