Subject: filesystem issues after rude powerdown
To: None <netbsd-users@netbsd.org>
From: Brian <bmcewen@comcast.net>
List: netbsd-users
Date: 08/02/2004 21:07:44
So, for a second time a power outage ran down my UPS and the Qube had 
its power terminated rudely.

This happened once before, and I had to run fsck_ffs manually from 
console on  /dev/rwd0g (/tmp) to get the Qube to boot.  It found and 
cleared  a couple errors that I didn't note, a handful of sectors that 
couldn't be read, salvaged the free blk counts and summary info and 
"bit maps" and marked the filesystem clean.

This is Michigan!  and we have t-storms, and I don't really want to go 
thru this every time there's a power outage that lasts long enough to 
drain my UPS battery.  The daemons running are sshd, postfix, plus 
occasionally icecast and ices.  Since /tmp is getting trashed, I'm 
assuming it's something related to icecast temp files but I can't prove 
that.  I'd power cycled it rudely occasionally months ago without 
icecast running with no problems noticed, but I do try not to do that.

- can I set anything to run at a cold boot that would help automate 
this cleanup process?

-I have a few disk sectors that cannot be read (uncorrectable data 
error, anyway)- 756-768 inclusive.  These are the same ones as last 
time. I guess they really are bad- but then why are they not 
permanently mapped out after the last fsck_ffs cleared up issues?  Or 
did they get mapped out, but the bad reset trashed the table?   I'm not 
sure how the BSD FS handles this stuff; I have in the past dealt with 
failing drives by mapping out bad sectors by hand every week, or 
parking a big file exactly on the bad spot and then leaving it alone :) 
but that was MFM media era... what's the big picture in how stuff like 
this gets handled with NetBSD (1.6.1 Cobalt if it matters)?  This is a 
rather new, large HD- I rather want it to be in good shape.

-since its just /tmp can I (re)format that partition and get these 
blocks mapped out permanently?  Other solutions?  I'm a bit lost on why 
it finds errors, marks the partition "clean", refuses to touch the 
partition again since it's "clean", but then they pop up again after a 
poor shutdown.


Along those lines:

I'm in need of a reference for BSD that's not going to lead me too 
astray re: NetBSD.  I've got a linux reference but enough is different 
that some things that I want to do, don't work out quite right.  I'm 
quite good with other platforms, and have been a unix _user_ for a long 
time, but would like more admin info.  Questions like  the one above, 
or (for example) if it makes sense to try and make a chroot jail when 
I'm providing sftpd with OpenSSH (or if just setting dir permissions is 
good enough), etc. , sometimes get met with a resounding silence- which 
makes me think they are pretty basic questions.  But I don't seem to 
find documentation to help me out...

Thanks for info;

Brian

-- 
"To announce that there must be no criticism of the president, or that 
we are to stand by the president, right or wrong, is not only 
unpatriotic and servile, but is morally treasonable to the American 
public."
-- Theodore Roosevelt, speaking on President Wilson's crackdown on 
dissent after the U.S. entered W.W.I