Gentoo Archives: gentoo-user

From: Mick <michaelkintzios@×××××.com>
To: gentoo-user@l.g.o
Cc: meino.cramer@×××.de
Subject: Re: [gentoo-user] Contradictionary behaviour of SMART on hds ?!?
Date: Tue, 29 Jul 2014 10:28:09
Message-Id: 201407291127.50651.michaelkintzios@gmail.com
In Reply to: Re: [gentoo-user] Contradictionary behaviour of SMART on hds ?!? by meino.cramer@gmx.de
1 On Sunday 27 Jul 2014 17:50:49 meino.cramer@×××.de wrote:
2
3 > I executed the mkswap/dd combo a several times today. Since I have
4 > no logs I repeated again. Here are the results:
5 >
6 > solfire:/home/user>mkswap -L swap -f -c /dev/sda2
7 > 1 bad page
8 > mkswap: /dev/sda2: warning: wiping old swap signature.
9 > Setting up swapspace version 1, size = 6291448 KiB
10 > LABEL=swap, UUID=e742c0a6-862c-41e9-be4b-698b33c5a236
11 > solfire:/home/user>dd if=/dev/zero of=/dev/sda2 bs=512 conv=notrunc
12 > dd: error writing ‘/dev/sda2’: Input/output error
13 > 1669369+0 records in
14 > 1669368+0 records out
15 > 854716416 bytes (855 MB) copied, 28.4799 s, 30.0 MB/s
16 > [1] 24047 exit 1 dd if=/dev/zero of=/dev/sda2 bs=512 conv=notrunc
17 > solfire:/home/user>
18
19 Ahh! This is a different result to what you showed previously, unless you
20 chopped off the output last time. It now shows that it was able to write:
21
22 1669368 x 512 = 854,716,416 bytes
23
24 out of a total sda2 partition size of 6.29 GiB.
25
26 > I am a little anxious about the hdparm command...
27 > For me it is unclear what sector is meant:
28 >
29 > smartclt says:
30 > Num Test_Description Status Remaining LifeTime(hours)
31 > LBA_of_first_error # 1 Selective offline Completed: read failure
32 > 90% 14500 4288352511
33 >
34 > From a previous posting I learned that "LBA" in this case is the byte
35 > counter.
36 >
37 > The sector is therefore 4288352511/512=8375688
38
39 OK, let's not confuse ourselves: LBA counting starts from zero.
40
41 Therefore, if you subtract the start of the sda2 partition it becomes:
42
43 4288352511 - 104448 = 4288248063 / 512 = 8,375,484.5 bytes, within the sda2
44 partition.
45
46 Unless my maths failed me above, I can't say I understand why dd bailed out
47 after writing 854,716,416 bytes, but smartctl failed earlier than that reading
48 just 8,375,484.5 bytes. Perhaps dd can write further, than what smartctl can
49 read without error, because these are two different mechanisms - but I am
50 guessing wildly. :-)
51
52 Someone more knowledgeable should chime in here.
53
54 PS. I'm copying you in just in case this is lost in your Inbox - I had to
55 resend it because I used the wrong From address by mistake and I suspect it
56 never made it to the list.
57 --
58 Regards,
59 Mick

Attachments

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