From owner-freebsd-questions@FreeBSD.ORG Mon Jun 30 23:58:48 2003 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E1B7D37B401 for ; Mon, 30 Jun 2003 23:58:48 -0700 (PDT) Received: from web21512.mail.yahoo.com (web21512.mail.yahoo.com [66.163.169.51]) by mx1.FreeBSD.org (Postfix) with SMTP id 8212443FE3 for ; Mon, 30 Jun 2003 23:58:48 -0700 (PDT) (envelope-from radwasteus@yahoo.com) Message-ID: <20030701065848.26013.qmail@web21512.mail.yahoo.com> Received: from [203.151.8.41] by web21512.mail.yahoo.com via HTTP; Mon, 30 Jun 2003 23:58:48 PDT Date: Mon, 30 Jun 2003 23:58:48 -0700 (PDT) From: manee To: David Wolfskill , Kent Stewart , Alex Zivenko In-Reply-To: <200306291307.h5TD7h53030388@bunrab.catwhisker.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii cc: questions@freebsd.org Subject: Re: hard disk error , run fsck manually X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Jul 2003 06:58:49 -0000 hi sirs, thanks to all who give me good helps and hints on my problem. but i afraid that i really need to replace hard disk. i try David Wolfskill's last help but fialed. i mean i could not re-allocate hard disk back. but that is /home partion. my other partion such as /usr /var / are still clean. at this time i simply want to backup /var ( actually is mysql data), /etc and /usr/local/www/data, should only dump enough for backup ? once again thanks so much to all of you. --- David Wolfskill wrote: > >Date: Sun, 29 Jun 2003 00:17:27 -0700 (PDT) > >From: manee > >Subject: Re: hard disk error , run fsck manually > >To: David Wolfskill > >Cc: freebsd-questions@freebsd.org > > > >i got , after running fsck -p > > >THE FOLLOWING FILE SYSTEM HAD AN UNEXPECTED > >INCONSISTENCY: > > > /dev/ad0s2g (/home) > > >so that i ran fsck > > OK. > > >and the following messages come > > >Phase 1 > >ad0s2g: hard error reading fsbn 98971950 of > >21364912-21365023( ad0s2 nb 98971950; cn 6160 tn > 183 > >sn 21) status=59 error=40; > > >CAN NOT READ: BLK 21364912 > >continue? [yn] > > >i had to hit y and a few messages simila to the > above > >popped up and before Phase 2 started, i got > > >FILE SYSTEM STILL DIRTY > >PLEASE RERUN fsck MANULLY. > > Well, you had data on your disk that is no longer > readable. > > If you are lucky, you may be able to get the disk to > re-allocate some of > the "bad sectors". If there were more than about 6 > or 8 of these, > though, I suspect that you will need to replace the > disk soon enough > that it is not worth your time. > > To try to get the disk to re-allocate block > 21364912, I would do: > > dd bs=512 count=1 if=/dev/zero of=/dev/ad0s2g > seek=21364912 > > Note that this has a very high probability of > ensuring that whatever > data is now written to block 21364912 is different > from what it had > been; its only "saving grace" is that it is data > that may possibly be > readable > > Once you have done this for each block that was > reported as "CAN NOT > READ: BLK xxxx", then re-run fsck. Because things > are almost assuredly > going to be inconsistent, you may wish to merely do > > fsck -y > > An alternate, and possibly faster approach would be > to skip the fsck > altogether, and just use "newfs". Of course, that > will obliterate any > data you once had on the file system, and you would > then need to > reconstruct the data -- from backups or other > sources. > > But then, you may well need to do that anyway, > especially for files > affected by the bad blocks. > > >at this ponit i had to edit /etc/fstab and put > /home > >as read only in order to bring system up and > running. > > Seems that you have a disk drive that is getting bad > enough that its > continued usefulness is in question. > with best regards, ===== มานี http://www.thai-aec.org __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com