From owner-freebsd-current Fri May 3 08:04:15 1996 Return-Path: owner-current Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id IAA08191 for current-outgoing; Fri, 3 May 1996 08:04:15 -0700 (PDT) Received: from who.cdrom.com (who.cdrom.com [204.216.27.3]) by freefall.freebsd.org (8.7.3/8.7.3) with SMTP id IAA08184 for ; Fri, 3 May 1996 08:04:13 -0700 (PDT) Received: from GndRsh.aac.dev.com (GndRsh.aac.dev.com [198.145.92.241]) by who.cdrom.com (8.6.12/8.6.11) with ESMTP id IAA03373 for ; Fri, 3 May 1996 08:04:08 -0700 Received: (from rgrimes@localhost) by GndRsh.aac.dev.com (8.6.12/8.6.12) id IAA00805; Fri, 3 May 1996 08:02:35 -0700 From: "Rodney W. Grimes" Message-Id: <199605031502.IAA00805@GndRsh.aac.dev.com> Subject: Re: ccd offset, please review + test To: asami@cs.berkeley.edu (Satoshi Asami) Date: Fri, 3 May 1996 08:02:35 -0700 (PDT) Cc: current@freebsd.org, ccd@stampede.cs.berkeley.edu In-Reply-To: <199605030909.CAA02043@silvia.HIP.Berkeley.EDU> from Satoshi Asami at "May 3, 96 02:09:46 am" X-Mailer: ELM [version 2.4ME+ PL11 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-current@freebsd.org X-Loop: FreeBSD.org Precedence: bulk > Below is a small patch to make ccd ignore the first 16 sectors in the > component partitions. The purpose of this is to allow people to do > things like > > dd if=/dev/zero of=/dev/rsd237 bs=512 count=2 # destroy slice table > disklabel -wr sd237 auto # create default label > > and then just use /dev/sd237c et al. for the ccd components. I > temporarily turned off the "4.2BSD" type check too, this part won't be > permanent, but for now, it is necessary for the above to work because > /dev/sd237c will be marked "unused". And /dev/sd237c should _not_ be used. You should manually go add a /dev/sd237a and use that for the ccd, this should eliminate your problem. > >From what I understand (which is certainly not very much), the reason > why the above doesn't work with the current ccd code is because the > disklabels are at the beginning of the slices, and "disklabel ccd0" > will confuse the first component's disklabel with the ccd's (i.e., if > you combine /dev/sd237c and /dev/sd280c in this order to create ccd0, > sd237's disklabel will be confused as ccd0's disklabel). You should be combineing /dev/sd237a and /dev/sd280a to create ccd0. > Also, the first 16 sectors of the slices are read-only, so ccd will > fail at some point if you have a component (not the first one) that > starts at the beginning of the slice (i.e., if you combine /dev/sd237g > and /dev/sd280c, where sd237g doesn't start at the beginning of the > slice, it will appear to work for a while but fail at some point when > the driver actually tries to write something to the first 16 sectors > of sd280). Fixed if you use /dev/sd280a. > Of course the man page tells you not to use a partition that starts at > the beginning of a slice, but the above command samples are very > convenient. Conventient, but wrong to do. UNIX has reserved xxYc for as long as I can remeber, using it for file systems is a sure fire way to burn yourself. > Consider yourself to be a novice sysadmin who just > installed FreeBSD for the ccd driver and also purchased 64 4-gig > Atlases for the news spool (and aren't particularly in the mood of > diving into the disklabel man page :). Novice system admins should be let close to $64,000 disk arrays. :-) > Satoshi -- Rod Grimes rgrimes@gndrsh.aac.dev.com Accurate Automation Company Reliable computers for FreeBSD