Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 20 Mar 1996 19:25:37 +0100 (MET)
From:      Andreas Klemm <andreas@knobel.gun.de>
To:        Dave Hayes <dave@kachina.jetcafe.org>
Cc:        freebsd-hackers@FreeBSD.ORG
Subject:   Re: Adding a damn 2nd disk 
Message-ID:  <Pine.BSF.3.91.960320190738.18629B-100000@knobel.gun.de>
In-Reply-To: <199603200107.RAA16306@kachina.jetcafe.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, 19 Mar 1996, Dave Hayes wrote:

> [...]
> *Why* the hell is adding a 2nd disk to a currently running OS Guru
> level lore? 
> [...]

Yesterday evening I started to add my 2nd SCSI Harddisk to my
home System. Looks like I have 5 GB now ;-)

Well, although I knew directly, that I have to fiddle around with
disklabel, I'd suggest to people like you, to first do the most
obviuos thing ... check the manpages.

The command 'apropos disk' gives you lot's of ideas, where
to search for pieces of information. The most important here:

...
disklabel(5)             - disk pack label
disklabel(8)             - read and write disk pack label
disktab(5)               - disk description file
...

One look in /etc/disktab shows you what to do next, or not :->

What I did ... RTFM and write an disktab entry for my 1.05 GB
Fujitsu Harddisk. The data for that I got by looking at the
boot messages. With the command 'dmesg' you can watch the
last boot messages to get the data of your harddisk (sectors,
heads,...)

(ahc0:0:0): "QUANTUM XP34301 1051" type 0 fixed SCSI 2
sd0(ahc0:0:0): Direct-Access 4106MB (8410200 512 byte sectors)
sd0(ahc0:0:0): with 4076 cyls, 20 heads, and an average 103 sectors/track
(ahc0:1:0): "FUJITSU M2694ES-512 8139" type 0 fixed SCSI 1
sd1(ahc0:1:0): Direct-Access 1033MB (2117025 512 byte sectors)
sd1(ahc0:1:0): with 1819 cyls, 15 heads, and an average 77 sectors/track
(ahc0:6:0): "TOSHIBA CD-ROM XM-3601TA 0725" type 5 removable SCSI 2

If you don't get the geometry of your SCSI disk, then please
compile your kernel with the option 'SCSI_REPORT_GEOMETRY'
(Always report disk geometry at boot up instead of only when 
booting verbosely) or boot with the option -v after halting
the system.

Now you know your disk geometry, to make a nice disktab entry
for your harddisk. Here is mine as an example:

# c == d == whole disk
# (ahc0:1:0): "FUJITSU M2694ES-512 8139" type 0 fixed SCSI 1
# sd1(ahc0:1:0): Direct-Access 1033MB (2117025 512 byte sectors)
# sd1(ahc0:1:0): with 1819 cyls, 15 heads, and an average 77 sectors/track
# 1819cyls * 15heads * 77sectors/track = 2100945 sectors
fujitsu|F2694ES|Fujitsu M2694ES-512 1.05GB:\
	:dt=SCSI:\
	:ty=winchester:\
	:se#512:nt#15:ns#77:nc#1819:rm#5400:\
	:pa#1893045:oa#207900:ba#8192:fa#1024:ta=4.2BSD:\
	:pb#207900:ob#0:tb=swap: \
	:pc#2100945:oc#0:

After that do the magic command 

disklabel -r -w /dev/rsd1c fujitsu

Or something else suitable for you... Assuming your new disk is
/dev/sd1... too.

After that you have the possibility to make filesystems

# newfs /dev/rsd1a

And then you can mount them and put them into /etc/fstab to
mount the filesystems automatically (and to get them checked
of yourse ;-)

here is mine /etc/fstab:
/dev/sd1b	none	swap	sw 0 0
/dev/sd1a	/rel	ufs	rw 1 1

Note, that I now have to swap areas for delayed paging, it's
nice to distribute the swap load to two disks:

# pstat -s

Device      1K-blocks     Used    Avail Capacity  Type
/dev/sd0s3b     98304    13124    85116    13%    Interleaved
/dev/sd1b      103950    13072    90814    13%    Interleaved
Total          202126    26196   175930    13%

Hope that helps a bit... If you are a kind person, you
bring my tips into a nice form, best would be sgml based,
and then it can move to the FreeBSD handbook.

Now it's your turn :-))

	Andreas ///

--
andreas@knobel.gun.de         /\/\___      Wiechers & Partner Datentechnik GmbH
   Andreas Klemm          ___/\/\/         $$  Support Unix - aklemm@wup.de  $$
pgp p-key  http://www-swiss.ai.mit.edu/~bal/pks-toplev.html  >>> powered by <<<
ftp://sunsite.unc.edu/pub/Linux/system/Printing/aps-491.tgz  >>>    FreeBSD <<<
"Ich bleibe bei der Aussage und trotze den Flames. :-)"    Ulli Horlacher 02/96




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.3.91.960320190738.18629B-100000>