FreeBSD: Adding a new HDD

This article is about making a new harddrive available to the system. If you’re interessted in how to change the size of an existing partition, you might find this article interesting.

After installing the new Harddrive, start sysinstall:

Fdisk

sysinstall

Go to:

Configure -> Fdisk

Select the new disk – in my case it is vtbd3

  lqqqqqqqqqqqqqqqqqqqqqqqqqq Select Drive(s) qqqqqqqqqqqqqqqqqqqqqqqqqqk       
  x Please select the drive, or drives, on which you wish to perform    x       
  x this operation.  If you are attempting to install a boot partition  x       
  x on a drive other than the first one or have multiple operating      x       
  x systems on your machine, you will have the option to install a boot x       
  x manager later.  To select a drive, use the arrow keys to move to it x       
  x and press [SPACE] or [ENTER].  To de-select it, press it again.     x       
  x                                                                     x       
  x Use [TAB] to get to the buttons and leave this menu.                x       
  x lqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqk x       
  x x                        [ ] vtbd0  vtbd0                         x x       
  x x                        [ ] vtbd1  vtbd1                         x x       
  x x                        [ ] vtbd2  vtbd2                         x x       
  x x                        [X] vtbd3  vtbd3                         x x       
  x mqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqj x       
  tqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqu       
  x                       [  OK  ]       Cancel                         x       
  mqqq[ Press F1 for important information regarding disk geometry! ]qqqj

Create the Partitions. In my case I want to use the full disk:

A -> for Use entire Disk

then choose

W to save your settings, then Q to quit.

now quit sysinstall and start it again for disklabel.

Label

sysinstall

Go to:

Configure -> Label

Again, choose the disk. Then:

C for Create -> Size -> FS -> mountpoint (z.b. /database2)

W to save, then quit with Q and quit sysinstall.

Now, the new disk is available:

df
/dev/vtbd3s1d     20307084        8 18682512     0%    /database2

fstab

The only thing left is to put the new partition into fstab:

vi /etc/fstab
/dev/vtbd3s1d   /database       ufs     rw      2       2

Now, you’re done. The disk is now also available after a system reboot.

 

  • *

    You may use these HTML tags: <a> <abbr> <acronym> <b> <blockquote> <cite> <code> <del> <em> <i> <q> <s> <strike> <strong>

  • Comment Feed for this Post
Go to Top