Subject: Re: cgd1: error 30
To: Petar Bogdanovic <petar.bogdanovic@ipw.unibe.ch>
From: Florian Stoehr <netbsd@wolfnode.de>
List: netbsd-users
Date: 03/09/2006 15:07:01
On Thu, 9 Mar 2006, Petar Bogdanovic wrote:

> Christos Zoulas wrote:
>> do the cgdconfig again.. You've trashed the label with dd.
>
> When? I did the dd on rsd0d after I've unconfigured cgd1..
>
>
> Florian Stoehr wrote:
>> What do "disklabel sd0" and "disklabel cgd1" show?
>
> ******************************************************
> $ sudo disklabel sd0
> disklabel: Invalid signature in mbr record 0
> # /dev/rsd0d:
> type: SCSI
> disk: mydisk
> label: fictitious
> flags:
> bytes/sector: 512
> sectors/track: 32
> tracks/cylinder: 64
> sectors/cylinder: 2048
> cylinders: 152627
> total sectors: 312581808
> 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]
> a: 312581808         0     4.2BSD      0     0     0  # (Cyl.      0 - 
> 152627*)
> d: 312581808         0     unused      0     0        # (Cyl.      0 - 
> 152627*)
> ******************************************************
>
> ******************************************************
> $ sudo disklabel cgd1
> disklabel: Invalid signature in mbr record 0
> # /dev/rcgd1d:
> type: cgd
> disk: cgd
> label: fictitious
> flags:
> bytes/sector: 512
> sectors/track: 2048
> tracks/cylinder: 1
> sectors/cylinder: 2048
> cylinders: 152627
> total sectors: 312581808
> 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]
> a: 312581808         0     4.2BSD      0     0     0  # (Cyl.      0 - 
> 152627*)
> d: 312581808         0     unused      0     0        # (Cyl.      0 - 
> 152627*)
> disklabel: boot block size 0
> disklabel: super block size 0
> *****************************************************
>

Mmh, I remember I also has this "read only" error, only with SCSI disks 
if I recall correctly.

Perhaps try this in the same order (one step, retry, next step):

- Wipe off disklabel from stick (sd0), re-insert stick, retry
- Write new (correct) label to stick (disklabel -e -I sd0), retry
- Also write a disklabel for the cgd, retry
- Use the "a" slice if "d" does not work

It was a bit confusing I remember... But it had something to do with the 
disklabel, as Christos said.

-Flo