*BSD News Article 71154


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!newshost.anu.edu.au!harbinger.cc.monash.edu.au!news.mira.net.au!vic.news.telstra.net!act.news.telstra.net!psgrain!news.uoregon.edu!arclight.uoregon.edu!news.sprintlink.net!news-stk-200.sprintlink.net!news.mathworks.com!newscaster-1.mcast.net!informatik.uni-bremen.de!cs.tu-berlin.de!uni-erlangen.de!news.tu-chemnitz.de!irz401!orion.sax.de!uriah.heep!news
From: j@uriah.heep.sax.de (J Wunsch)
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: Re: how to add a new disk to FreeBSD ?
Date: 16 Jun 1996 00:00:27 GMT
Organization: Private BSD site, Dresden
Lines: 53
Message-ID: <4pviqr$3s7@uriah.heep.sax.de>
References: <dkleinh.834807020@isotope.ps.uci.edu>
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.6
X-Phone: +49-351-2012 669
X-PGP-Fingerprint: DC 47 E6 E4 FF A6 E9 8F  93 21 E0 7D F9 12 D6 4E

dkleinh@isotope.ps.uci.edu (Dirk Kleinhesselink) wrote:

>     Hi, I have installed FreeBSD on my box and I have 2 drives.  FreeBSD
> is on drive 1 and I want to add disk space on disk 2.  Disk 2 has 1 samll
> DOS partition and a big partittion I want to use for FreeBSD.  I can't find
> anything in the handbook on adding new drives.  I tried the man pages for
> fdisk, disklabel and disktab, but I found them rather confusing.  There
> does not seem to be an entry in my /etc/disktab file that matches even the
> current disk setup.  Can anyone help me set this up, please ?

It's impossible to put all entries for all disks on the world there...

Create one.  Clone an existing entry, enter the su# capability with
_exactly_ the number of sectors your FreeBSD slice has got.  Likewise
for the `c' partition.

Assuming your FreeBSD slice has 12345 sectors:

mydisk:\
	:ty=winchester:dt=SCSI:nt#16:ns#63:nc#1024:\
	:su#12345:\
	:pc#12345:oc#0:\

Note that the nt/ns/nc capabilities must be there, but are allowed to
be bogus since su# gets precedence.  You can also put the partitioning
info there, but you might find it more convenient to only setup the
above, and then:

	cd /dev
	./MAKEDEV sd1s1a	# second SCSI disk, 1st fdisk slice
	disklabel -Brw sd1s1 mydisk
	disklabel -e sd1s1

...and edit the partitions in vi.  _Don't_ use the `c' partition for
anything, it's a meta-partition covering the entire BSD slice.  Instead,
copy this line

  c:  12345        0    unused        0     0         # (Cyl.    0 - xxx*)

and make it look like:

  a:  12345        0    4.2BSD     1024  8192

Finally, create a file system on the new partition:

	newfs -d0 /dev/rsd1s1a

-- 
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. ;-)