Mount another server with sshfs in Xenserver 6

To mount via sshfs we need fuse fuse-libs and fuse-sshfs.

Initiator server is where you want to mount the target server folder.

Target server is where the mountable folder resides.

First, install some packages so XenServer 6 will support mounting with sshfs:

[initiator]# yum install fuse fuse-libs --enablerepo=base
[initiator]# rpm -Uvh 'ftp://ftp.sunet.se/pub/Linux/distributions/fedora/epel/5/i386/fuse-sshfs-2.4-1.el5.i386.rpm'

Now, log in to the target server and set up a reverse tunnel from target to initiator:

[target]# ssh -R 2222:localhost:22 root@foo -p 22

Now you should be in the Xenserver initiator server, create a folder where you want to mount the target:

[initiator]# mkdir /mnt/sshfs

Mount without sshfs compression:

[initiator]# sshfs -p 2222 -o Ciphers=arcfour localhost:/backup /mnt/sshfs

If this is not working and you get an error like ‘read: Connection reset by peer‘ then you can debug by adding an option -d to the sshfs command.

One thought on “Mount another server with sshfs in Xenserver 6

Leave a Reply to Yllar Cancel reply

Your email address will not be published. Required fields are marked *

You must enable javascript to see captcha here!