Can I increase the HDD of a FreeBSD server?

Before FreeBSD 10, it wasn't possible to resize the main partition. When you add more disk space to older versions of FreeBSD you have to create an extra partition and allocate the extra disk space to that partition. You can use standard FreeBSD tools (sysinstall) to add a new filesystem to the extra disk space and mount it somewhere on your system.

In FreeBSD 10, you can, however, increase the partition using gpart:

  • Check the partition table using gpart show vtbd0 - this will show you that the partitioning scheme is corrupt because it's not at the end of the disk.
  • Repair the partition table: gpart recover vtbd0
  • Resize the second partition (this is the data partition) using: gpart  resize -i 2 vtbd0
  • Check the partition table again using gpart show vtbd0, the second partition (freebsd-ufs) should now have the same size as your server's disk.
  • Increase the file system using growfs /
Was this article helpful?
5 out of 5 found this helpful



Article is closed for comments.

Articles in this section

See more