Subject: disklabel for a large disk
To: None <netbsd-help@netbsd.org>
From: Mike Cheponis <mac@Wireless.Com>
List: netbsd-help
Date: 04/17/2001 00:17:00
This is for i386. The dmsg output for this 2nd HD is:
wd1 at pciide0 channel 1 drive 0: <WDC WD450AA-00BAA0>
wd1: drive supports 16-sector PIO transfers, LBA addressing
wd1: 42934 MB, 16383 cyl, 16 head, 63 sec, 512 bytes/sect x 87930864 sectors
wd1: 32-bit data port
wd1: drive supports PIO mode 4, DMA mode 2, Ultra-DMA mode 4 (Ultra/66)
wd1(pciide0:1:0): using PIO mode 4, Ultra-DMA mode 4 (Ultra/66) (using DMA data
transfers)
Unfortunately, a previous (erroneous) disklabel got written to this disk, which
produced (via "disklabel wd1 > foo")
# /dev/rwd1d:
type: unknown
disk: mydisk
label:
flags:
bytes/sector: 512
sectors/track: 63
tracks/cylinder: 16
sectors/cylinder: 1008
cylinders: 16383
total sectors: 66055248
rpm: 3600
interleave: 1
trackskew: 0
cylinderskew: 0
headswitch: 0 # microseconds
track-to-track seek: 0 # microseconds
drivedata: 0
8 partitions:
# size offset fstype [fsize bsize cpg/sgs]
a: 567441 63 4.2BSD 1024 8192 16 # (Cyl. 0*- 562)
b: 1051344 567504 swap # (Cyl. 563 - 1605)
c: 66055185 63 unused 0 0 # (Cyl. 0*- 65530)
d: 66055248 0 unused 0 0 # (Cyl. 0 - 65530)
e: 64436400 1618848 4.2BSD 1024 8192 0 # (Cyl. 1606 - 65530)
Notice that the size is wrong. So edited this to be:
# /dev/rwd1d:
#wd1: 42934 MB, 16383 cyl, 16 head, 63 sec, 512 bytes/sect x 87930864 sectors
type: unknown
disk: my2disk
label:
flags:
bytes/sector: 512
sectors/track: 63
tracks/cylinder: 16
sectors/cylinder: 1008
cylinders: 16383
total sectors: 87930864
rpm: 3600
interleave: 1
trackskew: 0
cylinderskew: 0
headswitch: 0 # microseconds
track-to-track seek: 0 # microseconds
drivedata: 0
8 partitions:
# size offset fstype [fsize bsize cpg/sgs]
a: 567441 63 4.2BSD 1024 8192 16 # (Cyl. 0*- 562)
b: 1051344 567504 swap # (Cyl. 563 - 1605)
c: 87930801 63 unused 0 0 # (Cyl. 0*- 65530)
d: 87930864 0 unused 0 0 # (Cyl. 0 - 65530)
e: 86312016 1618848 4.2BSD 1024 8192 0 # (Cyl. 1606 - 65530)
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
------------
What I'd really like to do is blow away this disklabel and keep only a duplicate
root partition (in case the one on wd0 gets hosed) and then then use the rest of
the disk to store data (no swap).
FWIW, the wd0 disk is:
d0 at pciide0 channel 0 drive 0: <IBM-DTLA-307030>
wd0: drive supports 16-sector PIO transfers, LBA addressing
wd0: 29314 MB, 16383 cyl, 16 head, 63 sec, 512 bytes/sect x 60036480 sectors
wd0: 32-bit data port
wd0: drive supports PIO mode 4, DMA mode 2, Ultra-DMA mode 5 (Ultra/100)
wd0(pciide0:0:0): using PIO mode 4, Ultra-DMA mode 5 (Ultra/100) (using DMA data transfers)
wd0 is connected to the first channel on a Promise PCI card, and the wd1 is
connected to the second channel on the Promise card; each is a master.
Incidentally, wd0 is 7200 RPM and wd1 is 5400 RPM, but disklabel in both cases
says "rpm: 3600"
Thanks for any help!
-Mike