Subject: Adding another disk to an Ultra1 - disklabel says ioctl DIOCWDINFO:
To: None <port-sparc@netbsd.org>
From: Jonathan Groll <jonathanjg@wo.co.za>
List: port-sparc
Date: 09/05/2005 11:25:08
Hi there,

Trying to add a second drive to an existing netbsd 2.0.2 Ultra1 box. Do I have a bad drive or is this just stupidity?

scsictl apparently not working with this drive :
# scsictl sd0 format
sd0: disk label read error
scsictl: failed to clean Unit Attention: Media Error, Medium Format
Corrupted


also, attempts at setting partitions with disklabel aren't taking:-
# disklabel -i sd0
sd0: disk label read error
partition> C
Automatically adjust partitions [no]: yes
partition> a
Filesystem type [?] [unused]: 4.2BSD
Start offset ('x' to start after partition 'x') [0c, 0s, 0M]: 0
Partition size ('$' for all remaining) [0c, 0s, 0M]: 8387c
 a:   8806350         0     4.2BSD      0     0     0  # (Cyl.      0 -
8386)
partition> W
Label disk [n]? yes
disklabel: ioctl DIOCWDINFO: Inappropriate file type or format
Label not written
partition> Q
sd0: cache synchronization failed
# disklabel -i sd0
sd0: disk label read error
partition> C
Automatically adjust partitions [no]: yes
partition> a
Filesystem type [?] [unused]: 4.2BSD
Start offset ('x' to start after partition 'x') [0c, 0s, 0M]: 0
Partition size ('$' for all remaining) [0c, 0s, 0M]: 8388c
 a:   8807400         0     4.2BSD      0     0     0  # (Cyl.      0 -
8387)
partition> W
Label disk [n]? y
disklabel: ioctl DIOCWDINFO: Inappropriate file type or format
Label not written
partition> C
Automatically adjust partitions [yes]: yes
partition> a
Filesystem type [?] [4.2BSD]:
Start offset ('x' to start after partition 'x') [0c, 0s, 0M]: 0c
Partition size ('$' for all remaining) [8388c, 8807400s, 4300.49M]: $
 a:   8813870         0     4.2BSD      0     0     0  # (Cyl.      0 -
8394*)
partition> W
Label disk [n]? y
disklabel: ioctl DIOCWDINFO: Inappropriate file type or format
Label not written
partition> Q
sd0: cache synchronization failed


I know that "the size of each partition must be a multiple of the number of sectors per cylinder (i.e., each partition must be an integer number of cylinders)", but aren't the above values correct since they are in cylinders anyway.


Possibly, for this drive the discrepancy between the 8387 cylinders, and the full drive of 8394 (as shown in the output below) may be a problem?:-
# disklabel sd0
sd0: disk label read error
# /dev/rsd0c:
type: SCSI
disk: mydisk
label: fictitious
flags:
bytes/sector: 512
sectors/track: 210
tracks/cylinder: 5
sectors/cylinder: 1050
cylinders: 8387
total sectors: 8813870
rpm: 7200
interleave: 1
trackskew: 0
cylinderskew: 0
headswitch: 0           # microseconds
track-to-track seek: 0  # microseconds
drivedata: 0

3 partitions:
#        size    offset     fstype [fsize bsize cpg/sgs]
 c:   8813870         0     unused      0     0        # (Cyl.      0 -
8394*)
disklabel: boot block size 0
disklabel: super block size 0


One more piece of the puzzle, looks like the drive isn't spinning up automatically - relevant lines from dmesg:-


scsibus0: waiting 2 seconds for devices to settle...
sd0 at scsibus0 target 0 lun 0: <IBM-PCCO, DDRS-34560Y   !#, S97B> disk
fixed
sd0(esp0:0:0:0):  Check Condition on CDB: 0x00 00 00 00 00 00
    SENSE KEY:  Not Ready
     ASC/ASCQ:  Logical Unit Is in Process Of Becoming Ready

sd0: drive offline
sd0: sync (100.00ns offset 15), 8-bit (10.000MB/s) transfers
sd1 at scsibus0 target 1 lun 0: <IBM, DCHS04Y, 6363> disk fixed
sd1: 4303 MB, 6077 cyl, 9 head, 161 sec, 512 bytes/sect x 8813870
sectors
sd1: sync (100.00ns offset 15), 8-bit (10.000MB/s) transfers
sd0(esp0:0:0:0):  Check Condition on CDB: 0x00 00 00 00 00 00
    SENSE KEY:  Not Ready
     ASC/ASCQ:  Logical Unit Is in Process Of Becoming Ready

sd0: disk label read error
root on sd1a dumps on sd1b
root file system type: ffs 

I am now at a loss of how to add this drive to the U1, and any insights would be appreciated.

Many thanks,
Jonathan.