Home
Help
Search
Login
Register
OPNsense Forum
»
Archive
»
19.1 Legacy Series
»
Secondary ZFS pool
« previous
next »
Print
Pages: [
1
]
Author
Topic: Secondary ZFS pool (Read 3783 times)
nullpointerninja
Newbie
Posts: 4
Karma: 1
Secondary ZFS pool
«
on:
February 04, 2019, 02:56:36 am »
Hello everyone! Sorry for the basic question but I'm new to OPNsense and tried searching everywhere and couldn't find an answer.
Is it possible to add a second HDD/SSD and create a secondary ZFS pool without OPNsense doing anything to the data in this pool?
I've been playing with OPNsense in VirtualBox and could add an extra HDD (identified as ada1) and could create a new zpool (
zpool create tank ada1
) but whenever I reboot, the pool is emptied (no files appear when browsing through ssh even though the USED field in the zfs dataset is not reset).
I know there's been lots of people in the past asking how to attach an extra HDD and sharing it via SMB/AFP (I only need SSH) and the answer has always been "it's not recommended", but I'm looking to use this as an extra backup pool in case my primary backup server dies, and I don't want to dedicate a Xeon + 8GB of ECC RAM
just
for my router/firewall.
Thanks!
Logged
franco
Administrator
Hero Member
Posts: 17665
Karma: 1611
Re: Secondary ZFS pool
«
Reply #1 on:
February 04, 2019, 11:28:04 am »
OPNsense will not touch your pools. It will do whatever is stated in /etc/fstab and that's it.
Cheers,
Franco
Logged
nullpointerninja
Newbie
Posts: 4
Karma: 1
Re: Secondary ZFS pool
«
Reply #2 on:
February 04, 2019, 03:32:21 pm »
Thanks for the quick reply Franco!
Will try to figure out what’s happening then. Maybe something going on with VirtualBox. Will try to replicate in real hardware.
Thanks!
Logged
nullpointerninja
Newbie
Posts: 4
Karma: 1
Re: Secondary ZFS pool
«
Reply #3 on:
February 05, 2019, 02:06:54 am »
Ok, didn't need to test outside VirtualBox
The pool was imported but for some reason exporting and then importing the pool made all files available again.
Maybe this is another stupid question but how can I make sure any pools are imported correctly at boot time and/or schedule a 'zpool export tank' followed by a 'zpool import tank' command on boot?
Thanks!
Logged
nullpointerninja
Newbie
Posts: 4
Karma: 1
Re: Secondary ZFS pool
«
Reply #4 on:
February 07, 2019, 02:50:50 am »
Since reading my previous post made me realize what a noob I was (less than one minute googling got me the answer), I'm here to help others in the same situation.
Any other zpools are indeed imported when booting, but at least in my case the datasets were not
mounted
, so I could see the path where it was previously mounted but no files from the dataset itself.
The solution was very (and I mean VERY) simple. Create a script in the /usr/local/etc/rc.syshook.d/start folder with
Code:
[Select]
#!/bin/sh
zfs mount tank
where tank is the name of the dataset to mount. After rebooting and seeing the dataset not mounted I remembered to add the execute bit
Code:
[Select]
chmod +x file
and then it worked.
Hopefully this helps someone out there!
Logged
Print
Pages: [
1
]
« previous
next »
OPNsense Forum
»
Archive
»
19.1 Legacy Series
»
Secondary ZFS pool