Wow, thanks for the post, I discovered a page I had never seen before !
;-)
1st your manual startup :
there is a patch in the current version to automatically unmount
everything whatever happens, even if the directories are busy and even
if there are inherited datasets (like /home and /home/manu for example).
But sorry I am not sure if it has been merged in 0.6.0 or 0.6.1. To
check for that : compile with scons debug=2, run zfs-fuse -n to see the
messages, then zfs mount -a, and then type ctrl-c in the window running
zfs-fuse, if you see "unmounting" messages for all the datasets, then
the patch is merged.
(if you don't get the message, don't worry, there is still a journal and since you were not doing any heavy write operation, you won't loose anything, but it's safer to have this patch anyway).
So to comment the points on this page :
-Unset the
LANG
environment variable. Failure to do so will
cause ZFS-FUSE to hang if your
/usr
is on ZFS.
Well I never did that, but I don't mount my /usr as zfs neither. It seems weird though and if this bug is confirmed I'll have to investigate !
- Immunize ZFS-FUSE against the OOM killer. If you don't, then it's very
likely that your kernel will kill ZFS-FUSE as soon as things get tight
-- and this is something you definitely do not want.
The listing
below contains code to do just that.
-> bad idea, the oom killer kills a task which is eating way too much memory, it's much safer to use some parameters to limit the memory usage. I have never used such a thing neither (and zfs-fuse was never killed by the oom killer neither). Notice that if you have a large enough swap partition you'll never hear about the oom killer anyway.
- Remove limits. If you don't remove the limits, ZFS-FUSE will either
hang and spin, or consume an inordinate amount of memory (close to
two
gigabytes).
-> a long time ago you had to make some adjustements like that if you were running a 32 bits system because of the stack size for the threads. Normally it's totally fixed now, I am running a version on a 32 bit laptop (not very often), and I don't use any of these limits. You can set ulimit -c unlimited if you think you'll have a core file though, but it's only for debugging and in very special circumstances, usually there is no core file !
I got my init.d zfs-fuse file from a very old debian package for version 0.4 of zfs-fuse, and never upgraded it since then, maybe I should try to see if there were some interesting updates since then, but it works fine for me... The only important change I made inside is to add
zfs share -a just after zfs mount -a.
But in 0.6 you don't have sharenfs support, so it's useless.
Yes there are quite a few init scripts in the contrib directory and you should find what you need there.
--
zfs-fuse git repository :
http://rainemu.swishparty.co.uk/cgi-bin/gitweb.cgi?p=zfs;a=summary