FreeBSD Partitions and Filesystems With GPART
FreeBSD Partitions and Filesystems With GPART
The Problem
Installing FreeBSD 8.x on a machine with two disk volumes of 100GB and slightly more than 3TB. The quantity of cylinders on the 3TB volume is greater than the 65,535 cylinders supported by bsdlabel. Therefore, the filesystem does not consume the total available disk space.
This is resolved by installing and implementing gpart. I won’t go into the procedure here as Warren Block blogs on this topic very well at http://www.wonkity.com/~wblock/docs/html/disksetup.html
Installing gpart
GPART is easily installed from FreeBSD.org package repos using pkg_add(1) as follows:
# pkg_add -r gpte
It may also be installed from ports by executing the following:
# cd /usr/ports/sysutils/gpte # make install clean
Disclaimer
This blog is posted for informational purposes only. Extensive testing is recommended prior to implementing changes discussed here.
Thanks to Julien Cigar for pointing out that gpart is in FreeBSD 8.x base!
Would like to add that I’ve experimented with adding gpart to the boot_crunch file in mfsroot.gz to layout the disk during install. Each test scenario resulted in sysinstall erroring citing no disks were found.
If someone else has gotten this to work, a comment here about the experiment would be great!
It’s really not ‘gpart’ you need to get past the 2TB bsdlabel issue, its the GPT partitioning. ‘gpart’ is the tool. ‘bsdlabel’ is IMO a much better interface. And with the MBR partitioning scheme you can install the /boot/boot0 loader which gives you boot time selection of what you want to boot. I’ve not seen the equivalent for GPT from FreeBSD.