PfSense squid on USB SSD

  • I am thinking of firing up squid on pfSense VM and placing squid's cache_dir on the SSD I happen to have lying around.

    However, even though I added the USB xHCI controller to the VM and attached USB SSD as host device during pfSense installation, these are the only two partitions pfSense sees (see image).
    I also couldn't find any mention of usb with dmesg | grep usb , so I surmise usb hadn't been successfully detected.

    Can you provide some clues or perhaps reasons why I shouldn't do this at all? Thanks.

  • You will destroy your thumbdrive…  If its a thumbdrive.

    Some SSD will survive fine though, depending on the ssd.

    USB 2 is slow.

  • Really? Due to read/write cycles? I was afraid it might come to that.

    So what do you recommend - setting up a separate proxy VM and then somehow hooking that up with pfSense (any links that would explain the procedure?) or is it easier to set it up on pfSense box (I should still add another cache_dir drive to pfSense and add it as another mount point - how differently is that done in pfSense when compared to plain Linux)?

    EDIT: It's an USB 3.0 drive - this guy: It's supposed to be very reliable (it even identifies itself as an SSD instead of USB flash drive) - of course, overprovisioning and nand quality on this type of device is difficult to determine exactly. I am willing to give it a go, though.

  • I can not say how well a MLC SSD will work, but I'd bet on accelerated failure due to lack of TRIM with USB.

    There is a drive that I know for sure won't break under that use, because I've got 5 of them running forever now without TRIM and they just keep working.

    They are slower than the latest drives but take a beating.

    You might also try other drives recommended by other people have have been running without trim for extended periods successfully.

    If you have a working usb3 port its not bad.

  • Yeah - You will destroy that thumbdrive.

    I have one of those old samsung drives in a usb3 housing and those don't quit.

    They are only about half as fast though.

    Perhaps someone also has another more recent drive that they KNOW will take the abuse of being on a usb interface?

    I have only used these…  Because they haven't ever let me down yet.

  • Well, I have a local HDD handy as well - an old 1 TB Samsung Spinpoint, already attached as VM datastore.

    Do you recommend I attach it to pfsense and make squid use it or should I have a dedicated proxy machine?

  • Well  -I'd attach it directly to pfsense.  Because I am a simple minded person.  haha.

    I doubt you need 1TB though.

    But if the 1TB  drive is already attached, use it.  Why not?

    Probably no need to run a separate dedicate machine.

  • The only reason is - I am not familiar with freeBSD, don't know exactly how to attach the drive and wouldn't want to ruin the installation.

    I'll think of something, though - thanks.

  • Good luck.

Log in to reply