Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 1 Jun 2006 22:18:40 -0400 (EDT)
From:      Jerry McAllister <jerrymc@clunix.cl.msu.edu>
To:        linuxbsdunix@gmail.com (Adam M)
Cc:        freebsd-questions@freebsd.org
Subject:   Re: Adding as a second hard drive
Message-ID:  <200606020218.k522IefU013276@clunix.cl.msu.edu>
In-Reply-To: <48269bf80606011703g1c4482dau94d3e2539aeb90a@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
> 
> 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"
> 




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200606020218.k522IefU013276>