Will Freenas be OK with me mounting/unmounting secondary pool manually once every 24h?

guermantes

Patron
Joined
Sep 27, 2017
Messages
213
Hi,
I did not find anything on this subject in the documentation so I turn to the forum. Will I be shooting myself in the foot if I unmount a secondary pool each day? Will Freenas complain about it not being available or something or might it even affect my main pool which is up and running all the time? Will Freenas perhaps try to mount the pool again repeatedly? (I know there is an issue with not being able to unmount a pool while it is active, but I was thinking I could try my luck and see if this becomes a problem.)

This below is why I am asking:
I have a single drive constituting a pool of its own (bad English but I think you see what I mean). The purpose of this drive is to accept zfs send/recv issued by a bash script that runs every night, as a local backup in addition to my offsite backup (which can only be reached by taking the bus and fetching the drive in person). The drive in question is a WD Gold 7200 rpm and as such brings a bit more heat to the overall system, and runs 3-4 degrees C higher than the six WD Reds that constitute my main pool. The Gold (by sales pitch) should survive longer than my Reds if spinning all the time, but my concern is with the temperatures. I had found a sweet spot as regards fan noise and drive temps, but the Gold thwarts this a tad, and come summertime the WD Gold risks hitting 40 C even before the peak of summer. I would like to stay at the sweet spot if I can.

So I figured I could let the bash script unmount the drive after each successful backup and let the drive and rest before the script mounts it 23 hours later before zfs sending occurs again. My thinking is that the integrity of the data is checked by zfs in regards to my main pool where zfs is allowed to "do it's thing" all the time. I am also thinking that any possible corruption on the receiving drive would be alerted to me by error messages from zfs because if that happens incremental sending does not succeed due to said corruption. In this scenario the Gold drive would still be allowed to for be running when scrubs and SMART tests are to be performed.

Are there reasons why I should stop thinking about this 'solution'?
 

Chris Moore

Hall of Famer
Joined
May 2, 2015
Messages
10,080
I am not trying to bash you but part of the reason you didn't find what you were looking for is that you were looking for the wrong words.
I would suggest reading through these documents to get some of the terminology:

Slideshow explaining VDev, zpool, ZIL and L2ARC
https://forums.freenas.org/index.ph...ning-vdev-zpool-zil-and-l2arc-for-noobs.7775/

Terminology and Abbreviations Primer
https://forums.freenas.org/index.php?threads/terminology-and-abbreviations-primer.28174/
I did not find anything on this subject in the documentation
From reading your request, I think the words you should be using are export the pool and import the pool and if you manually import a pool, you need to set the mountpoint but ZFS automatically mounts the directory structure, and unmounts it, when you import and export.
Look here at section 19.3.10. Importing and Exporting Pools on this page:
https://www.freebsd.org/doc/handbook/zfs-zpool.html
come summertime the WD Gold risks hitting 40 C even before the peak of summer
WD Gold drives are rated to 60 C. I have had to run close to that for almost three months when I had a failed supplemental cooling unit in my computer room. The temperature isn't likely to be a problem for that drive, but I understand wanting to keep the temperature down for the rest of the system.
So I figured I could let the bash script unmount the drive after each successful backup and let the drive and rest before the script mounts it 23 hours later before zfs sending occurs again.
If all you are doing is exporting the pool, it is not going to power the drive down, so it will still be generating heat. This may not provide any benefit.
Are there reasons why I should stop thinking about this 'solution'?
I would NOT say that you should stop thinking about it. Plenty of people on the forum do something like this to backup their system, but automation of the import and export of a pool is probably not a useful thing unless you are also going to develop a way to power the drive down.

There are a couple things that could be a problem if you want to be able to remove a pool / drive.

First, you don't want FreeNAS to configure swap space on this drive if you will be taking it out of the system, even if you just power the drive down without physically removing the drive.
Have a look at the System > Advanced tab, see documentation here:
https://www.ixsystems.com/documentation/freenas/11.1/system.html#advanced
On this tab, you will need to set swap size to zero instead of the default size of 2.

Somewhere along the way, writing my response, I lost the other point I was going to share. Perhaps I can think of it later.

---------------------------
PS: This is where they cover the command zfs set mountpoint which you will also need to do at least once:
https://www.freebsd.org/doc/handbook/zfs-quickstart.html

Usually, the pool remembers the mountpoint after it is set, but you can't count on that with FreeNAS.
 
Top