On Sunday 27 Jul 2014 17:50:49 meino.cramer@gmx.de wrote: > I executed the mkswap/dd combo a several times today. Since I have > no logs I repeated again. Here are the results: > > solfire:/home/user>mkswap -L swap -f -c /dev/sda2 > 1 bad page > mkswap: /dev/sda2: warning: wiping old swap signature. > Setting up swapspace version 1, size = 6291448 KiB > LABEL=swap, UUID=e742c0a6-862c-41e9-be4b-698b33c5a236 > solfire:/home/user>dd if=/dev/zero of=/dev/sda2 bs=512 conv=notrunc > dd: error writing ‘/dev/sda2’: Input/output error > 1669369+0 records in > 1669368+0 records out > 854716416 bytes (855 MB) copied, 28.4799 s, 30.0 MB/s > [1] 24047 exit 1 dd if=/dev/zero of=/dev/sda2 bs=512 conv=notrunc > solfire:/home/user> Ahh! This is a different result to what you showed previously, unless you chopped off the output last time. It now shows that it was able to write: 1669368 x 512 = 854,716,416 bytes out of a total sda2 partition size of 6.29 GiB. > I am a little anxious about the hdparm command... > For me it is unclear what sector is meant: > > smartclt says: > Num Test_Description Status Remaining LifeTime(hours) > LBA_of_first_error # 1 Selective offline Completed: read failure > 90% 14500 4288352511 > > From a previous posting I learned that "LBA" in this case is the byte > counter. > > The sector is therefore 4288352511/512=8375688 OK, let's not confuse ourselves: LBA counting starts from zero. Therefore, if you subtract the start of the sda2 partition it becomes: 4288352511 - 104448 = 4288248063 / 512 = 8,375,484.5 bytes, within the sda2 partition. Unless my maths failed me above, I can't say I understand why dd bailed out after writing 854,716,416 bytes, but smartctl failed earlier than that reading just 8,375,484.5 bytes. Perhaps dd can write further, than what smartctl can read without error, because these are two different mechanisms - but I am guessing wildly. :-) Someone more knowledgeable should chime in here. PS. I'm copying you in just in case this is lost in your Inbox - I had to resend it because I used the wrong From address by mistake and I suspect it never made it to the list. -- Regards, Mick