Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 20 Nov 2002 14:35:52 +0100
From:      Andre Albsmeier <andre.albsmeier@mchp.siemens.de>
To:        John De Boskey <jwd@bsdwins.com>
Cc:        Current List <freebsd-current@FreeBSD.ORG>
Subject:   Re: ccd & disklabel (what should work?)
Message-ID:  <20021120143552.A69125@curry.mchp.siemens.de>
In-Reply-To: <20021117222056.GA41998@BSDWins.Com>; from jwd@bsdwins.com on Sun, Nov 17, 2002 at 05:20:56PM -0500
References:  <20021117222056.GA41998@BSDWins.Com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, 17-Nov-2002 at 17:20:56 -0500, John De Boskey wrote:
> In trying to setup a ccd on a -current system I
> seem to have run into a few issues:
> 
> /etc/ccd.conf:
> # ccd           ileave  flags   component devices
> ccd0             64      none    /dev/ad1s1a /dev/ad2s1a
> 
> # ccdconfig -g
> ccd0            64      0       /dev/ad1s1a /dev/ad2s1a
> 
> # ls -al /dev/ccd*
> crw-r-----  1 root  operator   74,   2 Nov 17 22:09 /dev/ccd0c
> 
> So far, so good...
> 
> 
> # disklabel -rw ccd0c auto
> disklabel: auto: unknown disk type
> # disklabel -rw ccd0 auto 
> disklabel: cannot open /dev/ccd0: No such file or directory
> disklabel: auto: unknown disk type
> 
> #disklabel -e ccd0c
> disklabel: ioctl DIOCWDINFO: no disk label on disk;
> add "-r" to install initial label
> re-edit the label? [y]: 

I have just done it here using -STABLE (don't know if it
works on -current):

--------------------------------------------------

Blank the components:

root@server:/dev>dd if=zero of=da2
^C5246+0 records in
5246+0 records out
2685952 bytes transferred in 0.706887 secs (3799691 bytes/sec)

root@server:/dev>dd if=zero of=da3
^C6766+0 records in
6765+0 records out
3463680 bytes transferred in 0.936902 secs (3696950 bytes/sec)

--------------------------------------------------

Give them a slice:

root@server:/dev>fdisk -u da2
....
root@server:/dev>fdisk da2
******* Working on device /dev/da2 *******
parameters extracted from in-core disklabel are:
cylinders=4444 heads=256 sectors/track=63 (16128 blks/cyl)

Figures below won't work with BIOS for partitions not in cyl 1
parameters to be used for BIOS calculations are:
cylinders=4444 heads=256 sectors/track=63 (16128 blks/cyl)

Media sector size is 512
Warning: BIOS sector numbering starts with sector 1
Information from DOS bootblock is:
The data for partition 1 is:
sysid 165,(FreeBSD/NetBSD/386BSD)
    start 0, size 71687340 (35003 Meg), flag 0
        beg: cyl 0/ head 0/ sector 1;
        end: cyl 1023/ head 255/ sector 63
The data for partition 2 is:
<UNUSED>
The data for partition 3 is:
<UNUSED>
The data for partition 4 is:
<UNUSED>

--------------------------------------------------

give them a disklabel, create one a partition:

root@server:/dev>disklabel -rw da2 auto
root@server:/dev>disklabel -e da2
...

--------------------------------------------------

I'm a lazy guy :-)

root@server:/dev>dd if=da2 of=da3 count=128
128+0 records in
128+0 records out
65536 bytes transferred in 0.024416 secs (2684132 bytes/sec)

--------------------------------------------------

configure the CCD:

root@server:/dev>ccdconfig -v ccd0    378     none    /dev/da2a  /dev/da3a
ccd0: 2 components (da2a, da3a), 143374644 blocks interleaved at 378 blocks

--------------------------------------------------

give the CCD a disklabel:

root@server:/dev>disklabel -rw ccd0c auto
Warning, partition c is not marked as unused!
Warning, An incorrect partition c may cause problems for standard system utilities

Ignore the error!

--------------------------------------------------

Now comes the trick:

root@server:/dev>disklabel -e ccd0

And give it:

3 partitions:
#        size   offset    fstype   [fsize bsize bps/cpg]
  a: 143374628       16    4.2BSD        0     0     0  # (Cyl.    0*- 70007*)
  c: 143374644        0    unused        0     0        # (Cyl.    0 - 70007*)

Note the a: partition with the offset of 16 and the unused
c: partition. disklabel should exit without any errors...

--------------------------------------------------

And now the fs:

root@server:/dev>newfs -U -i 65536 ccd0a
Warning: Block size and bytes per inode restrict cylinders per group to 104.
Warning: 1756 sector(s) in last cylinder unallocated
/dev/ccd0a:     143374628 sectors in 35004 cylinders of 1 tracks, 4096 sectors
        70007.1MB in 337 cyl groups (104 c/g, 208.00MB/g, 3328 i/g) SOFTUPDATES
super-block backups (for fsck -b #) at:
 32, 426016, 852000, 1277984, 1703968, 2129952, 2555936, 2981920, 3407904, 3833888, 4259872,
....
 140148768, 140574752, 141000736, 141426720, 141852704, 142278688, 142704672, 143130656
root@server:/dev>

--------------------------------------------------


Hope that helps!

	-Andre

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20021120143552.A69125>