# Adding disks in FreeBSD 9.0



## alexx (Jun 15, 2012)

Hi,

It seems the FreeBSD handbook's chapter on adding disks http://www.freebsd.org/doc/handbook/disks-adding.html is outdated. Should I be using sysinstall? I thought it's not meant to be used anymore. Could someone clarify the intention of mixing two installers in FreeBSD 9.0? 

The part that describes 'command line utilities', still uses fdisk, bsdlabel, etc. which are also outdated. 

Since I needed to add a disk, I was looking for a proper how-to. Luckily found this link: http://www.wonkity.com/~wblock/docs/html/disksetup.html#_the_new_alternate_method_tt_gpart_8_tt, but it was more than I needed.

I wanted to add a disk with UFS on it, one single partition (disk for data). The complication is that it is also an 'Advanced Format' thing (WD drive), that needs 4k alignment (it still says 512KB to the system though!).

So I've done it like this:


```
black# gpart create -s gpt ada1
ada1 created
black# gpart add -t freebsd-ufs -l wd750rootfs -a 4k ada1
ada1p1 added
black# gpart show
=>        34  1465149101  ada1  GPT  (698G)
          34           6        - free -  (3.0k)
          40  1465149088     1  freebsd-ufs  (698G)
  1465149128           7        - free -  (3.5k)
```

Did I do it right? Instead of a '-b 1M' option suggested in the link above, I've used '-a 4k'. Is it sufficient to get the drive properly aligned?

Thanks!


----------



## wblock@ (Jun 15, 2012)

Yes, that chapter of the Handbook is outdated.  I posted a message about that not too long ago to the freebsd-doc mailing list: http://lists.freebsd.org/pipermail/freebsd-doc/2012-June/019975.html.

We always need more people working on documentation.  If you'd like to update that section, please do.  Let me know if you need help.

Your procedure and alignment are correct.  Starting a filesystem at 1M is not required, even when booting from that disk.  It's a semi-standard, and works for disks and SSDs alike, since 1M is evenly divisible by both 4K and 128K.


----------

