Accessing Files
From Molecular Modeling Wiki
Line 11: | Line 11: | ||
One of the systems which allow to '''mount''' the remote directory to local filesystem is called ''sshfs''. On Ubuntu, you can follow these instructions: | One of the systems which allow to '''mount''' the remote directory to local filesystem is called ''sshfs''. On Ubuntu, you can follow these instructions: | ||
- | * First, add yourself to the '''fuse''' | + | * First, add yourself to the ''fuse'' group |
+ | <pre>sudo gpasswd -a $USER fuse</pre>. | ||
+ | This has to be done only once. 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 | ||
+ | <pre>cd ~</pre> | ||
+ | <pre>mkdir -p mnt/_SERVERNAME_</pre> | ||
+ | <pre>sshfs -o idmap=user _USERNAME_@_SERVERNAME_:/home/_USERNAME_ ~/mnt/_SERVERNAME_</pre> | ||
+ | |||
+ | for example | ||
+ | |||
+ | <pre>cd ~</pre> | ||
+ | <pre>mkdir -p mnt/zinc</pre> | ||
+ | <pre>sshfs -o idmap=user novak@zinc:/home/novak ~/mnt/zinc</pre> |
Revision as of 13:18, 23 January 2014
= Problem
Data in the cluster home directories usually need some processing after they are produced. Frequently, some visualization of data (inputs, results) is required and programs like molden, VMD', and others are often run on the cluster servers to display images on the user's workstation through the X-Window system. Howvere, this method has 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 sometimes does not waork 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. Or 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 local on your workstation and run the program there. In other words - install visualization programs on your workstation where they will be 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. On Ubuntu, you can follow these instructions:
- First, add yourself to the fuse group
sudo gpasswd -a $USER fuse.
This has to be done only once. 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_
for example
cd ~
mkdir -p mnt/zinc
sshfs -o idmap=user novak@zinc:/home/novak ~/mnt/zinc