How to completely clear data from second-hand old hard drives? Quick formatting means no deletion; mechanical and solid-state drives have two wiping methods

After replacing
cousin's four-drive Synology with the new Cool Wolf, I still have two 2TB enterprise drives left: one with 34,000 hours of power, and the other at 39,000 yuan. The next day after listing on Xianyu, someone took a photo. Before shipping, he messaged me: Bro, if I format the drive once and it will be shipped, right? I said, don't do it. Formatting your whole family is like packaging up all your family photos and download history and giving them to a stranger. They can scan the drive with recovery software, and ninety percent of what you deleted can be restored.
I studied this issue last year when dealing with second-hand routers, how terrifying the residual configurations on second-hand devices can be. I wrote a that the ESET report even included the previous owner's remote management password. The hard drive is more straightforward than the router, so the data is blatantly displayed on the platter. So that day, I dragged my cousin along to walk through the proper erasing process for two drives. The cleaning methods for mechanical and solid-state drives are really not the same thing, so in this article, I'll record both the process and the pitfalls.
to clarify: Quick formatting only tears off the table of contents page
first understand what formatting actually does. A single disk is like a thick book—quickly formatted, only tearing out the first few pages of contents, leaving hundreds of chapters and text untouched. When the system saw the table of contents gone, it thought the whole book was empty, and when writing new content, it would simply overwrite it. But as long as the old content hasn't been overwritten by new data, recovery software can read the main text page by page.
Is formatting several times useful? In Windows, you format the same partition ten times, and each time you still tear the directory page, with the main text always there. There is only one truly effective approach: erase every page of the entire book. In other words, it is a complete overwrite.
Mechanical Disk: Writing zero once is enough, don't believe the legend seven times
two enterprise drives, I removed them and plugged them into the SATA port of the study desktop, connecting them directly to the motherboard wipes without the USB port. The order was just one line:
sudo dd if=/dev/zero of=/dev/sdb bs=1M status=progress
of = followed by the drive letter, not the partition. Writing /dev/sdb1 only wipes one partition; writing /dev/sdb only paints from the first sector to the last partition, removing the partition table together. Before pressing Enter, take lsblk and stubbornly identify the drive. Plug in the wrong cable and wipe the wrong disc, and you'll be too sad. I mentioned this lesson in the about not recognizing the disc in NAS: lsblk determines the number based on capacity and model.
2T drive, SATA direct connection tested one drive for 3 hours and 10 minutes, and the other for 3 hours and 40 minutes. On an enterprise drive at 7200 RPM, the outer ring can write over 200MB/s, and the inner ring drops to just over 100, so that's the average level. If zero isn't random enough, you can write the random number shred -v -n 1 /dev/sdb, which takes about the same time and looks more impressive. My cousin asked if I should write it several more times, and I checked for him: the SP 800-88 guide from the US National Institute of Standards and Technology clearly states that a single full overwrite of a modern hard drive counts as Clear-level clear, but multiple overwrites "do not provide additional guarantees." The widely circulated 7-pass and 35-pass Gutmann solutions are legacies of the old MFM hard drive era in the last century. With the recording density of modern drives, overwrite residues simply cannot be read using known technologies. Write it once, that's enough.
a quick note: if you want to confirm this project is fine before selling, you can use badblocks to write zeros and read back to verify it all at once. the new release inspection article have complete parameters, but the downside is it's twice as slow—2TB takes about ten hours, so selling second-hand is generally unnecessary.
solid-state drive, the opposite: writing zero damages and can't be cleaned clean
I finished wiping my cousin's mechanical drive, I happened to have a previously discontinued 240G SSD in my drawer, so I casually pulled it out for comparison. This is the most common mistake: never write zero in DD on an SSD, for two reasons.
First, it can't be cleaned clean. There's a translation layer in the SSD controller. If you have it write sector 10,000, it decides which physical block it actually writes. To balance wear and tear, it often moves the socket, leaving some reserved space on the drive that you can't even see. If you write the 240G zero from the outside, there will still be some untouched corners at the physical block level, and overwriting this action is naturally unreliable for solid-state drives.
second, wasting your lifespan for nothing. Each block only has hundreds or thousands of write times, so to sell the market, you write the entire disk capacity once. What's the point?
the correct solution for solid-state drives is to let the controller handle it themselves, that is, TRIM:
sudo blkdiscard /dev/sdb
also run while uninstalled, and it returns in seconds. After TRIM, the controller will mark these blocks as invalid. Consumer-grade SSDs can basically wipe the data within minutes to hours, and conventional methods can't recover it. Here's a real pitfall: the first time, I plugged the SSD into the USB hard drive enclosure to wipe it, and blkdiscard gave an error. Many USB bridge chips fail to transmit TRIM commands, leaving nothing for the sake of it. SSDs either connect directly to the motherboard via SATA or use official tools from various brands for Security Erase. Kingston and Samsung both have their own free software, so it's just a matter of clicking. USB hard drive enclosures are ; they're slow to wipe mechanical drives, but really not for SSDs.
The
drive is still plugged into the NAS, so if you can avoid taking it apart, you might as well
if the disk is still in service, first think about one thing: wiping the disk is the final step, and you have to move the data out first. My cousin's data from those two discs was already moved away when he switched to the new Cool Wolf. I've written about the process for disk swapping, so just follow it. After clearing the data, the rest is to get to work.
cousin's Synology is actually the most convenient. The DSM 7's memory manager has ready-made buttons: go to Storage Manager, click HDD/SSD, select the drive you want to process, and the action menu has "Secure Erase." The premise is that the storage pool must be deleted first, and the button will only light up when it is in the unallocated state. Double-click the graphical interface, wait for it to finish, and this feature is to adjust the hard drive's own ATA Secure Erase command for you.
My Feiniu doesn't have this button, so I just use SSH. First, turn on SSH, log in to lsblk to recognize the disk, confirm that the drive is not mounted and not in any storage pool, then use the same blkdiscard or dd line to serve. The position of the SSH switch and login posture are detailed in the SSH section. One more nag: typing the drive number on a NAS is easier to slip by hand than on a computer, the system drive is plugged right next to it, typing one wrong letter, and reinstalling the system is a copy of the reinstall record I .
selling the whole machine second-hand, there are three more steps than selling a single unit
some people sell the whole device, including the NAS and the drive. Besides cleaning the plate clean, there are three more things to do. First, restore factory settings to restore the machine to a brand new state; Second, unbind the device from your account. Synology needs to remove the machine from your Synology account and QuickConnect, and also unbind the FN ID on Feiniu's side. Otherwise, buyers might bump into your account when binding, causing disputes; Third, the sticker has the serial number. Before sending the photo to the buyer, consider whether it's necessary. The warranty for the device follows the serial number, so there's no need to hide it.
actually the most worry-free way is to remove the disc and sell the body separately, allowing buyers to assemble the discs themselves. What you have on the disc has nothing to do with the machine. In the end, my cousin ended up with the body and disc separated, and the body ended up being sold first.
from the perspective of retiring the house, you should clean it up too
thinking about this in reverse makes it clearer: when you buy a second-hand listing and the seller says it's "formatted," does that make you feel uncomfortable? Their photos, work documents, and download records are all lying on the drive. I first do a full inspection when I receive a second-hand listing. The inspection itself is a zero, so when I get it, I wipe it again. This is the buyer's self-protection.
seller's self-protection is to wipe it before making a sale. If the drive isn't too old and the capacity is decent, you can choose not to sell it. use it as a cold backup archive drive it's a more cost-effective place than exchanging money on Xianyu. If you really want to make a move, follow the order below:
| type of disc | wiping method | time consumption, reference | thoroughness |
| mechanical drive (direct SATA) | dd writing a zero | 2T takes about 3 and a half hours, which is | enough, official Clear level |
| Mechanical drive (USB box) | same as above, but | 2T about 5 hours | enough to |
| SSD (direct SATA) | blkdiscard TRIM | a few seconds to a few minutes | enough to |
| a solid-state drive (USB case) | not enough, Switching to direct connection or vendor tool | — | USB bridge may not be able to transmit the |
| NAS disk | Synology points for safe erasure. Feiniu SSH Command | types of market observation | same as above |
The
order is just a few steps: first transfer the data to the new drive, then erase it. The mechanical drive is set to zero SSD TRIM, the whole machine is unbound in one more step, and finally, on the Xianyu detail page, write "All drives have been erased, only blank drives included," which sells better than posting ten speed charts. After following the instructions, my cousin sold the two-piece plate the next day. The buyer received it and gave a positive review, saying the seller was professional.
