"Caveman Al Toraboran" <toraboracave...@protonmail.com>, 21.03.2020, 14:49:

> questions:
>  * what's going on?
>  * how to find out?

"dmesg -T" is your friend. It should show the error messages
with their timestamps.

>  * how to fix?

For spinning HDs:

If the error messages point towards faulty sectors that can't be
written, get a new drive and migrate your data. If the messages
don't contain sectors, check and/or replace the cabling. If the
problem persists, get a new drive etc...

For SSDs:
Try to get as much data off the disk as you can without rebooting
or power cycling. When these things fail, they tend to fail
completely.

> symptoms:
>  * can't write (gives read/write error).
>  * but files can get created and deleted.
>  * newly created files, which also have failed writes
>    have 0 bytes in them.
>  * mount /dev/sda1 /boot is slow.
>  * umount /boot is slow.

> cave ~ # fsck.vfat -v -a -w /dev/sda1
> fsck.fat 4.1 (2017-01-24)
> Checking we can access the last sector of the filesystem
> 0x41: Dirty bit is set. Fs was not properly unmounted and some data may be 
> corrupt.
>  Automatically removing dirty bit.
> Boot sector contents:
> System ID "mkfs.fat"
> Media byte 0xf8 (hard disk)
>        512 bytes per logical sector
>       4096 bytes per cluster
>         32 reserved sectors
> First FAT starts at byte 16384 (sector 32)
>          2 FATs, 32 bit entries
>     565248 bytes per FAT (= 1104 sectors)
> Root directory start at cluster 2 (arbitrary size)
> Data area starts at byte 1146880 (sector 2240)
>     140520 data clusters (575569920 bytes)
> 63 sectors/track, 255 heads
>       2048 hidden sectors
>    1126400 sectors total
> Got 4096 bytes instead of 562088 at 16384

If you're lucky and your hard disks supports it, you could try
- migrating data to another drive
- write to every sector on the drive, as in
        dd if=/dev/zero of=/dev/sda
  or with some other non-zero pattern.
- hope that the controller catches the errors and marks the faulty
  blocks as bad so that they are not accessed in the future.
- reformat the drive and trust in your luck

s.


Reply via email to