TIP: Click on subject to list as thread! ANSI
echo: aust_freebsd
to: Stephen Walsh
from: Rowan_Crowe
date: 1997-10-23 02:55:20
subject: adding a new hd/filesystem

* Stephen Walsh writes to rowan_crowe, on Wednesday October 22 1997
   at 11:53:

 SW> just found my old 100mb scsi hd (as well as my old nec cdrom drive) in
 SW> the junk pile, and was wondering how I would go about adding the hd to
 SW> the freebsd system without frying anything else that I've setup?

I've had to do this a couple of times recently, and hopefully I've now got
it right. I'll try to outline the steps.

1. Boot into single user mode (-s at the boot prompt). Make sure your
kernel is suitably configured, and FreeBSD is detecting the drive (dmesg |
grep sector)
2. run /stand/sysinstall
3. select CUSTOM installation
4. select PARTITION and the appropriate drive, create the partition (you
can devote the entire disk to it, no need for a compatible partition table)
5. important: do *not* (W)rite changes to disk; just (Q)uit
6. Select LABEL and create the new slice including mount point, this time
you want to (W)rite before quitting. It should create the new file system
at this stage, and I think also here it will show the device name of the
drive (note this down for the next step)
7. Edit /etc/fstab (mount /; mount /usr; mount /var; ee /etc/fstab) and add
in a new line for your drive, copied from your existing partition info.
Example...

# Device                Mountpoint      FStype  Options         Dump    Pass#
/dev/wd0s1b             none            swap    sw              0       0
/dev/wd0a               /               ufs     rw              1       1
/dev/wd1s1e             /var            ufs     rw              1       1
proc                    /proc           procfs  rw              0       0

wd1s1e is the 2nd drive.

8. reboot into normal multiuser mode, and the new drive should show up...

Have you thought about the mount point of the new drive? What will you be
putting on it?

The 2nd drive I installed on denim.sensation.net.au recently (as above) is
mounted on /var, which contains the news and HTTP/FTP cache. Prior to that
/var was on the first drive under the huge '/' slice (which is apparently a
bit of a nono, but I'm lazy and prefer to have only a single slice :) ). I
used tar to backup and restore the contents of /var from the old to the new
drive:

(reboot to single user)
tar -zcvf /varbak.tar.gz /var/*
rm -Rf /var
(install and configure new drive, reboot again to single user)
tar -zxvf /varback.tar.gz


Cheers.


... rowan{at}sensation.net.au  |  http://www.rowan.sensation.net.au/
---
* Origin: Sensation: Melbourne AUSTRALIA. (3:635/728.1)
SEEN-BY: 622/419 632/360 633/267 270 284 635/728 729
@PATH: 635/728 633/267

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.