Difference between revisions of "Hoffman2:Sharing Filesystems"

From Center for Cognitive Neuroscience
Jump to: navigation, search
(sshfs)
 
Line 58: Line 58:
 
  uid=1010(joebruinuser) gid=20(bruingroup1),23(bruingroup2),...
 
  uid=1010(joebruinuser) gid=20(bruingroup1),23(bruingroup2),...
 
  $ mkdir ~/MOUNTPOINT
 
  $ mkdir ~/MOUNTPOINT
  $ sshfs -o idmap=user -o uid=1010 -o gid=20 USERNAME@dtn2.hoffman2.idre.ucla.edu:/path/to/mount ~/MOUNTPOINT
+
  $ sshfs -o idmap=user -o uid=1010 -o gid=20 USERNAME@hoffman2.idre.ucla.edu:/path/to/mount ~/MOUNTPOINT
 
Where
 
Where
 
; <code>id</code>
 
; <code>id</code>

Latest revision as of 17:01, 10 June 2019

Back to all things Hoffman2

There are apps for linking filesystems so that you can access data across machines. It's like mounting a shared drive. Here we present a GUI and a command line way of accomplishing this.


MacFusion

MacFusion is no longer working as of macOS 10.12 (Sierra). Please use the command line instructions below.


sshfs

Installation

Download and install the two packages on this website: https://osxfuse.github.io/

  • FUSE for macOS
  • SSHFS

Usage

Let's say you want to mount Hoffman2 locally. On the command line, execute

$ id
uid=1010(joebruinuser) gid=20(bruingroup1),23(bruingroup2),...
$ mkdir ~/MOUNTPOINT
$ sshfs -o idmap=user -o uid=1010 -o gid=20 USERNAME@hoffman2.idre.ucla.edu:/path/to/mount ~/MOUNTPOINT

Where

id
Gets information about your local user, including your numerical ID and group ID(s)
-o idmap=user -o uid=1010 -o gid=20
Translates your local user and group IDs to that of the remote user so you can read and write files as if you were on the remote machine. Make sure to put the correct user and group IDs that were returned by the id command.
USERNAME
Is your username at the remote computer
hoffman2.idre.ucla.edu
Is the address of the remote computer you are connecting to.
/path/to/mount
Could be left blank to mount your home directory from the remote computer, or it could specify any point in the remote filesystem
MOUNTPOINT
Is the name of the directory where the remote filesystem will be mounted.


To unmount:

  • Use the command
umount ~/MOUNTPOINT

or

  • Right click on the desktop icon that appears and select "Eject."