Comment by easygenes

4 days ago

So say I have a 4TB USB SSD from a few years ago, that's been sitting unpowered in a drawer most of that time. How long would it need to be powered on (ballpark) for the full disk refresh to complete? Assume fully idle.

(As a note: I do have a 4TB USB SSD which did sit in a drawer without being touched for a couple of years. The data was all fine when I plugged it back in. Of course, this was a new drive with very low write cycles and stored climate controlled. Older worn out drive would probably have been an issue.) Just wondering how long I should keep it plugged in if I ever have a situation like that so I can "reset the fade clock" per se.

More certain to just do a full read of the drive to force error correction and updating of any weakening data.

  • noob question... how do i force a full read?

    • 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.

      1 reply →