# user(s)112
# project(s)50
# build(s)305
Avg build time19.8s
Queue len0 (0.0)
Statusidle
 

Accessing Filesystems

Erlang on Xen uses 9p-protocol from Plan 9 to mount external filesystems. The same protocol allows mounting of synthetic filesystems exported by Erlang on Xen instances.

All mounting operations require authentication through MUNGE (or MUMBLE) schemes. The authentication requires a synchronisation of secret keys between clients and servers.

Instances get to know the secret keys through a new command-line flag – -secret. For instance, a corresponding line of the domain configuration file may contain:

extra = "-secret 00112233445566 00335577bbdd"

Note that there are two hex hexadecimal numbers that follow -secret.

Two Erlang on Xen nodes that have identical secret keys can mount each other’s filesystems. To access Linux filesystem, we recommend a standard 9p reexporting server – diod.

A -9p command-line flag requests a mounting operation to be performed during the boot process. For instance, the following flag:

extra = "-9p 192.168.0.1 /home /diod"

will establish a 9p connection to a diod server running on 192.168.0.1, and map the /home directory on the server to the /diod directory in the node’s hierarchy.

diod relies of a MUNGE daemon – munged – to verify credentials of incoming clients.

We have created a small utility – mungeling – that retrieves the keys from the munged server and represents them in the format suitable for configuration of Erlang on Xen nodes.

Step-by-step instructions

1. You need to download and build munged, diod, and mungeling.

2. Run ‘sudo munged’.

3. Run ‘sudo diod -E’.

4. Run ‘sudo mungeling’. The utility prints ‘-secret xxxxxxxx yyyyyyyy’.

5. Update domain configuration file to include:

extra = "-secret xxxxxxxx yyyyyyyy -9p 192.168.0.1 /home /diod"

6. Launch the instance.

The /home directory of the Linux server is now accessible inside the instance under /diod directory.

The service is free for any purpose, including commercial use. It is provided "as is", without any warranty.
More licensing options are available from Cloudozer LLP.
E-mail: [email protected].