[squid-users] Cache pfSense fix
Jonathan Lee
jonathanlee571 at gmail.com
Mon Jan 12 23:04:26 UTC 2026
I think I did this correctly
https://github.com/squid-cache/squid-cache.github.io/pull/45
Add pfSense NVMe cache overlay documentation by JonathanDLee24 · Pull Request #45 · squid-cache/squid-cache.github.io
github.com
> On Jan 12, 2026, at 14:02, Jonathan Lee <jonathanlee571 at gmail.com> wrote:
>
> Sure thing I have a better version to add to it
> Sent from my iPhone
>
>> On Jan 12, 2026, at 08:51, Amos Jeffries <squid3 at treenet.co.nz> wrote:
>>
>> Nice. Thank you.
>>
>> Would you mind adding this to the Squid wiki?
>>
>> IMO it should go as a new file in this part of the wiki repository:
>> <https://github.com/squid-cache/squid-cache.github.io/tree/main/docs/ConfigExamples/Caching>
>>
>> (you can use the existing WindowsUpdates page there as an example/template layout to match the rest of the ConfigExamples section).
>>
>>
>>
>> Cheers
>> Amos
>>
>>> On 10/01/2026 09:07, Jonathan Lee wrote:
>>> Great find
>>> pfSense Squid Cache on NVMe (Persistent Across Reboots)
>>> ======================================================
>>> Goal:
>>> -----
>>> Use an existing directory on an already-mounted NVMe drive
>>> as Squid’s cache, while satisfying pfSense’s requirement
>>> that the cache live under /var/squid.
>>> This method:
>>> - Works across reboots
>>> - Survives pfSense & Squid upgrades
>>> - Does NOT use symlinks (which do not work)
>>> - Does NOT destroy existing data on the drive
>>> --------------------------------------------------------
>>> Prerequisites:
>>> --------------
>>> - NVMe drive already mounted (example: /nvme)
>>> - Existing cache directory on the drive:
>>> /nvme/LOGS_Optane/Squid_Cache
>>> - Squid package installed
>>> --------------------------------------------------------
>>> Step 1: Create the mount point under /var/squid
>>> ------------------------------------------------
>>> (Only creates an empty directory if it doesn’t exist)
>>> mkdir -p /var/squid/cache
>>> --------------------------------------------------------
>>> Step 2: Bind-mount (nullfs) the existing directory
>>> --------------------------------------------------
>>> (This makes the NVMe directory appear inside /var/squid)
>>> mount_nullfs /nvme/LOGS_Optane/Squid_Cache /var/squid/cache
>>> NOTE:
>>> - No data is moved or copied
>>> - Existing cache contents are used directly
>>> --------------------------------------------------------
>>> Step 3: Make the mount persistent (IMPORTANT)
>>> ------------------------------------------------
>>> pfSense GUI:
>>> 1. Go to:
>>> System → Advanced → fstab
>>> 2. Click "Add"
>>> 3. Set the following:
>>> - Type: nullfs
>>> - Device: /nvme/LOGS_Optane/Squid_Cache
>>> - Mount point: /var/squid/cache
>>> - Options: rw
>>> 4. Save
>>> 5. Apply Changes
>>> --------------------------------------------------------
>>> Step 4: Configure Squid to use the new path
>>> -------------------------------------------
>>> pfSense GUI:
>>> Services → Squid Proxy Server → Local Cache
>>> Set:
>>> Cache directory:
>>> /var/squid/cache
>>> Save and restart Squid.
>>> --------------------------------------------------------
>>> Step 5: Verify
>>> --------------
>>> Check that the mount is active:
>>> df -h | grep squid
>>> mount | grep nullfs
>>> You should see the NVMe filesystem mounted at:
>>> /var/squid/cache
>>> --------------------------------------------------------
>>> Behavior After Reboot:
>>> ----------------------
>>> - Mount persists across reboots
>>> - pfSense package manager no longer complains
>>> - Squid cache cleanup works normally
>>> - No manual remounting required
>>> --------------------------------------------------------
>>> Important Notes:
>>> ----------------
>>> - Symlinks do NOT work (pfSense resolves real paths)
>>> - nullfs is the correct and supported workaround
>>> - MSDOS/FAT filesystems work but are not ideal long-term
>>> - UFS or ZFS is recommended if you ever reformat
>>> --------------------------------------------------------
>>> End of file
>>> Sent from my iPhone
>>> _______________________________________________
>>> squid-users mailing list
>>> squid-users at lists.squid-cache.org
>>> https://lists.squid-cache.org/listinfo/squid-users
>>
>> _______________________________________________
>> squid-users mailing list
>> squid-users at lists.squid-cache.org
>> https://lists.squid-cache.org/listinfo/squid-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squid-cache.org/pipermail/squid-users/attachments/20260112/ff7dd0c6/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 45.png
Type: image/png
Size: 137279 bytes
Desc: not available
URL: <http://lists.squid-cache.org/pipermail/squid-users/attachments/20260112/ff7dd0c6/attachment-0001.png>
More information about the squid-users
mailing list