create new tag
view all tags

MucuraFS deployment instructions


The purpose of this page is to document the necessary steps to deploy MucuraFS on a Linux machine. MucuraFS is a software tool to expose cloud-based storage through a file system interface.

In principle, you can use MucuraFS in your Linux machine without requiring root privileges. However, MucuraFS requires FUSE and some Linux distritbutions restrict the users authorized to mount FUSE-based file systems.

Below you will find the instructions to deploy a shared installation of MucuraFS in a Linux machine so that all the processes on that machine can access the files exposed by the synthetic file system by mounting it only once.

Create an unprivileged user account

In this step we create an unpr ivileged user account. MucuraFS will run under the identity of this user account. We will name it 'mucura' (belonging to group 'mucura') but you can choose whatever you want.

Create system group mucura:

/usr/sbin/groupadd -r mucura

Create system account mucura, belonging to group mucura and to supplementary group fuse:

/usr/sbin/useradd -r -m -g mucura -G fuse mucura

Create configuration file for MucuraFS

MucuraFS needs a configuration file to tell it what cloud storage server to contact and what credentials to use. In this section we create such a file in the $HOME directory of the account created in the previous step.

mkdir ~mucura/conf ~mucura/bin
touch ~mucura/conf/bes3.conf
chown mucura.mucura ~mucura/conf/bes3.conf
chmod go-rwx ~mucura/conf/bes3.conf

The contents of the file ~mucura/conf/bes3.conf is as shown below:

type    = "Swift"
auth_url  = "https://fsc.ihep.ac.cn:8443/auth/v1.0"
user    = "HereWePutTheUserName"
password  = "HereWePutThePassword"
dir_name  = "randomtrg"
containers = [ "round02", "round03", "round04", "round05", "round06" ]  

NOTE: this file contains the credentials to use to access the files in the cloud storage server. This file must be protected and only readable by the unprivileged user (mucura, in this case).

Configure autofs

A MucuraFS synthethic file system can be automatically mounted by using autofs. Here you will find instructions on how to configure it for MucuraFS to be automounted. You need to execute these commands as root:

Add the line below to the file /etc/auto.master:

/mucurafs file:/etc/auto.mucurafs --timeout 300

This line tells autofs that all the directories under the path /mucurafs will be managed by MucuraFS using the configuration in file /etc/auto.mucurafs.

Create file /etc/auto.mucurafs with the contents composed of the single line below:

bes3 -fstype=mucurafs,ro :/home/mucura/conf/bes3.conf 

This configuration file tells MucuraFS to expose the directory /mucurafs/bes3 as a file system. The configuration file for this file system is located at /home/mucura/conf/bes3.conf.

Install MucuraFS binaries

The executables composing MucuraFS can be found on AFS under ~fabio/public/mucura. Copy them to their destination:

cd /afs/ihep.ac.cn/users/f/fabio/public/mucura
cp ./mucurafs ./mucurafs.automounter ~mucura/bin
chmod a+rx ~mucura/bin/mucura*

chown mucura.mucura ~mucura/bin/mucura*
cp ./mount.mucurafs /sbin/mount.mucurafs
chmod a+rx /sbin/mount.mucurafs
chown root.root /sbin/mount.mucurafs

Restart autofs

The first time you configure MucuraFS to be used by autofs you need to restart the service:

service autofs restart 

Testing your installation

In order to verify that your deployment is working, just list one of the directories under /mucurafs/bes3, for instance:

ls -l /mucurafs/bes3/randomtrg 


If you observe problems with your installation, see your system log file, typically /var/log/messages for errors. MucuraFS sends error and diagnostic messages to the system log.

-- FabioHernandez - 2014-05-13

Topic revision: r1 - 2014-05-13 - FabioHernandez
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2022 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback