Subject: ccd, disklabel
To: None <port-i386@netbsd.org>
From: Tom T. Thai <tomthai@future.net>
List: port-i386
Date: 11/02/1998 00:55:25
got a question regarding ccd and dislabel on i386.  all of the following
HDs are the same make/model drives.

Here is my /etc/ccd.conf

# cat /etc/ccd*
ccd0 32 none /dev/sd6e /dev/sd5e /dev/sd3e /dev/sd4e /dev/sd1e #
ccd1 32 none /dev/sd6a /dev/sd1a /dev/sd2a /dev/sd3a /dev/sd4a /dev/sd5a

Currently ccd0 is mounted and working just fine.  but I want to get ccd1
working too.

df -k | grep ccd
/dev/ccd0d   22933977   906585 20880693     4%    /var/news/spool/dev/sd2e


Each hd is partitioned the same way:
# disklabel sd1
# /dev/rsd1d:
type: SCSI
disk: newspool
label:
flags:
bytes/sector: 512
sectors/track: 107
tracks/cylinder: 21
sectors/cylinder: 2247
cylinders: 3712
total sectors: 8340864
rpm: 3600
interleave: 1
trackskew: 0
cylinderskew: 0
headswitch: 0           # milliseconds
track-to-track seek: 0  # milliseconds
drivedata: 0

8 partitions:
#      size   offset    fstype   [fsize bsize   cpg]
  a: 224700        0      4.2BSD     1024  8192    16   # (Cyl.    0 -99)
  b: 224700   224700        swap                        # (Cyl.  100 -199)
  c:8340864        0      unused        0     0         # (Cyl.    0 -3711)
  d:8340864        0      unused        0     0         # (Cyl.    0 -3711)
  e:7891464   449400      4.2BSD     1024  8192    16   # (Cyl.  200 -3711)

as you can see, I'm stripping partition e of each drive for ccd0. Here is
the disklabel for ccd0:

# disklabel ccd0
# /dev/rccd0d:
type: ccd
disk: ccd
label: NewsSpool
flags:
bytes/sector: 512
sectors/track: 2048
tracks/cylinder: 1
sectors/cylinder: 2048
cylinders: 23119
total sectors: 47348736
rpm: 3600
interleave: 1
trackskew: 0
cylinderskew: 0
headswitch: 0           # milliseconds
track-to-track seek: 0  # milliseconds
drivedata: 0

1 partition:
#      size   offset    fstype   [fsize bsize   cpg]
 e:47347712        0    4.2BSD     1024  8192    16   # (Cyl.    0-23118)

Since I already ran ccdconfig -v -C to config all ccd devices.  I thought
I'd check the disklabel of ccd1.  At this point, I've not labeled it yet.

# disklabel ccd0
# /dev/rccd0d:
type: ccd
disk: ccd
label: NewsSpool
flags:
bytes/sector: 512
sectors/track: 2048
tracks/cylinder: 1
sectors/cylinder: 2048
cylinders: 23119
total sectors: 47348736
rpm: 3600
interleave: 1
trackskew: 0
cylinderskew: 0
headswitch: 0           # milliseconds
track-to-track seek: 0  # milliseconds
drivedata: 0

5 partitions:
#        size   offset    fstype   [fsize bsize   cpg]
a:   224700        0      4.2BSD     1024  8192    16   # (Cyl.    0-99)
b:   224700   224700        swap                        # (Cyl.  100-199)
c:  8340864        0      unused        0     0         # (Cyl.    0-3711)
d:  8340864        0      unused        0     0         # (Cyl.    0-3711)
e:  7891464   449400      4.2BSD     1024  8192    16   # (Cyl.  200-3711)

HERE IS MY QUESTION.  That sure looks like the disklabel for
sd[1|2|3|4|5|6].

Why is that?  Is there away for the system to remove the disklabel and
automatically rewrite it?  I could edit the label and add up the cylinders
from each sdX, but this just puzzles me.

My system also has 3 SCSI cards and I have some interesting things to ask,
but this is long so I'll post them in the next post.

..............          ....................................
Thomas T. Thai          Infomedia Interactive Communications
tom@iic.net             TEL 612.376.9090 * FAX 612.376.9087