News for hackers. Stuff that matters.
Re:The unpowered SSDs in your drawer are slowly losing your ... by geokon on Tuesday November 25, 2025 @01:37AM (#46042954)
noob question... how do i force a full read?
Re:The unpowered SSDs in your drawer are slowly losing your ... by homebrewer on Tuesday November 25, 2025 @01:48AM (#46043016)
the most basic solution that will work for every filesystem and every type of block device without even mounting anything, but won't actually check much except device-level checksums:

  sudo pv -X /dev/sda
or even just:

  sudo cat /dev/sda >/dev/null
and it's pretty inefficient if the device doesn't actually have much data, because it also reads (and discards) empty space.

for copy-on-write filesystems that store checksums along with the data, you can request proper integrity checks and also get the nicely formatted report about how well that went.

for btrfs:

  sudo btrfs scrub start -B /
or zfs:

  sudo zpool scrub -a -w
for classic (non-copy-on-write) filesystems that mostly consist of empty space I sometimes do this:

  sudo tar -cf - / | cat >/dev/null
the `cat` and redirection to /dev/null is necessary because GNU tar contains an optimization that doesn't actually read anything when it detects /dev/null as the target.
Re:The unpowered SSDs in your drawer are slowly losing your ... by medoc on Tuesday November 25, 2025 @02:30AM (#46043238)
Just as a note, and I checked that it's not the case with the GNU coreutils: on some systems, cp (and maybe cat) would mmap() the source file. When the output is the devnull driver, no read occurs because of course its write function does nothing... So, using a pipe (or dd) maybe a good idea in all cases (I did not check the current BSDs).
Re:The unpowered SSDs in your drawer are slowly losing your ... by fainpul on Tuesday November 25, 2025 @01:47AM (#46043009)
On macOS / Linux you can use `dd` to "copy" everything from /dev/yourssd to /dev/null. Just be careful not to do it the other way!

https://www.man7.org/linux/man-pages/man1/dd.1.html

I have no idea if forcing a read is good / the right way. I'm just answering how to do it.

Re:The unpowered SSDs in your drawer are slowly losing your ... by justincormack on Tuesday November 25, 2025 @06:21AM (#46044759)
/dev/null is "empty" if you read it, its /dev/zero you dont want to dd onto your disk.
Re:The unpowered SSDs in your drawer are slowly losing your ... by easygenes on Tuesday November 25, 2025 @06:42AM (#46044864)
This is the most straightforward reliable option:

> sudo dd if=/dev/sdX of=/dev/null bs=4M status=progress iflag=direct

Re:The unpowered SSDs in your drawer are slowly losing your ... by tensility on Tuesday November 25, 2025 @10:55AM (#46047029)
This.