From owner-freebsd-questions@FreeBSD.ORG Tue Jul 27 00:36:04 2004 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 E41EC16A4CE for ; Tue, 27 Jul 2004 00:36:04 +0000 (GMT) Received: from clunix.cl.msu.edu (clunix.cl.msu.edu [35.9.2.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7689543D4C for ; Tue, 27 Jul 2004 00:36:04 +0000 (GMT) (envelope-from jerrymc@clunix.cl.msu.edu) Received: (from jerrymc@localhost) by clunix.cl.msu.edu (8.11.7p1+Sun/8.11.7) id i6R0Zto23233; Mon, 26 Jul 2004 20:35:55 -0400 (EDT) From: Jerry McAllister Message-Id: <200407270035.i6R0Zto23233@clunix.cl.msu.edu> To: mail63133@telkomsa.net (Livhu Tshisikule) Date: Mon, 26 Jul 2004 20:35:55 -0400 (EDT) In-Reply-To: <200407261445.25612.mail63133@telkomsa.net> from "Livhu Tshisikule" at Jul 26, 2004 02:45:25 PM X-Mailer: ELM [version 2.5 PL2] MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit cc: freebsd-questions@freebsd.org Subject: Re: How can I recover /usr 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, 27 Jul 2004 00:36:05 -0000 > > Hi, > > 1. How can I recover /usr, when I boot the system it goes to single user and > ask me to run fsck manually but the /usr has a bad block. The machine is a > server for diskless machines. Well, hopefully you have been making backups. Put another disk in and boot to single user. fdisk, disklabel and newfs space for /usr and restore /usr from backups. Then fix /etc/fstab to mount the new space as /usr instead of the old bad space. Or you may want to completely replace the disk by making file systems on the new disk for everything on the old one and doing a dump/restore of the still good file systems as well as the restore of a /usr from backup. This is a good idea because typically if you get a bad block on one filesystem it is a sign that the disk is on its last legs. There are built in fail-over sectors on modern disks and if you see a bad sector it likely means that it has already used up all the fail-over sectors. So, time to replace it, before things really crap out. If you don't have backups (tsk tsk) then you can try figuring out a way to direct copy every file except the one with the bad sector to some new space and then figure out how to recreate the file that crosses the bad sector. But, that will take some doing. If the bad sector is the superblock, you might be able to figure out how to use an alternate superblock just long enough to copy files off the disk, but not to keep running. I have read about that but never tried it so someone else would have to coach you on that sort of thing. Good luck, ////jerry > > Regards > Livhu > > _______________________________________________ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org" >