Hello, Thank you all for your answers.
First I would like to understand better what's happening. According to what I read, there are no block in the disk itself, they refer to the word sector. Then, the OS, here OpenBSD format it with a block size. So from a physical point of view I have faulty sectors on my disk right ? I bought this disk about a year ago. And ok, I write in a few files (~1000 rrd files) every minute all year long. I'm surprise that you guys ask me to throw the disk away because a few blocks out of thousands are faulty. Smartmontools doesn't complain about my disk # smartctl -H /dev/wd1c === START OF READ SMART DATA SECTION === SMART overall-health self-assessment test result: PASSED # smartctl -l selftest /dev/wd1c === START OF READ SMART DATA SECTION === SMART Self-test log structure revision number 1 Num Test_Description Status Remaining LifeTime(hours) LBA_of_first_error # 1 Short offline Interrupted (host reset) 90% 25468 - Josh do you know which program I should use in sleuthkit suite ? I'm very interested in knowing which files I've lost And do you know which badblocks option I should use to follow your suggestion ? At the end I will follow your recomendations and buy a new disk for my data. But I'll keep this one for a test server and of course I'll put a red sticker on the disk and write "faulty disk" PS: Lee your mail server is rejecting my mails "Access denied (in reply to MAIL FROM command)" >________________________________ > De : Josh Grosse <j...@jggimi.homeip.net> >À : "misc@openbsd.org" <misc@openbsd.org> >Envoyé le : Dimanche 18 août 2013 3h26 >Objet : Re: How to mark a block as invalid ? > > >On Sat, Aug 17, 2013 at 10:51:36PM +0100, Mik J wrote: >> Hello, >> >> In my message log file I have >> /bsd: wd1g: uncorrectable data error >> reading fsbn 27690576 of 27690560-27690591 (wd1 bn 1951859792; cn 121497 tn >> 166 sn 29), retrying >> >> I used the badblocks utility an checked the whole disk >> and only this block number is faulty. >> I tried to override it with zeros but no >> luck, impossible. >> >> Since I believe my disk is ok, I would like it to avoid >> realocating the block number 27690576. How can I do it ? > >The OS reported that it failed to read the bad block -- therefore, the block is >allocated -- to a file, directory, socket, or fifo. As the data within the block >is now lost, the only recovery is from backup. I don't believe the OS has any >built-in tools that can determine ownership from a block number. > > The error could also have been produced if you or another admin just > happened to be reading blocks outside of filesystem control, such as using > dd(1) with if=/dev/... in that case, the block might be unallocated. > >I haven't used it in some time, but if I recall correctly, sysutils/sleuthkit >may be helpful in identifying block ownership. > >The badblocks program from sysutils/e2fsprogs can be helpful in forcing a drive >to reallocate the LBA from its set of spare blocks. The data will be lost, but >the "bad block" LBA will become "good" again.