Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Disktab and Disklabel curiosities. One works, one doesn't!

0 views
Skip to first unread message

Robert Chalmers

unread,
Jun 8, 1998, 3:00:00 AM6/8/98
to

Getting closer:

by doing the following;

dd if=/dev/zero of=/dev/rsd1 bs=1k count=1
disklabel -Brw sd1 auto

I managed to create a label c on the scsi drive. disklabel sd1 produced this,
minus the a and b partitions;
# /dev/rsd1c:
type: SCSI
disk: sd1s1
label:
flags:
bytes/sector: 512
sectors/track: 16
tracks/cylinder: 51
sectors/cylinder: 816
cylinders: 5036
sectors/unit: 4110000
rpm: 3600
interleave: 1
trackskew: 0
cylinderskew: 0
headswitch: 0 # milliseconds
track-to-track seek: 0 # milliseconds
drivedata: 0

3 partitions:
# size offset fstype [fsize bsize bps/cpg]
a: 2055000 0 unused 0 0 # (Cyl. 0 - 2518*)
b: 2055000 2055000 unused 0 0 # (Cyl. 2518*- 5036*)
c: 4110000 0 unused 0 0 # (Cyl. 0 - 5036*)


Not finished yet, I then did a disklabel -e -r sd1

and added the a: and b: partitions. exactly as you see them above. Upon
quitting the eidtor, it all wrote to disk perfectly!!! I discovered of course
that you cant start with c: e: f:... durrr.

Now the tricky bit. Do the same with the /etc/disktab entry:
I used this disktab entry.

c2490a|Compaq C2490A SCSI:\
:ty=winchester:dt=SCSI:ns#16:nt#51:nc#5036:sf:\
:oa#0:pa#2055000:ba#8192:fc#1024:\
:ob#2055000:pb#2055000:bb#8192:fc#1024:\
:oc#0:pc#4110000:bc#8192:fc#1024:

doing a disklabel -w -r /dev/rsd1c c2490a sd1s1 produces the two errors,
partition b: partition extends past end of unit
partition c: partition extends past end of unit

What gives. One type of enty works, one doesn't.

any ideas anyone?

thanks
Bob

--
Support Whirled Peas. Business in China? China House
rob...@chalmers.com.au ph:61 7 49440357 fx:61 7 49578425
China House Uses Webposition to ensure Top Spot in Searches
http://www.chalmers.com.au/ChinaHouse/Business/webposition

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

Robert Chalmers

unread,
Jun 8, 1998, 3:00:00 AM6/8/98
to

Hi,
still at this,


c2490a|Compaq C2490A SCSI:\
:ty=winchester:dt=SCSI:ns#16:nt#51:nc#5036:sf:\

:oa#0:pa#2054688:\
:ob#2054688:pb#2054688:\
:oc#0:pc#4109376:

This doesn't work yet. 2 partitions of 2054688 each = 4109376, and disklabel
returns the error:

disklabel: ioctl DIOCSDINFO: Open partition would move or shrink

It then exits, without writing any info.

The curious thing is, that the handmade edited labelling seems to work without
error, using the 4110000 numbers?

Maybe there is something fundamentally wrong with this section?

bob


Malte Lance wrote:
>
> >> > c2490a|Compaq C2490A SCSI:\
> >> > :dt=SCSI:ty=winchester:se#512:nt#51:ns#16:nc#5036:sf:\
>
> As far as i know you don't need/want "sf" with SCSI-disks.

Robert Chalmers

unread,
Jun 8, 1998, 3:00:00 AM6/8/98
to

Thank you very much for that.

This means that some part of the label process is rounding up. Because the
4110000 is what is returned by the first part of the disklable process, as does
disklable xxxx auto.

I suspected that this may have been the case.

Thanks for your assistance

Robert

Malte Lance wrote:
>
> (referring to the 4 mails you pumped into questions)


>
> > bytes/sector: 512
> > sectors/track: 16
> > tracks/cylinder: 51

> > cylinders: 5036
>
> total number of sectors:
> sectors/track * tracks/cylinder * cylinders = 16 * 51 * 5036 = 4109376
>
> > sectors/unit: 4110000
>
> Here's your mismatch.


