1 |
"Caveman Al Toraboran" <toraboracaveman@××××××××××.com>, 21.03.2020, 14:49: |
2 |
|
3 |
> questions: |
4 |
> * what's going on? |
5 |
> * how to find out? |
6 |
|
7 |
"dmesg -T" is your friend. It should show the error messages |
8 |
with their timestamps. |
9 |
|
10 |
> * how to fix? |
11 |
|
12 |
For spinning HDs: |
13 |
|
14 |
If the error messages point towards faulty sectors that can't be |
15 |
written, get a new drive and migrate your data. If the messages |
16 |
don't contain sectors, check and/or replace the cabling. If the |
17 |
problem persists, get a new drive etc... |
18 |
|
19 |
For SSDs: |
20 |
Try to get as much data off the disk as you can without rebooting |
21 |
or power cycling. When these things fail, they tend to fail |
22 |
completely. |
23 |
|
24 |
> symptoms: |
25 |
> * can't write (gives read/write error). |
26 |
> * but files can get created and deleted. |
27 |
> * newly created files, which also have failed writes |
28 |
> have 0 bytes in them. |
29 |
> * mount /dev/sda1 /boot is slow. |
30 |
> * umount /boot is slow. |
31 |
|
32 |
> cave ~ # fsck.vfat -v -a -w /dev/sda1 |
33 |
> fsck.fat 4.1 (2017-01-24) |
34 |
> Checking we can access the last sector of the filesystem |
35 |
> 0x41: Dirty bit is set. Fs was not properly unmounted and some data may be corrupt. |
36 |
> Automatically removing dirty bit. |
37 |
> Boot sector contents: |
38 |
> System ID "mkfs.fat" |
39 |
> Media byte 0xf8 (hard disk) |
40 |
> 512 bytes per logical sector |
41 |
> 4096 bytes per cluster |
42 |
> 32 reserved sectors |
43 |
> First FAT starts at byte 16384 (sector 32) |
44 |
> 2 FATs, 32 bit entries |
45 |
> 565248 bytes per FAT (= 1104 sectors) |
46 |
> Root directory start at cluster 2 (arbitrary size) |
47 |
> Data area starts at byte 1146880 (sector 2240) |
48 |
> 140520 data clusters (575569920 bytes) |
49 |
> 63 sectors/track, 255 heads |
50 |
> 2048 hidden sectors |
51 |
> 1126400 sectors total |
52 |
> Got 4096 bytes instead of 562088 at 16384 |
53 |
|
54 |
If you're lucky and your hard disks supports it, you could try |
55 |
- migrating data to another drive |
56 |
- write to every sector on the drive, as in |
57 |
dd if=/dev/zero of=/dev/sda |
58 |
or with some other non-zero pattern. |
59 |
- hope that the controller catches the errors and marks the faulty |
60 |
blocks as bad so that they are not accessed in the future. |
61 |
- reformat the drive and trust in your luck |
62 |
|
63 |
s. |