View Single Post
  #4   (View Single Post)  
Old 26th January 2017
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
Join Date: May 2008
Location: USA
Posts: 6,422

MBRs and the 2TB limit

The OpenBSD FAQ used to have a section on large drives, which has been removed when it went out-of-date (GPTs, 4K sector sizes) and was not being maintained. Here is the applicable procedure:
Originally Posted by Old OpenBSD FAQ
To use a disk larger than 2TB, create an OpenBSD partition on the disk using fdisk, whatever size fdisk will let you. When you label the disk with disklabel(8), use the "b" option to set the OpenBSD boundaries (which defaulted to the size of the OpenBSD fdisk partition) to cover the entire disk. Now you can create your partitions as you wish.
These instructions are for a drive which is dedicated to OpenBSD, though with care, one could create foreign MBR partitions that reside below the 2 TB limit. But for your use-case, which is multi-system, I would recommend using GPT.

GPTs and their partitions are managed with fdisk(8), in similar fashion to how MBR partitions are managed. The program can also create a GPT if it does not have one. See the -g option.

GPT provisioning

For your example use-case, you refer to "VFAT", which I understand to indicate FAT with long file names. If correct, I would use fdisk() to create two GPT partitions, one type 0C for FAT, the other type A6 for OpenBSD.

FAT32 is the largest FAT filesystem. FAT32 filesystem size is limited to 2TB, which fits your example, but individual files are limited to 4GB size, which might not meet needs.

Long names ("VFAT") will be used by default on OpenBSD if any are on the drive when mounted. You can mount_msdos(8) an empty filesystem with -l to ensure long file names are used when files are first created.

FFS and FFS2

Your example showed a 2.5TB FFS filesystem. When formatted, this would actually be FFS2, as FFS is limited to 2TB. The newfs(8) program formats both, and switches automatically to FFS2 for filesystems larger than 2 TB.

Note that FFS2 cannot be used for booting. Should you want to use this drive as an OpenBSD boot device, consider a small FFS partition for this purpose. Booting GPT requires an EFI boot partition and hardware that boots EFI. The GPT initialization performed by fdisk() can optionally create an EFI boot partition.

Last edited by jggimi; 27th January 2017 at 01:04 AM. Reason: added mention of boot partition, then correct the wording. :(
Reply With Quote