How to add unused space to an existing install

Warren Block wblock at
Wed Feb 6 21:33:51 UTC 2013

On Wed, 6 Feb 2013, Polytropon wrote:
> On Wed, 06 Feb 2013 11:58:56 -0600, Paul Schmehl wrote:
>> When I try to create a new slice using fdisk, it doesn't seem to work.  If
>> I move to the label editor, I get this:
>>  FreeBSD Disklabel Editor
>> Disk: mfid0     Partition name: mfid0s1 Free: 0 blocks (0MB)
>> Part      Mount          Size Newfs   Part      Mount          Size Newfs
>> ----      -----          ---- -----   ----      -----          ---- -----
>> mfid0s1a  <none>       2000MB *
>> mfid0s1d  <none>      65536MB *
>> mfid0s1e  <none>       4096MB *
>> mfid0s1b  swap        65536MB SWAP
>> mfid0s1f  <none>      10240MB *
>> mfid0s1g  <none>        601GB *
>> As you can see mfid0s1g is 601GB, and according to fstab that's /var.
>> Yet df -h shows:
>> # df -h
>> Filesystem       Size    Used   Avail Capacity  Mounted on
>> /dev/mfid0s1a    1.9G    726M    1.0G    41%    /
>> devfs            1.0k    1.0k      0B   100%    /dev
>> /dev/mfid0s1e    3.9G     38M    3.5G     1%    /home
>> /dev/mfid0s1d     62G    6.6M     57G     0%    /tmp
>> /dev/mfid0s1f    9.7G    7.5G    1.4G    84%    /usr
>> /dev/mfid0s1g    582G     39G    496G     7%    /var
>> So apparently I'm not creating this new slice?  It should be /dev/mfid0s1h,
>> correct?
> If you're creating a new slice, that would be mfid0s2, because
> mfid0s1 is the 1st slice ("DOS primary partition") carrying the
> partitions a, swap, d, e, f, g. If I remember correctly, h is
> the last partition letter that can be assigned, so this one
> should be available.
> Problem: The 1st slice mfid0s1 is already of fixed size, so
> you cannot add a new partition here without growint that
> slice first. Attention, that step isn't free of danger and
> should be done with a backup at hand, just in case, and
> because you _always_ need a backup. :-)
> This problem is not a problem if you create a 2nd slice
> mfid0s2 to use it separately.
> If you can _really_ create mfid0s2 as a slice, you only need
> to format it, e. g. "newfs -U /dev/mfid0s2" which creates
> mfid0s2c which in turn is called mfid0s2). You can then assign
> that new partition (the one covering the whole slice) to
> a new mountpoint, e. g. /data, /stuff or whatever you want.

Yes, but creating FreeBSD partitions inside that slice allows them to be 
aligned.  That may not be a problem on these 1T drives, some 1T drives 
have 512-byte blocks.  Or the slow misaligned speed might be disguised 
by the slow RAID5 speed...

fdisk and bsdlabel always align to fictional CHS values.  gpart can 
align FreeBSD partitions.

More information about the freebsd-questions mailing list