Expanding Disk Space on 4G Nano

  • I'm running pfSense on a m1n1wall from NetGate.  It has 256M RAM and 1.8G HDD (on a CF card).  I'm trying to install the Unix UniFi client on it using this (http://community.ubnt.com/t5/UniFi/Tutorial-UniFi-3-1-4-running-on-pfSense-2-1-RC/td-p/539534) as a reference, but when I load the support packages, I run into file system full errors and it ultimately fails.

    I'm trying to expand the file system.  I think I'm almost there, but pfSense is still only recognizing 1.8G.  Can anyone help me get it to recognize the 3.7G that I believe I have made available?  Here's what I've done so far.

    • I've installed the 4G Nano image on an 8G CF card.

    • Using gpart, I created a 3.7G partition for the non-active image of pfSense.

    • In the pfSense GUI under Diagnostics|NanoBSD, I duplicated the active pfSense slice to the new partition.

    • In the same section of the GUI, I switched the boot slice and rebooted.  pfSense comes up successfully on the new partition.

    • Using gpart, I expanded the original pfSense partition to 3.7G.

    • Because I'm told that gpart has issues in BSD v8.3, based on this post (http://unix.stackexchange.com/questions/117023/expanding-the-disk-size-on-pfsense-under-vmware-esxi), I edited the BSD Label to ensure the size of the slice was accurate.  As this post indicates, it was not originally accurate, but I updated it so that the size in the BSD Label file matches the results shown in gpart show.

    • I tried using growfs to grow the file systems.  When I try growfs /dev/ad0s1, I get 'superblock not recognized'.  When I try growfs /dev/ad0s1a, I get 'we are not growing (3844433->3844433)'

    I can successfully boot off of both pfSense partitions, but pfSense is still only recognizing 1.8G of space.

    When I do a gpart show, I get the attached screenshot.

    My concern is that the size of index 1 under both ad0s1 and ad0s2 being 3844433 (1.9G) is what's causing me the problem, but I can't figure out how to expand it into the open space immediately following.

    Anyone any thoughts?


  • Okay, I've made progress of a sort.  gpart resize -i 1 ad0s1 (or ads0s2 depending on which slice is not active) will grow the slice to the size I'm trying to hit.  Unfortunately, pfSense will not come up when I switch to the updated slice.  If I resize the slice and then duplicate the current slice to the resized slice using the GUI (Diagnostics|NanoBSD|Duplicate bootup slice to alternate), the process actually undoes the resizing I just did.  I suspect the procedure that does the duplication also controls the size of the slice as it duplicates.  I'm checking there next.

  • Giving up on this one.  Looks like they lock these down due to write cycle limitations on the CF card, so disk space is either on memory (by default and limited to 256M) or I can continue to try to hack my way into using the CF card as disk space and raise my risk of disk failure due to write cycle limitations.

    It was a fun experiment though.

  • I managed to get growfs to actually operate correctly without giving me a "Operation not permitted".
    Running 2.2.4 4G nano on 32 GB CF card

    I had to umount /dev/ufs/cf  . Once I did that I could run growfs with no error

Log in to reply