>
> > c2490a|Compaq C2490A SCSI:\
> > :dt=SCSI:ty=winchester:se#512:nt#51:ns#16:nc#5036:sf:\

> > :pc#4110000:oc#0:te=unused:\
> > :pe#2055000:oe#0:te=4.2BSD:be#4096:fe#512:\
> > :pf#2055000:of#2055000:te=4.2BSD:be#4096:ff#512:
>
> 4109376 < pe + pf = 4110000
>
> Malte.

> > c2490a|Compaq C2490A SCSI:\
> > :ty=winchester:dt=SCSI:ns#16:nt#51:nc#5036:sf:\

> > :oa#0:pa#2055000:ba#8192:fc#1024:\
> > :ob#2055000:pb#2055000:bb#8192:fc#1024:\
> > :oc#0:pc#4110000:bc#8192:fc#1024:
> >
> > doing a disklabel -w -r /dev/rsd1c c2490a sd1s1 produces the two errors,
> > partition b: partition extends past end of unit
> > partition c: partition extends past end of unit
> >
> > What gives. One type of enty works, one doesn't.
> >
> > any ideas anyone?
> >
> > thanks
> > Bob
> >
> >
> >

> > --
> > Support Whirled Peas. Business in China? China House
> > rob...@chalmers.com.au ph:61 7 49440357 fx:61 7 49578425
> > China House Uses Webposition to ensure Top Spot in Searches
> > http://www.chalmers.com.au/ChinaHouse/Business/webposition
> >
> > To Unsubscribe: send mail to majo...@FreeBSD.org
> > with "unsubscribe freebsd-questions" in the body of the message
>

> ----------------------------------
> E-Mail: Malte Lance <ma...@webmore.com>
> Date: 08-Jun-98
> Time: 10:11:20
> ----------------------------------

Malte Lance

unread,
Jun 8, 1998, 3:00:00 AM6/8/98
to

>> > c2490a|Compaq C2490A SCSI:\
>> > :dt=SCSI:ty=winchester:se#512:nt#51:ns#16:nc#5036:sf:\

As far as i know you don't need/want "sf" with SCSI-disks.

Malte.

Time: 11:05:54
----------------------------------

Malte Lance

unread,
Jun 8, 1998, 3:00:00 AM6/8/98
to

Malte Lance

unread,
Jun 8, 1998, 3:00:00 AM6/8/98
to


On 08-Jun-98 Robert Chalmers wrote:

> Hi,
> still at this,


>
>
> c2490a|Compaq C2490A SCSI:\
> :ty=winchester:dt=SCSI:ns#16:nt#51:nc#5036:sf:\

> :oa#0:pa#2054688:\
> :ob#2054688:pb#2054688:\
> :oc#0:pc#4109376:
>
> This doesn't work yet. 2 partitions of 2054688 each = 4109376, and disklabel
> returns the error:
>
> disklabel: ioctl DIOCSDINFO: Open partition would move or shrink
>
> It then exits, without writing any info.

Show the disklabel-command you are trying to run.
Generally it means, that the disk you try to disklabel is already
partitioned/disklabel'ed.
What geometry did you use while partitioning the disk ?
I am using always :se#512:nt#64:ns#32: on SCSI-disks.
"nc" can be easily calculated with this info given.

Malte.

>
> The curious thing is, that the handmade edited labelling seems to work
> without
> error, using the 4110000 numbers?
>
> Maybe there is something fundamentally wrong with this section?
>
> bob
>
>
> Malte Lance wrote:
>>

>> >> > c2490a|Compaq C2490A SCSI:\
>> >> > :dt=SCSI:ty=winchester:se#512:nt#51:ns#16:nc#5036:sf:\
>>

>> As far as i know you don't need/want "sf" with SCSI-disks.
>>
>

> --
> Support Whirled Peas. Business in China? China House
> rob...@chalmers.com.au ph:61 7 49440357 fx:61 7 49578425
> China House Uses Webposition to ensure Top Spot in Searches
> http://www.chalmers.com.au/ChinaHouse/Business/webposition
>

----------------------------------


E-Mail: Malte Lance <ma...@webmore.com>
Date: 08-Jun-98

Time: 12:23:15

0 new messages