0

I'm running Debian 9 (Stretch), and recently I began to notice that on startup, my root filesystem / (mounted on a USB-attached SSD) began to show up as corrupted:

[    4.511127] sd 0:0:0:0: [sda] Attached SCSI disk
[    4.535277] EXT4-fs (sda2): INFO: recovery required on readonly filesystem
[    4.540566] EXT4-fs (sda2): write access will be enabled during recovery
[    4.624232] EXT4-fs (sda2): recovery complete
[    4.630271] EXT4-fs (sda2): mounted filesystem with ordered data mode. Opts: (null)

Sometimes I'd get away with a fine system, but some days I have to plug my disk into another computer and run fsck on it, as while I'm doing something the whole thing crashes and gives me input/output error -- no doubt because of the corrupted filesystem. It seems to get corrupted sometime after shutdown and before booting, or maybe during the shutdown or booting processes.

I don't like having to run fsck all the time, so is there a way to see what's going on? I shutdown my machine properly with shutdown now.

2 Answers 2

1

The USB enclosure you are using for your SSD is likely the fault. My advice would be to remove the SSD from that enclosure and test it directly connected through a SATA port to see if the issues persist.

1

I figured out how to prevent corruption from happening again:

After I shutdown now, and wait for the process to finish, the power to the USB drive goes off (for a couple seconds), and if I unplug my computer before the USB power comes back on again, there's no corruption. For some reason, USB power comes back on again (after a couple seconds) and if I wait until that happens (the USB power coming back on) to unplug my computer, the SSD gets corrupted.

1
  • Most PCs nowadays have power running to USB ports while the PC is "off". I don't know if any signalling is happening, if anything in the BIOS or elsewhere is intentionally writing to it, but the USB stick was probably not tested for being permanently plugged in with trickle charge. Jan 17, 2020 at 22:26

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .