💾 Archived View for bbs.geminispace.org › s › homelab › 2631 captured on 2024-06-16 at 16:12:16. Gemini links have been rewritten to link to archived content
⬅️ Previous capture (2024-05-26)
-=-=-=-=-=-=-
Looking in the electronics trash at my company, I found a nice 4 TB hdd. Unfortunately, the drive was in the trash for a reason, the SMART report indicated some errors. When I ran the `badblocks` command, a dozen of bad blocks were found, all lumped toogether at the end of the drive.
I still want to use the drive, if only for data I won't be too sad to loose. How should I process? Can I make partition around the block? Is there a way to tell the filesystem not to use those blocks? What should I do to make the most use of that beat-up drive?
2023-07-01 · 1 year ago
🧩 ERnsTL · 2023-07-01 at 17:08:
Yes, there is a parameter to the mkfs.ext4 command for handing over a list of bad blocks (the result output of the badblocks command). Then these disk sectors/blocks wont be used.
Assuming of course that the situation remains stable (number and position of bad blocks) this would be a solution.
Suggest to run a badblock scan via cron regularly and compare with the previous badblocks output, sending alarm mail in case of new blocks discovered.
🐦 Arkaeriit [OP] · 2023-07-01 at 18:35:
@ErnsTL Thank you very much for this answer. I am glad to learn that I can let the file system handle this issue.
🧩 ERnsTL · 2023-07-01 at 21:17:
Glat to be of help - wish you all the best in making use of that disk