Re: ufsdump/ufsrestore file system

From: Mostly Harmless (phuqu.forager_at_phuqu.talstar.commercial)
Date: 08/12/05


Date: Fri, 12 Aug 2005 16:51:58 -0400


"Tim_bates@yahoo.com" <bridge_xue@yahoo.com> wrote in message
news:1123717353.089443.243800@f14g2000cwb.googlegroups.com...
> The root disk has some bad sectors. I am wondering if using
> ufsdump/ufsrestore to dump the file systems on root disk to another
> disk, will the data on the bad sector be lose? (As when dumping the
> file system, there are messages saying "cannot read block XXXXXX" ).
>
> Any better way to perform in this situation?

I recently faced the same situation. I wound up using the repair facility
in the format(1M) command. It took an excruciatingly painful amount of time
to actually determine WHICH blocks were faulty, but I wound up making it
work. All work was done on a 40MHz IPX Station under Solaris 7.

One thing I noticed, and it may be isolated to the Seagate drive I was
using, is that the repairs did not survive a reboot. Had me WTF'ing all
night.

I was still able to boot off the bad drive, it just ran into major issues
after booting. So I booted into single-user mode, looking something like
this:

Installed the new drive to device 0 (the boot device is 3.) Formatted,
partitioned, and newfs's the drive. Ran "format" and repaired the bad
sectors on the boot device. Then, performed a command like this:

cd /newdriveroot; ufsdump 0f - / | ufsrestore rf -

Once done (with all filesystems, in my case) I moved the new drive to device
3, and removed the old, bad drive.

Now, I did not have a working CD drive from which to boot, so I can only
assume that booting from CD and doing the work might have saved me hassle.
All-in-all, everything came over smoothly.

As an aside, I had to use a 68-pin drive to replace the old 50-pin drive.
Anyone familiar with the IPX Stations will tell you there is absolutely NO
room for any kind of drive adapter on the back of the drive. So, I
improvised. I used a 50F-68F adapter right in the on-board 50-pin SCSI
port, then used a 68-pin cable to the drive. I can't imagine I'm the first
to do this, but I haven't seen any mention of anyone else. Works like a
bloody charm, and breathed some extra life into my little server :)

-- 
Alan W. Rateliff, II 


Relevant Pages