Re: How can I recover /usr

2004-07-26 Thread Jerry McAllister
> 
> 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  
> 
> ___
> [EMAIL PROTECTED] mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "[EMAIL PROTECTED]"
> 

___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


How can I recover /usr

2004-07-26 Thread Livhu Tshisikule
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. 

Regards
Livhu  

___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"