SwarmShawarma's Blog
Tools - check the storage devices - SD card, USB stick, other drives.
Published 12/26/24 by SwarmShawarma [0 Comments]

Check your storage device.

SD cards and USB stick can be dodgy: the storage capacity is smaller than advertised, storage space is corrupted, write/read speeds are off - or all of those.

The problem with them is, one can find out they storage is shit while using it. This lead to the lost data, confusion about a cause of the malfunctioning equipment, time spent to backup and recover a dodgy storage, plenty of the lost time.

Tools to check the storage:



**Using this tool will destroy the data on any storage you will run it on - this is common to run the command on wrong storage and even destroy operating system**



Windows:

https://h2testw.org/ - tool is called h2testw. It exists for ages and is a standard for the job.


Linux:

https://fight-flash-fraud.readthedocs.io/en/latest...

Time required for full test with f3write/f3read commands is very approx, 2h for each 100GB - based on average write/read speed of 20MB/s. It would be the most convenient to run it on a device that can stay 'on', all the time.

To install: For Debian, Ubuntu, Linux Mint, Elementary OS users, f3 is available in software repository. Simply execute the command below:

sudo apt install f3

Arch Linux, Manjaro, Apricity OS users can install f3 from AUR repository with Yaourt package manager.

yaourt f3

Fedora-based distros:

sudo dnf install f3



0. Mistake to identify correct drive in this step can destroy the data of your operating system or other storage's data

- remove the tested storage from a USB port [or a SD slot etc]

- start a command line terminal

- type in and run: lsblk

- attach tested storage to USB port

- type in and run: lsblk

lsblk

The connected storage will be the one missing on the first lsblk run. Anything like sda, sdb, sdc.... - are the whole devices. sda1, sda2; sdb1, sdb2 - is a partition within the device.

To confirm also make sure the SIZE matches advertised SIZE of the tested device. There can be a small difference because the marketing people are dicks.

After formatting it should have only one partition - like on the picture above >>> sdb1

For a full test - sdb1 - location description will be required. Later on sdb1 will be replaced with question marks - that will need to be replaced with an appropriate location description on your own device.

1. Format the storage to fat32 - now or before step 0

2. start command line terminal

3.

sudo mkdir /mnt/sdtest


- it will ask for a password on the sudo command

4.

sudo mount /dev/????? /mnt/sdtest

5.

sudo f3write /mnt/sdtest

- go for a hike

6. When it has finished

sudo f3read /mnt/sdtest

In this stage program reads data written in the previous stage and checks does it conform to the expected pattern.

this means the drive has no problems - this have to be seen throughout.

There also will be report displayed at the end of the job. Take screenshot for a reference.

7. More information available on the program's website.


Tip SwarmShawarma for their post.
Login to comment...

About SwarmShawarma's Blog
We will be bringing you all updates here on this blog!

Latest Posts