Re: ccd & disklabel (what should work?)

2002-11-20 Thread Andre Albsmeier
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
> ccd064  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= 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= 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:

The data for partition 3 is:

The data for partition 4 is:


--

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 ccd0378 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   offsetfstype   [fsize bsize bps/cpg]
  a: 143374628   164.2BSD0 0 0  # (Cyl.0*- 70007*)
  c: 1433746440unused0 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 [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: ccd & disklabel (what should work?)

2002-11-18 Thread Guezou Philippe
> 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
> ccd064  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've never been able to use disklabel with CCD since ages.. I've always
newfs'ed my ccd once the ccdconfig -C done.. i'm using CCD since 
FreeBSD 4.x, and a current -stable gave me the same result.. 
# ccdconfig -g
ccd0128 0   /dev/ad0s1g /dev/ad1s1e /dev/ad2s1e /dev/ad3s1e
ftp# df -gHli
FilesystemSize   Used  Avail Capacity iusedifree %iused  Mounted on
/dev/ad0s1a66M43M18M70%1529 6661   19%   /
/dev/ad0s1e   258M   119M   119M50%884322899   28%   /usr
/dev/ad0s1f   132M   985K   121M 1% 104161501%   /var
procfs4.1K   4.1K 0B   100%  38  9744%   /proc
/dev/ccd0c260G   138G   122G53%   80212 318194340%   /mnt/space

> 
> newfs: ioctl (WDINFO): /dev/ccd0c: can't rewrite disk label: No such process
> 
> 
> Should we be able to disklabel 'auto' a ccd?

AFAICS, disklabeling CCD is useless. If i need to create more than one CCD,
i create more slice per disk, then CCD them into different disks.

> Should we be able to create multiple partitions? ('a','c','d', etc)

i've tried to, for hours, few years ago when i was a poor student using a
bunch of disk (some old SCSI-1 380mb HD full height) on a FreeBSD 2.x (if
i remember correctly).. Never managed to create more partition on a CCD
slice..

> If not, the ccdconfig man page and handbook probably need
> a bit of updating. They seem to indicate that the above should work.

i think so, but since noone were reporting that, i was thinking
that i was doing something wrong while creating those CCDs..

fifi..
> 
> Comments?
> 
> Thanks,
> John
> 
> 
> To Unsubscribe: send mail to [EMAIL PROTECTED]
> with "unsubscribe freebsd-current" in the body of the message
> 


-- 
Guezou Philippe [EMAIL PROTECTED]
FreeBSD, The power to serve.

Buying an operating system without source is like buying
a self-assembly Space Shuttle with no instructions.



To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message