From owner-freebsd-questions@FreeBSD.ORG  Fri Jun  2 02:18:41 2006
Return-Path: <owner-freebsd-questions@FreeBSD.ORG>
X-Original-To: freebsd-questions@freebsd.org
Delivered-To: freebsd-questions@freebsd.org
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 9A62B16A708
	for <freebsd-questions@freebsd.org>;
	Fri,  2 Jun 2006 02:18:41 +0000 (UTC)
	(envelope-from jerrymc@clunix.cl.msu.edu)
Received: from clunix.cl.msu.edu (clunix.cl.msu.edu [35.9.2.10])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 2A67043D46
	for <freebsd-questions@freebsd.org>;
	Fri,  2 Jun 2006 02:18:41 +0000 (GMT)
	(envelope-from jerrymc@clunix.cl.msu.edu)
Received: from clunix.cl.msu.edu (localhost [127.0.0.1])
	by clunix.cl.msu.edu (8.13.6+Sun/8.13.6) with ESMTP id k522IeAm013277; 
	Thu, 1 Jun 2006 22:18:41 -0400 (EDT)
Received: (from jerrymc@localhost)
	by clunix.cl.msu.edu (8.13.6+Sun/8.13.6/Submit) id k522IefU013276;
	Thu, 1 Jun 2006 22:18:40 -0400 (EDT)
From: Jerry McAllister <jerrymc@clunix.cl.msu.edu>
Message-Id: <200606020218.k522IefU013276@clunix.cl.msu.edu>
To: linuxbsdunix@gmail.com (Adam M)
Date: Thu, 1 Jun 2006 22:18:40 -0400 (EDT)
In-Reply-To: <48269bf80606011703g1c4482dau94d3e2539aeb90a@mail.gmail.com>
X-Mailer: ELM [version 2.5 PL7]
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Cc: freebsd-questions@freebsd.org
Subject: Re: Adding as a second hard drive
X-BeenThere: freebsd-questions@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: User questions <freebsd-questions.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-questions>, 
	<mailto:freebsd-questions-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/freebsd-questions>
List-Post: <mailto:freebsd-questions@freebsd.org>
List-Help: <mailto:freebsd-questions-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-questions>, 
	<mailto:freebsd-questions-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Fri, 02 Jun 2006 02:18:47 -0000

> 
> Yes, I was wondering what the best way was to add a second hard drive to my
> existing FreeBSD system, I searched the Handbook, but cannot find it.

Basic process:

Get a good, that either works with your existing controller or also
get a controller with is.   eg.  If it is SCSI and you only have SATA
you will need another controller, etc.

Install it in the box and boot the machine.

Observe the boot messages or use dmesg to make sure it is recognized
and that you know how the system is identified.  It will probably 
be either da1 or ad1 depending on whether it is SCSI or SATA.

Decide on how you want the new disk divided.

Use fdisk     to create a FreeBSD slice on the disk

Use bsdlabel    (or disklabel for 4.xxx systems and before)
              to create at least one partition within the slice.

Use newfs     to build a filesystem on all of the partitions you create
              with bsdlabel.

create a mount point  (for example   'mkdir /newdsk')

Edit the  /etc/fstab  file to add an entry to make it mount upon boot.

Mount the new disk    (For example   'mount /newdsk' or just  'mount -a')

The man pages for fdisk, bsdlabel and newfs have all the information 
you need but can be a little confusing.   In the bsdlabel man page
there are some examples near the bottom that are good.  They suggest
using  dd to overwrite anything that might preexist in the first sector.
That isn't always needed, but can fix things if that sector is a problem.
Actually, I usually write around the first 100 sectors just for good
measure when I need it.

The only more complicated things are if you want to make more than
one partition and/or slice, and if you want to be able to boot from it.
More slices and partitions amounts to the same, but just require some
calculations.   Making it bootable requires using -B on both fdisk
and bsdlabel.

All this can also be done using sysinstall, but I prefer doing it
straight up with the regular tools.

Read the man pages.

Good luck,

////jerry


> _______________________________________________
> freebsd-questions@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org"
>