SG1100 with external USB ZFS disk?
-
@hoopy This is probably not the best answer but you could run your command via the pfSense cron package.
-
Or a shellcmd at boot.
-
Please forgive me if I sound negative or ungrateful, but to my mind these answers are analogous to me asking "My check-engine light on! How can I fix my car?" and getting the response "simple, just disconnect the check-engine light".
Another solution, probably more appropriate for me, would be: "just don't reboot (very often)".pfSense's root file system is ZFS and pfsense manages to remount it after reboots without any problems. Surely there has to be a "proper" way to re-mount non-root ZFS pools, without using the
-f
, "ignore any errors and just do it", flag?!By the way, in case someone suggests I should ask an AI... I just did and, as expected, it spewed out a page and a half of useless standard text, however, it did mention that "on pfSense, you can set a static hostid by adding the following line to
/etc/rc.conf
:sysctl kern.hostid=<desired static hostid>
For me, this sounds like the same approach from a different angle, and there was no mention of possible side effects or other consequences. (See also: random number - xkcd)
I have found no documentation from Netgate regarding the use of external storage. Perhaps this could be a "feature" waiting for one of the next versions?
-
@hoopy said in SG1100 with external USB ZFS disk?:
I have found no documentation from Netgate regarding the use of external storage.
Because it's not supported.
pfSense doesn't use the FreeBSD rc system and has no functionality to add additional drives for use by the system. Other users have done it. There are various threads discussing it. Generally some custom scripting etc. -
@stephenw10 thank for clarifying that.
So I'll just write
zpool import -f -a
on a sticky note and stick on the box - I usually only reboot after installing an update :-) -
Ha, well I guess that would work. But adding it as a shellcmd would also.
https://docs.netgate.com/pfsense/en/latest/development/boot-commands.html#shellcmd-option
-
@stephenw10 thanks for the tip!
I'd call this thread closed / solved now. -
What about these thoughts :
ZFS is a, what I call it, a high end file system.
It creates a lot of reads & writes to the filesystem, which is attached be a rather slow connection : the USB.
Why not using a less sophisticated file system like ext4 or ufs, or even ms-dos for your USB drive ?
You have more "speed" and be able to remove the USB drive and access it with some other device ! -
@Gertjan considering that I'm only intending to collect tcpdump logs, you're probably right about using a less sophisticated file system. If I run into problems, I just might do as you suggest.
As for ZFS, I've been a fan and user of ZFS since around 2010, including running RAIDZ with 4 external USB disks - works just fine!
Performance has generally not been a problem, however,
over the years I've had plenty of hardware disk failures but never actually lost any data (due to either RAIDZ or "copies=2" when only 1 disk is available, besides backups). That, combined with a CLI which is far easier to comprehend and remember are the two main reasons why everything else just feels... half-baked :-)Hopefully this discussion might help someone else in a similar situation.
Cheers
-
Cron job @reboot the mount commands