-
Notifications
You must be signed in to change notification settings - Fork 34
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
Any chance we could get blkdiscard for SSD's? #4
Comments
are you asking for a feature add? or are you suggesting you want to add a feature and send in a pull request? generally speaking, i'm all for improvements and open to making this tool better. how do you envision blkdiscard being used? at what stage? for what purpose? let's discuss... |
Thank you for the reply. I guess a feature add, or maybe a fork? I deal in used hardware and get hundreds of HDD's and SSD's a month. I use the email functionality of your bht for HDD's as a way to catalog and collect serial numbers and model numbers and to collect the smart data, power on hours, and any bad blocks. As an added bonus, it ensures the data is wiped. Would love to have bht (or another similar tool) do all of the same things for me on SSD's, but instead of badblocks, it would run blkdiscard to wipe the data (as badblocks is ineffective, and damaging for SSD's). I took a look at the shell script, but my Linux and shell capabilities are rudimentary at best. |
@lynnuwebnx ok, can you give me an example of how you would run it? and what the command is suppose to do? let's start there... i do agree, badblocks is probably not good for testing SSDs. I would have to find a way to distinguish between HDDs vs SSDs without knowing the model number... any ideas? |
ok, just leaving a comment here as "notes" for myself later... was thinking about this and noticed: smartctl -a /dev/sda | awk '$1=="Rotation" && $2=="Rate:" {print $3,$4,$5}' So, that might serve as a way to distinguish between HDDs vs SSDs in the script. That was only one test on a M.2 drive though, I'll have to make sure it's similar for other SSDs. |
Ideally, I could just run the same command: ' ksh bht --email [email protected] /dev/sd* ', and it would differentiate between SSD's and HDD's, run blkdiscard on the SSD's, run badblocks on the HDD's, and still send me the smart info, serial number, model, etc in an email. If that doesn't work, even having two separate tools, bht and bst(??), with the only difference being bst runs blkdiscard, instead of badblocks. I have separate machines that I use for SSD's and HDD's as it is, so having two separate tools doesn't bother me. Honestly, I really appreciate you taking the time to look into this. |
Just checking in on this? Not meant to rush or pester, just don't want it to fall off my radar. Thanks again! |
@lynnuwebnx sorry, I probably won't get around to this any time soon. it's a busy season for me right now, and I won't have time probably until next year. i do plan to put this for future feature request, but just not soon. |
If you decide to do this, you can cue off of lsblk ROTA (rotational device):
|
Thank you @gdgrosse ! I didn't know that was possible. |
Love this utility and use it regularly for my HDD's. Would it be possible to incorporate running blkdiscard for SSD's?
The text was updated successfully, but these errors were encountered: