Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

So, I've been told that ZFS for Linux has the ability to automatically mount a zpool on system startup in Ubuntu 12.04, but it doesn't work for me and I can't find any documentation on how to make it work.

I have a 5 disk raidz zpool mounted at /zstorage. Currently, when my server starts, I have to type sudo zfs mount zstorage in order to get it to be accessible, which is a bit of an issue as I have a number of programs that start automatically and look for folders in there.

In the case of on, SabNZBD+, if it doesn't find the folders it needs it will revert to the default. This is especially a problem as the default folder is in a tiny SSD which is meant for nothing but as a boot volume.

share|improve this question
add comment

2 Answers

up vote 4 down vote accepted

If you are using zfs-fuse, just running the zfs-fuse init script on startup should do it. I have several computers with zpools on external disks and they are all mounted automatically on boot with zfs-fuse.

In particular, the init script contains the line

zfs mount -a

which mounts all available zfs filesystems. You could add this line to any zfs init scripts you have or put this line into the local init script.

share|improve this answer
    
I'm using 'ZFS on Linux': zfsonlinux.org –  dougoftheabaci Aug 8 '12 at 17:26
1  
Have you tried running zfs mount -a on startup? –  Lars Kotthoff Aug 8 '12 at 17:29
    
I imagine that would work but how do I automate it? Sorry, I should clarify, this is my first real experience with Ubuntu and I may have just dived in at the deep end. –  dougoftheabaci Aug 9 '12 at 18:05
    
The easiest way is probably to add the command to /etc/rc.local. Also see en.kioskea.net/faq/… –  Lars Kotthoff Aug 9 '12 at 18:21
    
Finally had a chance to give this a try. Works great. Thanks! –  dougoftheabaci Sep 11 '12 at 3:10
add comment

If you go to /etc/default/zfs that is where you'd set the flag to normally mount the ZFS volumes on startup but not anymore. As it states in the config-file mentioned above, what you could try is installing zfs-mountall with apt-get:

sudo apt-get install zfs-mountall

This should work, provided you have installed native ZFS and not zfs-fuse. More information is provided here: http://zfsonlinux.org/faq.html

share|improve this answer
    
Reading package lists... Done Building dependency tree Reading state information... Done Note, selecting 'mountall' instead of 'zfs-mountall' mountall is already the newest version. 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. –  dougoftheabaci Aug 15 '12 at 4:30
    
Any progress on this for you? I've just installed Ubuntu 11.10 instead (didn't like 12.04) and what I did was install zfs, create the mountpoint, change permissions on the mountpoint to 777, import my zpool, checked that it mounted correctly with sudo zfs mount -a, rebooted and ran sudo apt-get update && sudo apt-get upgrade. The mountall package was then updated with zfs and my zpool now mounts on startup. I don't know why it doesn't work for you, but the process above worked for me. –  Henric Sep 2 '12 at 14:53
    
It might be a 12.04 issue. What are the benefits of using 11.10 vs. 12.04? I could possibly reinstall 11.10 instead of 12.04 (seems things support it a bit better right now) but it's a bit of a whole to-do as I'd need to borrow a screen from work. –  dougoftheabaci Sep 4 '12 at 17:41
    
There was a couple of reasons why I chose to install 11.10 instead but the main one is that I simply couldn't get unity-2d to work which I need for VNC (unity 3d doesn't update over VNC). Since my machine is headless it's something I really need. I also found 11.10 to be a lot faster for what I use it for (iTunes server in Windows XP virtualbox, file server, web server etc.). I can't point to any specific benefits as this is just what I experienced. I do think that support is better for 11.10 so that might be a reason to change. –  Henric Sep 4 '12 at 20:31
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.