Test real and fake disks for bad blocks
Time and Throughput
For a disk with 128GB capacity and an average throughput of 85MB/s, this test takes around 50 minutes. The formula for computing the test duration is t=2*V/B
(i.e., the time in seconds multiplied by the volume in megabytes divided by the average bandwidth in megabytes per second). The factor of 2 is attributable to transferring twice for writing and reading.
This results in a mean bandwidth of B=2*V/t
. The exact size of the data medium can be discovered by lsblk -b /dev/$device
. If you substitute the value into the formula, you can compute the bandwidth in bytes per second.
A buyer can assume a defect or a fake if measuring the data medium reveals a figure of less than a quarter of the "up to" figure stated by the manufacturer, or less than half of the nominal value. However, you do need to use a connection with the maximum speed for the test, for example, a UHS-II reader for a UHS-II memory card.
Happy Ending
Returning to my two 128GB test cards, bad block
reported 122,973,232 defective blocks from a total 131,071,999 blocks (of 1024 bytes each) for the first card – in other words, 94 percent of the blocks are broken. The second card, on the other hand, showed no errors. According to the formula t=2*V/B
, the test duration should be about one hour, which was true of the second card, which passed the line after about 70 minutes. The test of the first card took too long – over five hours.
The test with badblocks
thus exposed the following about the first card: it was a fake with many faults and was incredibly slow. When I confronted the vendor with these hard facts, I convinced him to take back the card and refund the amount paid. The second and intact card, however, works perfectly in combination with a short SD card adapter with a pull tab as the second SSD in my laptop.
Infos
- SD cards/counterfeits: https://en.wikipedia.org/wiki/Secure_Digital#Counterfeits
- USB storage/manipulated controller chips (German only): https://de.wikipedia.org/wiki/USB-Massenspeicher#Manipulierte_Controllerchips
- Identifying fakes: http://linuxwelt.blogspot.de/2014/06/microsd-speicherkarten-falschungen.html
- disktest1.sh: ftp://ftp.linux-magazine.com/pub/listings/linux-magazine.com/201/
« Previous 1 2
Buy Linux Magazine
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters
Support Our Work
Linux Magazine content is made possible with support from readers like you. Please consider contributing when you’ve found an article to be beneficial.
News
-
Plasma 6.3 Ready for Public Beta Testing
Plasma 6.3 will ship with KDE Gear 24.12.1 and KDE Frameworks 6.10, along with some new and exciting features.
-
Budgie 10.10 Scheduled for Q1 2025 with a Surprising Desktop Update
If Budgie is your desktop environment of choice, 2025 is going to be a great year for you.
-
Firefox 134 Offers Improvements for Linux Version
Fans of Linux and Firefox rejoice, as there's a new version available that includes some handy updates.
-
Serpent OS Arrives with a New Alpha Release
After months of silence, Ikey Doherty has released a new alpha for his Serpent OS.
-
HashiCorp Cofounder Unveils Ghostty, a Linux Terminal App
Ghostty is a new Linux terminal app that's fast, feature-rich, and offers a platform-native GUI while remaining cross-platform.
-
Fedora Asahi Remix 41 Available for Apple Silicon
If you have an Apple Silicon Mac and you're hoping to install Fedora, you're in luck because the latest release supports the M1 and M2 chips.
-
Systemd Fixes Bug While Facing New Challenger in GNU Shepherd
The systemd developers have fixed a really nasty bug amid the release of the new GNU Shepherd init system.
-
AlmaLinux 10.0 Beta Released
The AlmaLinux OS Foundation has announced the availability of AlmaLinux 10.0 Beta ("Purple Lion") for all supported devices with significant changes.
-
Gnome 47.2 Now Available
Gnome 47.2 is now available for general use but don't expect much in the way of newness, as this is all about improvements and bug fixes.
-
Latest Cinnamon Desktop Releases with a Bold New Look
Just in time for the holidays, the developer of the Cinnamon desktop has shipped a new release to help spice up your eggnog with new features and a new look.