Other Anyone use UnionFS?

I'm trying to mount several different partitions at a single folder. I installed a package sysutils/fusefs-unionfs but it won't work without root permissions. I set sysctl vfs.usermount=1
like it said to do, but it still won't let me do it.

What is the proper way to get this set up at boot? I don't know how to run a command at boot if it needs root access. Can I add it to fstab() somehow?

Also what is the difference between using unionfs and mount_unionfs? The latter is available without installing any extra package. I assume mount_unionfs is in kernel space. Can it be automated with fstab()? I read the man page but there's nothing in there about it.

I added myself to the operator group and now it spits out one extra error message, just for good measure.
Code:
HTPC➜  ~  ᐅ  sudo sysctl vfs.usermount=1
Password:
vfs.usermount: 1 -> 1
HTPC➜  ~  ᐅ  unionfs -ocow -oallow_other /mnt/WDPurple10TB temp
mount_fusefs: /dev/fuse on /usr/home/htpc/temp: Operation not permitted
fuse: failed to mount file system: Permission denied
HTPC➜  ~  ᐅ  sudo unionfs -ocow -oallow_other /mnt/WDPurple10TB temp
HTPC➜  ~  ᐅ  ll temp
total 24
drwxr-xr-x  1 htpc  wheel    13K Dec  5 19:23 movies
drwxr-xr-x  1 htpc  wheel   512B Nov 19 22:19 tv
 
Also what is the difference between using unionfs and mount_unionfs? The latter is available without installing any extra package. I assume mount_unionfs is in kernel space.
mount_unionfs(8) is part of the base OS, unionfs(8) is a FUSE add-on.

Setting vfs.usermount requires it to be done at boot, before your user logs in. You can't really set this "on-the-fly". Add it to /etc/sysctl.conf and reboot.

But I recommend not using any of them actually. They're not that stable, definitely read the warning on mount_unionfs(8):
Code:
THIS FILE SYSTEM TYPE IS NOT YET FULLY SUPPORTED (READ: IT	DOESN'T	WORK)
     AND USING IT MAY, IN FACT,	DESTROY	DATA ON	YOUR SYSTEM.  USE AT YOUR OWN
     RISK.  BEWARE OF DOG.  SLIPPERY WHEN WET.	BATTERIES NOT INCLUDED.
 
Hmm. I actually did add it to /etc/sysctl.conf and rebooted. Still no dice (no pun intended).

I don't technically need it. It's just a convenience thing. I could always just use it just for reading and then use the individual mount points for writing.
 
I could always just use it just for reading and then use the individual mount points for writing.
You might want to have a look at nullfs(5). That works really well, for read-only and read-write. I use it quite a lot to mount shared data into different jails but can be used for all sorts of purposes.
 
Back
Top