The FUSE client allows to access EOS as a mounted file system.
There a two FUSE client modes available:
daemon user description eosd !root An end-user private mount which is not shared between users eosd root A system-wide mount shared between users
The end user mount supports the strong authentication methods in EOS:
The shared mount supports these authentication methods only in the CITRINE branch.
You can mount an EOS instance using the EOS client:
# mount my EOS instance to /home/user/eos
eos fuse mount /home/user/eos
You can unmount an EOS instance using:
# unmount my EOS instance from /home/user/eos
eos fuse umount /home/user/eos
Note
The mount point can be given as an relative or absolute path!
Warning
The mount point has to be a non-existing or an empty directory!
The authentication method is proposed by the EOS server and the client evaluates the server list until it finds a matching one. You can test the used authentication method using (see the authz: field):
[eosdevsrv1]# eos -b whoami
Virtual Identity: uid=755 (99,3) gid=1338 (99,4) [authz:krb5] sudo* host=localhost.localdomain geo-location=513
If the filesystem is mounted you can validate the same information using:
[eosdevsrv1]# cat /home/user/eos/<instance>/proc/whoami
In case of troubles you can find a log file for private mounts under /tmp/eos-fuse-<uid>.log. If you run the single user mount as root, you find the log file in /var/log/eos/fuse/fuse.log
The shared FUSE mount currently support two authentication modes
Only one authentication mechanism can be used with a single shared mount and it is specified using the configuration entry EOS_FUSE_USER_KRB5CC mentioned above.
Each machine running a shared FUSE mount has to be configured as a gateway machine in the MGM:
vid add gateway fusehost.foo.bar unix
It is also possible now to add a set of hosts matching a hostname pattern:
vid add gateway lxplus* sss
vid remove gateway fusehost.foo.bar unix
To improve security you can require sss (shared secret authentication) instead of unix (authentication) in the above commands and distribute the sss keytab file to all FUSE hosts /etc/eos.keytab.
Enabling and configuring strong authentication is done using config keys EOS_FUSE_USER_KRB5CC, EOS_FUSE_USER_USERPROXY and EOS_FUSE_USER_KRB5FIRST (see above).
Each linux session can be bound to one credential file. A same user can access the fuse mount using multiple identities using multiple instance. To bind the current linux session to a credential file, the user has to use the script eosfusebind
The following command line
eosfusebind krb5 [credfile]
tries to find a krb5 credential cache file in the following order, stopping at the first match - optional credfile argument if specified - environment variable KRB5CCNAME - default location /tmp/krb5cc_<uid>
The following command line
eosfusebind x509 [credfile]
tries to find a x509 user proxy file in the following order, stopping at the first match - optional credfile argument if specified - environment variable X509_USER_PROXY - default location /tmp/x509up_u<uid>
Warning, eosfusebind does not check that the credential file is valid. It only checks it exists and has 600 permissions. The actual authentication is carried out by the fuse mount. Every time a new binding is made, all bindings from any terminated sessions (for the current user) are cleaned-up. Binding an already bound session replaces the previous binding.
It is possible to show the bindings for the current session or the current user with the following commands
eosfusebind --show-session
eosfusebind --show-user
It is possible to unbind a given session or all the session of the current user using the following command
eosfusebind --unbind-session
eosfusebind --unbind-user
If the process tries to access the fuse mount and if its session is not bound to a valid credential file, access will be refused.
The configuration entry EOS_FUSE_RMLVL_PROTECT defined above allow to enable this protection. This will deny any deletion to an ‘rm -r’ command starting from the top level directory of the fuse mount down to the specified depth.
For instance, if eos is mounted in /eos and if EOS_FUSE_RMLVL_PROTECT=3, then:
The rule currently implemented is the following one:
The fuse mount will deny any removal coming from a command named rm with one of the short option(s) being r or one of the long option(s) being recursive if one of the non optional arguments is a path located under the mountpoint at a depth lower than the value specifed by EOS_FUSE_RMLVL_PROTECT.
If you have a defined FUSE instances and can manage them with the eosd service scripts, you use a mount wrapper to define mounts in /etc/fstab or mount manually.
Note
You should make sure that you don’t have eosd as a persistent service: /sbin/chkconfig –del eosd
To mount myinstance to the local directory /eos/myinstance you can write:
# mount
mount -t eos myinstance /eos/myinstance
# umount
umount /eos/myinstance
To define a FUSE mount in /etc/fstab you add for example:
myinstance /eos/myinstance defaults 0 0
If you want to use autofs, you have to create a file /etc/auto.eos :
myinstance -fstype=eos :myinstance
Add to the file /etc/auto.master at the bottom:
/eos /etc/auto.eos
For convenience make sure that you enable browsing in /etc/autofst.conf:
browse_mode = yes # this lets you see the mountdir myinstance in /eos/ as /eos/myinstance/. Once you acces this directory it will be automatically mounted.
Note
Enable autofs with service autofs start
To export FUSE via NFS4 you have to disable(shorten) the attribute caching in the FUSE configuration file:
export EOS_FUSE_ATTR_CACHE_TIME=0.0000000000000001
If you mount an instance as /eos you have to configure an NFS export like this in /etc/exports:
/eos *.cern.ch(fsid=131,rw,insecure,subtree_check,async,root_squash)
You have to start/reload your nfs4 server and then you should be able to access the NFS volume using
mount -t nfs4 <server> <localhost>
To export FUSE via Samba you have only to enable a mode overlay to avoid messages about permission problems during browsing in the FUSE configuration file:
export EOS_FUSE_MODE_OVERLAY=077
The rest of the CIFS server configuration is idential to a local filesystem Samba export.