On 8/23/06, Andreas Maus <[EMAIL PROTECTED]> wrote:
Hello everybody.

I have a ccd containing two disks:

[EMAIL PROTECTED]:~ $ cat /etc/ccd.conf
#       $OpenBSD: ccd.conf,v 1.1 1996/08/24 20:52:22 deraadt Exp $
# Configuration file for concatenated disk devices
# ccd   ileave  flags   component devices
ccd0    64      0x8     /dev/wd0e /dev/wd1a

Sometimes after a reboot the system is can not build ccd0 because
wd1 doesn't have a correcte disklabel. I can set it manually (disklabel -E wd1)
to:
# disklabel wd1
16 partitions:
#             size        offset  fstype [fsize bsize  cpg]
  a:     234372222            63  4.2BSD      0     0    0 # Cyl     0*-232512*
  c:     234375000             0  unused      0     0      # Cyl     0 -232514*

and I am able to build the ccd. Usually (~95%) the disklabel is correct and
ccd0 can be build on startup. But sometimes it "forgets" the disklabel and
wd1 contains:

# disklabel wd1
16 partitions:
#             size        offset  fstype [fsize bsize  cpg]
  a:     234372222            63  unused      0     0    0 # Cyl     0*-232512*
  c:     234375000             0  unused      0     0      # Cyl     0 -232514*

and with a "unused" fstype ccdconfig fails to build the ccd-device.
Unfortunately I am not able to reproduce this bevaiour. It happens
sometimes.

The system runs:

OpenBSD gorg.badphish.dyndns.org 3.9 GORG#4 amd64

(3.9-STABLE)

Does anyone knows whats wrong or what I should do the fix this
behaviour?

My first guess is that something is wiping out the disklabel on wd1.
That is, some boundary is configured wrong and, in the process of
writing to the ccd, sometimes it "spills over" and smashes the
disklabel. In that case you'd also be losing whatever data is getting
put there when you fix the disklabel. Oh look, the disklabel is stored
in the first 512b of wd1a, and you are using wd1a as part of the ccd.
Here, to fix it, make wd1a small, only one sector (or more, if you
aren't comfortable with it being that small) and then make wd1d start
after it, and use wd1d as part of your ccd instead.

-Nick

Reply via email to