Accessing Files

From Molecular Modeling Wiki

(Difference between revisions)
Jump to: navigation, search
Line 11: Line 11:
One of the systems which allow to '''mount''' the remote directory to local filesystem is called ''sshfs''. To use it, follow these instructions (specific for Ubuntu, see also this [https://help.ubuntu.com/community/SSHFS howto]):
One of the systems which allow to '''mount''' the remote directory to local filesystem is called ''sshfs''. To use it, follow these instructions (specific for Ubuntu, see also this [https://help.ubuntu.com/community/SSHFS howto]):
-
Install the sshfs package and add yourself to the ''fuse'' group (this has to be done only once for given user and workstation)  
+
Install the sshfs package and add yourself to the ''fuse'' group (this has to be done only once)  
<pre>
<pre>

Revision as of 13:44, 23 January 2014

Contents

Problem

Data in the cluster home directories usually needs some processing after it is produced. Frequently, some visualization of data (inputs, results) is required and programs like molden, VMD, and others are often run on cluster servers to display images on the user's workstation through the X-Window system. However, this method has major disadvantages - it is slow, as a huge amount of graphical data is transferred through the network (especially when the object consisting of many atoms moves and rotates), and it often does not work at all (mostly because of incompatible versions of OpenGL libraries on the cluster server and user's workstation). There is a better solution, though.

Idea

If the mountain won't come to Muhammad then Muhammad must go to the mountain. Translated to our case: If you cannot run the graphical program on the remote server to let it work with the local data, make the data appear local on your workstation and run the program there. In other words - install visualization programs on your workstation where they are fast and configured exactly for your system and make the data appear as if it is local too. For this, you do not need to copy data from server to your workstation - it is enough just to embed your remote home directory to your local file system. Read on for instructions.

Sshfs

One of the systems which allow to mount the remote directory to local filesystem is called sshfs. To use it, follow these instructions (specific for Ubuntu, see also this howto):

Install the sshfs package and add yourself to the fuse group (this has to be done only once)

sudo apt-get install sshfs
sudo gpasswd -a $USER fuse

Once you have added yourself to the fuse group, you should log out and log back in again for the change to take effect.

For every filesystem you want to mount or connect, do

cd ~
mkdir -p mnt/SERVERNAME
sshfs -o idmap=user USERNAME@SERVERNAME:/home/USERNAME ~/mnt/SERVERNAME

replacing SERVERNAME with the name of remote server (cluster) and USERNAME with you login name on this server (cluster) for example

cd ~
mkdir -p mnt/zinc
sshfs -o idmap=user novak@zinc:/home/novak ~/mnt/zinc

Of course, this process can be repeated for more than one cluster server. Needless to say, the directories (mountpoints) need to be created only once for every remote directory to be mounted. Once the remote directory is mounted, you can use it as if it was local, so, for example, you can call your local installation of VMD and open a remote file in it browsing to ~/mnt/zinc/...

To unmount (disconnect) the remote directory from your local filesystem call

fusermount -u ~/mnt/SERVERNAME


Notes

This method can also be used to mount cluster $HOME directory to your home computer. For this, however, opening the firewall with knock is needed before calling sshfs.

Personal tools