Gentoo Archives: gentoo-user

From: Mick <michaelkintzios@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] [OT] Badblocks on my harddisk
Date: Sat, 26 Jul 2014 09:26:38
Message-Id: 201407261025.55867.michaelkintzios@gmail.com
In Reply to: [gentoo-user] [OT] Badblocks on my harddisk by meino.cramer@gmx.de
1 On Saturday 26 Jul 2014 02:49:15 meino.cramer@×××.de wrote:
2 > Hi,
3 >
4 > After running smartctl for an extended offline test I got
5 > a badblock (information extracted from the report):
6 >
7 > SMART Self-test log structure revision number 1
8 > Num Test_Description Status Remaining LifeTime(hours)
9 > LBA_of_first_error # 1 Extended offline Completed: read failure
10 > 90% 14460 4288352511 197 Current_Pending_Sector 0x0032 200
11 > 200 000 Old_age Always - 1
12 >
13 > I found a explanation to map the LBA to a partition here:
14 > http://smartmontools.sourceforge.net/badblockhowto.html
15 >
16 > My partition layout is:
17 > #> sudo fdisk -lu /dev/sda
18 >
19 > Disk /dev/sda: 931.5 GiB, 1000204886016 bytes, 1953525168 sectors
20 > Units: sectors of 1 * 512 = 512 bytes
21 > Sector size (logical/physical): 512 bytes / 512 bytes
22 > I/O size (minimum/optimal): 512 bytes / 512 bytes
23 > Disklabel type: dos
24 > Disk identifier: 0x07ec16a2
25 >
26 > Device Boot Start End Blocks Id System
27 > /dev/sda1 * 2048 104447 51200 83 Linux
28 > /dev/sda2 104448 12687359 6291456 82 Linux swap / Solaris
29 > /dev/sda3 12687360 222402559 104857600 83 Linux
30 > /dev/sda4 222402560 1953525167 865561304 5 Extended
31 > /dev/sda5 222404608 232890367 5242880 83 Linux
32 > /dev/sda6 232892416 442607615 104857600 83 Linux
33 > /dev/sda7 442609664 652324863 104857600 83 Linux
34 > /dev/sda8 652326912 862042111 104857600 83 Linux
35 > /dev/sda9 862044160 1071759359 104857600 83 Linux
36 > /dev/sda10 1071761408 1281476607 104857600 83 Linux
37 > /dev/sda11 1281478656 1491193855 104857600 83 Linux
38 > /dev/sda12 1491195904 1953525167 231164632 83 Linux
39 > 4288352511 <<< The number reported by smartctl
40 >
41 >
42 > Following the linked document...
43 > It seems the bad LBA is not on the checked harddisk.
44 >
45 > Or (more obvious) I did something wrong...
46
47 You are probably comparing different units. The Start and End of fdisk are
48 reporting sectors, each sector being 512 bytes. Therefore if the LBA is
49 reported by smartctl in bytes, you have:
50
51 4,288,352,511 ÷ 512 = 8,375,688.5
52
53 which would place it within your swap partition.
54
55 I would do this:
56
57 swapoff /dev/sda2
58
59 dd if=/dev/zero of=/dev/sda2 bs=512 conv=notrunc
60
61 mkswap -L swap -c /dev/sda2
62
63 swapon /dev/sda2
64
65 and hopefully the problem will be gone when you run the next smartctl test.
66
67 --
68 Regards,
69 Mick

Attachments

File name MIME type
signature.asc application/pgp-signature

Replies