Subject: Re: Huge (> 1TB) disk
To: Manuel Bouyer <bouyer@antioche.lip6.fr>
From: None <yutaka@mailhost.net>
List: netbsd-users
Date: 05/15/2002 12:45:53
Manual,
I tried your version of disklabel command and the result follows;
... information aboutn the huge disk ...
$ /sbin/dmesg | grep sd1
sd1 at scsibus1 target 0 lun 0: <Indy 240, 0, 0001> SCSI3 0/direct
fixed
sd1: 1144 GB, 146553 cyl, 128 head, 128 sec, 512 bytes/sect x
-1893842944 sectors
sd1: no disk label
sd1: no disk label
$
... output of NetBSD-1.5.2's /sbin/disklabel ...
log01# /sbin/disklabel sd1
# /dev/rsd1d:
type: SCSI
disk: 0
label: fictitious
flags:
bytes/sector: 512
sectors/track: 128
tracks/cylinder: 128
sectors/cylinder: 16384
cylinders: 146553
total sectors: -1893842944
rpm: 3600
interleave: 1
trackskew: 0
cylinderskew: 0
headswitch: 0 # microseconds
track-to-track seek: 0 # microseconds
drivedata: 0
4 partitions:
# size offset fstype [fsize bsize cpg/sgs]
d: -1893842944 0 unused 0 0 # (Cyl.
0 - 146552)
disklabel: boot block size 0
disklabel: super block size 0
log01#
... output of Manuel's version of disklabel ...
log01# /home/yk/disklabel sd1
# /dev/rsd1d:
type: SCSI
disk: 0
label: fictitious
flags:
bytes/sector: 512
sectors/track: 128
tracks/cylinder: 128
sectors/cylinder: 16384
cylinders: 146553
total sectors: 2401124352
rpm: 3600
interleave: 1
trackskew: 0
cylinderskew: 0
headswitch: 0 # microseconds
track-to-track seek: 0 # microseconds
drivedata: 0
4 partitions:
# size offset fstype [fsize bsize cpg/sgs]
d: -1893842944 0 unused 0 0 # (Cyl.
0 - 146552)
disklabel: boot block size 0
disklabel: super block size 0
log01#
I am following the procedure shown in The NetBSD Guide Appendix B.
log01# dd if=/dev/zero of=/dev/rsd1d bs=1m count=1
1+0 records in
1+0 records out
1048576 bytes transferred in 1 secs (1048576 bytes/sec)
log01# /home/yk/disklabel -I -i sd1
partition> I
# Current values:
# /dev/rsd1d:
type: SCSI
disk: 0
label: fictitious
flags:
bytes/sector: 512
sectors/track: 128
tracks/cylinder: 128
sectors/cylinder: 16384
cylinders: 146553
total sectors: 2401124352
rpm: 3600
interleave: 1
trackskew: 0
cylinderskew: 0
headswitch: 0 # microseconds
track-to-track seek: 0 # microseconds
drivedata: 0
Disk type [?] [SCSI]:
Disk name [0]:
Label name [fictitious]: yutaka
Number of partitions [4]: 8
Sector size (bytes) [512]:
Number of sectors per track [128]:
Number of tracks per cylinder [128]:
Number of sectors/cylinder [16384]:
Total number of cylinders [146553]:
Total number of sectors [2401124352]:
Hardware sectors interleave [1]:
Sector 0 skew, per track [0]:
Sector 0 skew, per cylinder [0]:
Head switch time (usec) [0]:
Track seek time (usec) [0]:
partition> d
Filesystem type [?] [unused]:
Start offset [0c, 0s, 0M]: 0s
Partition size ('$' for all remaining) [146553c, 2401124352s,
1.17242e+06M]: $
partition> c
Filesystem type [?] [unused]:
Start offset [0c, 0s, 0M]: 0s
Partition size ('$' for all remaining) [0c, 0s, 0M]: $
partition> a
Filesystem type [?] [unused]: 4.2BSD
Start offset [0c, 0s, 0M]: 0s
Partition size ('$' for all remaining) [0c, 0s, 0M]: $
partition> P
8 partitions:
# size offset fstype [fsize bsize cpg/sgs]
a: -1893842944 0 4.2BSD 0 0 0 # (Cyl.
0 - 146552)
c: -1893842944 0 unused 0 0 # (Cyl.
0 - 146552)
d: -1893842944 0 unused 0 0 # (Cyl.
0 - 146552)
partition> W
Label disk [n]? y
Label written
partition> Q
log01# newfs -m 5 -b 8192 -f 1024 -i 32768 /dev/rsd1a
preposterous size -1893842944
log01#
For me, it seems your fix is half way done. I am not sure if you are
the one who is commiting the NetBSD code but hope your effort gives
peopole to user over 1TB disk with NetBSD.
And it is sorry to say but I will tring on other OS for now. Not just
because of this issue but I found Ultra 160 SCSI is not functioning as
160MB/s.
At Tue, 14 May 2002 14:07:09 +0200,
Manuel Bouyer wrote:
>
> On Tue, May 14, 2002 at 06:33:39AM +0900, yutaka@mailhost.net wrote:
> >
> >
> > Thanks for your mail, Manuel.
> >
> > I have not found the way to 'install by hand' but if it's a bug in the
> > installer, i am afraid the bug comes from disklabel commmand.
> >
> > When I tried to install yesterday, i plugged a small SCSI disk to the
> > box and installed the system to the small disk. Then i tried to make
> > disklabel to the huge one and the 'total sectors: ' was negative
> > value...
>
> OK, I looked at disklabel and there's int vs unsigned int problems in almost
> all printf and scanf, or atoi.
> Can you try the disklabel binary at
> ftp://antioche.lip6.fr/pub/bouyer/tmp/disklabel.gz
> These problems should be fixed.
> The installer is different code, I'll have to look at this one too.
>
> fdisk may have the same problem but it's less an issue, as you can define a
> smaller partition here (I'm not sure why one would want a boot partition
> larger than 1TB :), and this sign problem may be present in more than fdisk
> (BIOS, boot loader, etc ...).
>
> --
> Manuel Bouyer, LIP6, Universite Paris VI. Manuel.Bouyer@lip6.fr
> --
--
Yutaka KAWASE <yutaka@mailhost.net>