Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 22 May 2002 22:29:11 +1000 (EST)
From:      Bruce Evans <bde@zeta.org.au>
To:        Bernd Walter <ticso@cicely5.cicely.de>
Cc:        David Miller <dmiller@sparks.net>, <freebsd-scsi@FreeBSD.ORG>
Subject:   Re: More RAID/disklabel woes
Message-ID:  <20020522214905.F9544-100000@gamplex.bde.org>
In-Reply-To: <20020521095035.GH72276@cicely5.cicely.de>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, 21 May 2002, Bernd Walter wrote:

> On Sat, May 18, 2002 at 11:30:22PM -0400, David Miller wrote:
> > avalanche:dmiller# fdisk da0
> > ******* Working on device /dev/da0 *******
> > parameters extracted from in-core disklabel are:
> > cylinders=11112 heads=254 sectors/track=63 (16002 blks/cyl)
> >
> > Figures below won't work with BIOS for partitions not in cyl 1
> > parameters to be used for BIOS calculations are:
> > cylinders=11112 heads=254 sectors/track=63 (16002 blks/cyl)
> >
> > Media sector size is 512
> > Warning: BIOS sector numbering starts with sector 1
> > Information from DOS bootblock is:
> > The data for partition 1 is:
> > sysid 0,(unused)
> >     start 0, size 177823422 (86827 Meg), flag 0
> >         beg: cyl 0/ head 0/ sector 1;
> >         end: cyl 828/ head 253/ sector 63
> > The data for partition 2 is:
> > <UNUSED>
> > The data for partition 3 is:
> > <UNUSED>
> > The data for partition 4 is:
> > <UNUSED>
>
> Fine - you have allocated space for slice 1.
>
> > avalanche:dmiller# fdisk da1
> > ******* Working on device /dev/da1 *******
> > parameters extracted from in-core disklabel are:
> > cylinders=2213 heads=255 sectors/track=63 (16065 blks/cyl)
> >
> > Figures below won't work with BIOS for partitions not in cyl 1
> > parameters to be used for BIOS calculations are:
> > cylinders=2213 heads=255 sectors/track=63 (16065 blks/cyl)
> >
> > Media sector size is 512
> > Warning: BIOS sector numbering starts with sector 1
> > Information from DOS bootblock is:
> > The data for partition 1 is:
> > sysid 165,(FreeBSD/NetBSD/386BSD)
> >     start 63, size 35551782 (17359 Meg), flag 80 (active)
> >         beg: cyl 0/ head 1/ sector 1;
> >         end: cyl 1023/ head 254/ sector 63
> > The data for partition 2 is:
> > <UNUSED>
> > The data for partition 3 is:
> > <UNUSED>
> > The data for partition 4 is:
> > <UNUSED>
>
> Also fine - allocated space for slice 1.
>
> > ... but it just doesn't want to disklabel:
> >
> > avalanche:dmiller# disklabel -w -r da0 auto
> > disklabel: /dev/da0c: Undefined error: 0
> > avalanche:dmiller# disklabel -w -r da1 auto
> > disklabel: No space left on device
>
> Of course it won't.

Of course it should.

> First you need to disklabel da0s1 and da1s1 because you have
> created a slice fdisk partition table.

No; disklabel(8) converts da0 to /dev/da0c and /dev/da0c is an alias
for the first FreeBSD slice which is /dev/da0s1 in this case.  Similarly
for da0s1.

Perhaps a process is holding (some minor on) /dev/daN open.  The fdisk
changes don't take effect until after all the minors are closed and one
is reopened.  The error messages are consistent with this.  They should
say something about the device being too small to contain a label, most
likely because it is empty (empty primary DOS partitions give empty
devices, although this is probably wrong).

> And you might to wipe out the first blocks of a slice to create
> a virgin disklabel.  E.g. dd if=/dev/zero bs=64k count=10 of=/dev/da1s1

A garbage label in da0c would probably cause different error messages.
Only completely garbage labels could describe a device too small to
contain themself.

Bruce


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-scsi" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020522214905.F9544-100000>