Can I create an own dataset on freenas-boot?

Status
Not open for further replies.

ElGusto

Explorer
Joined
Mar 19, 2015
Messages
72
Hello!

I'm using the sasidle script for making my hard drives sleep.
But I don't know where I could store the script for keeping it persistent trough updates.
Are there any places in the default tree, where I could safely store a little script? From what I've seen it seems that the whole tree is being mounted from the current FreeNAS update, so this would revert any changes I made anywhere, wouldn't it?

So, since FreeNAS now has an own pool (freenas-boot) I thought I could maybe create an own dataset on this pool and use it for storing the script or other little patches.

Would this be fine or are there any possible complications by updates or other reasons?
And what would be the best way to achieve this?
I'm not experienced with ZFS commandline, but I tried simply creating a pool and it worked so far - but the filesystem wasn't automatically mounted as the manual at oracle says.
So what would be the best way for creating and mounting such a dataset persistently?
Thank you! :)
 
D

dlavigne

Guest
Can you not just make a cron job (using the GUI) to run your script? That will survive upgrades and it doesn't matter where the script lives as you specify the full path in the cron job.
 

ElGusto

Explorer
Joined
Mar 19, 2015
Messages
72
Hello!

Thank you for the answer, but there is a missunderstanding:
I don't know where to save the script file itself, so it will safely survive reboots and updates.
I got no problem in running the script, once it's there.

Obvioulsy I can't put it onto my z2pool, because that would make the hard disks leave idle once the idle script is being executed, thus making hd sleep impossible.

So i either need to find a persistent path within the existing freenas-boot dataset, or create another dataset on the boot pool.
 

INCSlayer

Contributor
Joined
Apr 4, 2015
Messages
197
i have some stuff in /root/ that survives on reboots.
 

ElGusto

Explorer
Joined
Mar 19, 2015
Messages
72
Did it also pass some system updates, yet? I'm so unsure, because mount tells me:

[root@freenas] ~# mount
freenas-boot/ROOT/FreeNAS-9.3-STABLE-201508250051 on / (zfs, local, noatime, nfsv4acls)

So besides some special folders it seems that the whole / tree is just a mountpoint for the current patch version. Doesn't the content I change within FreeNAS-9.3-STABLE-201508250051 for example get lost with the next update?
 

INCSlayer

Contributor
Joined
Apr 4, 2015
Messages
197
il admit i havent checked since the latest update and im not at home so i cant check atm
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,525
/root and /data are relatively safe. But definitely keep a backup copy of your script somewhere in case it is deleted on an upgrade. :)
 
Status
Not open for further replies.
Top