hard reset impacts on ufs file system

Andrew Duane aduane at juniper.net
Mon May 19 11:58:59 UTC 2014


-----Original Message-----
From: owner-freebsd-hackers at freebsd.org [mailto:owner-freebsd-hackers at freebsd.org] On Behalf Of Kurt Lidl
Sent: Sunday, May 18, 2014 1:19 AM
To: freebsd-hackers at freebsd.org
Subject: Re: hard reset impacts on ufs file system

On 5/18/14 1:12 AM, Julian Elischer wrote:
> On 5/16/14, 10:44 PM, Ali Okan YÜKSEL wrote:
>> incident:
>> ==
>> file corruption after hard reset on FreeBSD 8.3
>>
>> details:
>> ==
>> Hard reset examined on freebsd 8.3. after reboot libncurses.so.8 was 0
>> byte. And I couldn't login to system. It gave me error message about
>> /bin/sh - libncurses.so.8 corruption. (libncurses depens /bin/sh I guess)
>> I found the problem by using fixed shell.
>>
>> solution:
>> ==
>> I copied libncurses.so.8 from another system. When I did it problem olved.
> Unfortunattely libraries do seem to be one of the more common
> victims of this sort of thing but I have never worked out how.
> However,as you said, recovery is relatively easy by booting single
> user and specifying /rescue/sh as your shell.
>
> My original guess as to why this seemed to always happen to
> libraries was that the system damaged their entries when
> attempting to update the atime on the files.
>
> Two suggestions:  turn off atimes, make sure any write-cache
> on your harddisk(s) is/are turned off.
>
> -Kurt

Out of curiosity, are you using SSDs, or vanilla hard disks? SSDs have creative new failure modes during shutdown which could account for something like this.

If you are using SSDs, be absolutely sure atimes are turned off, this will kill the write cycles quickly. Also, does the new ATA driver send STANDBY_IMMEDIATE to the drive on shutdown? Our old version of FreeBSD did not, not sure if that's been fixed in the last couple of years.

....................................
Andrew L. Duane
m   +1 603.770.7088
o    +1 408.933.6944 (2-6944)
skype: andrewlduane
aduane at juniper.net





More information about the freebsd-hackers mailing list