Project

Profile

Help

SSHFS setup for linking repo and LOGS dir » History » Sprint/Milestone 5

Mark Zaslavskiy, 21.12.2016 15:21

1 1 Mark Zaslavskiy
h1. SSHFS setup for linking repo and LOGS dir
2 1 Mark Zaslavskiy
3 5 Mark Zaslavskiy
h2. How to create mount
4 1 Mark Zaslavskiy
5 2 Mark Zaslavskiy
On the slave perform following commands (for getting instant but temporary (till first reboot) solution):
6 1 Mark Zaslavskiy
7 2 Mark Zaslavskiy
<pre><code class="text">
8 1 Mark Zaslavskiy
sudo apt-get install sshfs
9 3 Mark Zaslavskiy
cd $HOME
10 1 Mark Zaslavskiy
mkdir LOGS/ repo/ repository/
11 4 Mark Zaslavskiy
sudo sshfs -o allow_other,reconnect vagrant@max-tst-01.mariadb.com:/home/vagrant/LOGS /home/vagrant/LOGS
12 4 Mark Zaslavskiy
sudo sshfs -o allow_other,reconnect vagrant@max-tst-01.mariadb.com:/home/vagrant/repo /home/vagrant/repo
13 4 Mark Zaslavskiy
sudo sshfs -o allow_other,reconnect vagrant@max-tst-01.mariadb.com:/home/vagrant/repository /home/vagrant/repository
14 2 Mark Zaslavskiy
</code></pre>
15 2 Mark Zaslavskiy
16 2 Mark Zaslavskiy
For getting reboot-resistant solution add following lines to /etc/fstab:
17 2 Mark Zaslavskiy
18 2 Mark Zaslavskiy
<pre><code class="text">
19 2 Mark Zaslavskiy
sshfs#vagrant@max-tst-01.mariadb.com:/home/vagrant/LOGS /home/vagrant/LOGS
20 2 Mark Zaslavskiy
sshfs#vagrant@max-tst-01.mariadb.com:/home/vagrant/repo /home/vagrant/repo
21 2 Mark Zaslavskiy
sshfs#vagrant@max-tst-01.mariadb.com:/home/vagrant/repository /home/vagrant/repository
22 2 Mark Zaslavskiy
</code></pre>
23 1 Mark Zaslavskiy
24 5 Mark Zaslavskiy
h2. How to check that mount exists
25 5 Mark Zaslavskiy
26 5 Mark Zaslavskiy
Run "mount". Output should contain:
27 5 Mark Zaslavskiy
28 5 Mark Zaslavskiy
<pre><code class="text">
29 5 Mark Zaslavskiy
vagrant@max-tst-01.mariadb.com:/home/vagrant/LOGS on /home/vagrant/LOGS type fuse.sshfs (rw,nosuid,nodev,relatime,user_id=0,group_id=0,allow_other)
30 5 Mark Zaslavskiy
vagrant@max-tst-01.mariadb.com:/home/vagrant/repo on /home/vagrant/repo type fuse.sshfs (rw,nosuid,nodev,relatime,user_id=0,group_id=0,allow_other)
31 5 Mark Zaslavskiy
vagrant@max-tst-01.mariadb.com:/home/vagrant/repository on /home/vagrant/repository type fuse.sshfs (rw,nosuid,nodev,relatime,user_id=0,group_id=0,allow_other)
32 5 Mark Zaslavskiy
</pre>
33 1 Mark Zaslavskiy
34 1 Mark Zaslavskiy
h2. Links
35 1 Mark Zaslavskiy
36 1 Mark Zaslavskiy
* https://www.digitalocean.com/community/tutorials/how-to-use-sshfs-to-mount-remote-file-systems-over-ssh