*BSD News Article 57678


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!newshost.anu.edu.au!harbinger.cc.monash.edu.au!nntp.coast.net!news.kei.com!news.mathworks.com!fu-berlin.de!zib-berlin.de!irz401!uriah.heep!news
From: j@uriah.heep.sax.de (J Wunsch)
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: Re: How to add a new SCSI drive?
Date: 23 Dec 1995 08:45:50 GMT
Organization: Private BSD site, Dresden
Lines: 51
Message-ID: <4bgfju$lij@uriah.heep.sax.de>
References: <4b8cik$40j@newsnewsnews> <4ba4fq$bls@uriah.heep.sax.de> <4bf3am$jd@tzlink.j51.com>
Reply-To: joerg_wunsch@uriah.heep.sax.de (Joerg Wunsch)
NNTP-Posting-Host: localhost.heep.sax.de
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
X-Newsreader: knews 0.9.3

lepslog@j51.com (Louis Epstein) writes:

> : You should
> 
> : 	n e v e r
> 
> : use the block device unless you're going to mount a file system.
> 
> Hmmm...but would you add a disk without making any partitions?

Nope, but how's this related?

The actual partitioning is done by the disktab entry: traditionally,
the `c' partition covers the entire disk (or slice, if that matters),
the `b' partition is magic in that's reserved for a paging area.  The
remaining partitions are freely usable, although partition `a' used to
be reserved for a (potential) root file system.

So you always have to make at least two partitions: `c', and one that
you're actually going to use.  (Hmm, i think you could also newfs the
`c' partition, but that's not considered `good style'.)

So the minimum disktab entry looks like:

m2934s|Fujitsu M2934S:\
	:ty=winchester:dt=SCSI:su#8506782:\	<<== capacity in sectors
	:oc#0:pc#8506782:\
	:oh#0:ph#8506782:th=4.2BSD:fh#1024:bh#8192:

It consists out of a single useable partition `h', covering the entire
disk (4153 MB).

The capacity in sectors (su# value) is what you see here:

(bt0:1:0): "FUJITSU M2934S-512 0110" type 0 fixed SCSI 2
sd1(bt0:1:0): Direct-Access 4153MB (8506782 512 byte sectors)
                                    ^^^^^^^

You don't necessarily need any sectors/track, cylinders etc. values,
just su# is sufficient.

Final word: there are several ideas on how to simplify this process.
But the above should work at least for every 2.0.5 or more recent
FreeBSD.

-- 
cheers, J"org

joerg_wunsch@uriah.heep.sax.de -- http://www.sax.de/~joerg/ -- NIC: JW11-RIPE
Never trust an operating system you don't have sources for. ;-)