Subject: Re: disklabel for a large disk
To: Mike Cheponis <mac@Wireless.Com>
From: Frederick Bruckman <fb@enteract.com>
List: netbsd-help
Date: 04/17/2001 14:05:28
On Tue, 17 Apr 2001, Mike Cheponis wrote:

> Hi, I think I'm really screwed.
>
> When I tried the machine this morning, did "ll /" and about half the files
> were non-existent(!) - the names were there, but no contents.  This is on wd0.
> I didn't write anything to wd0  (unless being so tired that I accidentally
> did some disklabel operation on wd0, but...).

Messing up the disklabel wouldn't do that. If you'd changed the start
on an existing partition, it would most likely fail to mount at all.
Sounds more like a hardware failure.

You might try to restore the disklabel to what it was, and then "fsck"
and see what shakes out. There may be backup disklabels in
"/var/backups/disklabel.wd*".

> > > In an attempt to use up all the space, but "disklabel -R -r wd1 foo" yields:
> > >
> > > ioctl DIOCWLABEL: Inappropriate ioctl for device
> > > ioctl DIOCWLABEL: Inappropriate ioctl for device
> >
> > You're trying to initialize the "raw" label, but the disk already
> > has a label. Try to "write enable" the in-core label first, and then
> > operate on that:
> >
> >   disklabel -W wd1
> >   disklabel -R wd1 foo
> >   disklabel -N wd1


Frederick