Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Anchor
top
top
Table of Contents


This how-to is intended to explain how a non-privileged user can mount a NAS share on our Helvetios' front-end.


Info
The explanation are given for the Helvetios cluster, as this is, at the moment, the only cluster where it is working.





Access to the cluster's front-end


Code Block
languagebash
ssh [USERNAME]@helvetios.epfl.ch



top


Preparing the environment

Depending on the time needed for your copy:



Short time work


Launch the following command:

Code Block
languagebash
export $(dbus-launch)



Long time work

This method uses the screen command.
It allows you to quit your session without killing the mount.

  • Open a screen session:

    Code Block
    languagebash
    screen -R [ANY_NAME]

    Ex:

    Code Block
    languagebash
    screen -R john_session


  • From your screen session, type the following command:

    Code Block
    languagebash
    dbus-run-session -- bash


See here for some basic screen usage.

Mounting your share


Info
titleTips

Instead of typing the long command, such as smb://intranet\;[USERNAME]@[NAS_SERVER]/[SHARE_NAME], you can use a variable.

Ex:

MYSHARE="smb://intranet;[USERNAME]@[NAS_SERVER]/[SHARE_NAME]"
(warning) Without the backslash before the semicolon  " ; "

Note:
These are all case insensitive.



To mount your NAS share:

Code Block
languagebash
gio mount smb://intranet\;[USERNAME]@[NAS_SERVER]/[SHARE_NAME]


Ex:

Code Block
languagebash
gio mount smb://intranet\;john@vpsi1files.epfl.ch/scitas-ge



Or with the variable:

Code Block
languagebash
gio mount $MYSHARE





Info

The information on your share can be found here  but these pages are not updated.

The NAS team is working to have a place where all these information will be available.


The other solution is to use the command-line:

smbclient -W INTRANET -U [USERNAME] -L [NAS_SERVER]

Ex:
smbclient -W INTRANET -U john -L vpsi1files.epfl.ch

Your will get a couple of share names. Try to find the appropriate one... .



top


Anchor
gio_cmd
gio_cmd
Basic gio commands


To get a list of files

Code Block
languagebash
gio list smb://intranet\;[USERNAME]@[NAS_SERVER]/[SHARE_NAME]



To list files in a tree mode

Code Block
languagebash
gio tree smb://intranet\;[USERNAME]@[NAS_SERVER]/[SHARE_NAME]



To copy files

  • From the share:

    Code Block
    languagebash
    gio copy smb://intranet\;[USERNAME]@[NAS_SERVER]/[SHARE_NAME] [DESTINATION_PATH] 

    Ex:

    Code Block
    languagebash
    gio copy smb://intranet\;john@vpsi1files.epfl.ch/scitas-ge/Doc/my\ doc.txt /scratch/john/

    Note:
    In this example, the file to copy has a space in its name. That's why the space has to be backslashed (my\ doc.txt).


  • To the share:

    Code Block
    languagebash
    gio copy [YOUR_FILE] smb://intranet\;[USERNAME]@[NAS_SERVER]/[SHARE_NAME]/




To unmount your share

Code Block
languagebash
gio mount -u smb://intranet\;[USERNAME]@[NAS_SERVER]/[SHARE_NAME] 


Or, if you are using screen, simply quit the session:

Code Block
languagebash
exit (twice)



top


Direct access to your share

The gio mount command actually mounts your share to /run/user/[USERID]/gvfs/[MOUNT_DATA_DIR] .


Ex:

/run/user/123456/gvfs/smb-share:domain=intranet,server=files7.epfl.ch,share=data,user=john


Part of this path can be found thanks to the $XDG_RUNTIME_DIR variable:

Code Block
languagebash
echo $XDG_RUNTIME_DIR

/run/user/[YOUR_USERID]


But the preferred method is to use the gio's sub-commands instead.



top


Basic screen usage

Anchor
screen_cmd
screen_cmd

Basic screen usage


To detach from your screen session:

Code Block
languagebash
CTRL-a d



To attach to you screen session:

Code Block
languagebash
screen -r [YOUR_SCREEN_NAME]

Ex:

Code Block
languagebash
screen -r john_session



To exit from your screen session:

Code Block
languagebash
exit (twice if you run the "dbus-run-session -- bash" command)



To get help (from screen session):

Code Block
languagebash
CTRL-a ?

top

Debug

Warning
Cette partie n'est pas dédiée aux utilisateurs

Ouvrir un terminal et taper la commande suivante:

Code Block
languagebash
$ GVFS_SMB_DEBUG=10 GVFS_DEBUG=1 $(find /usr/lib* -name gvfsd 2>/dev/null) --replace 2>&1 | tee gvfsd.log

Depuis un autre terminal, effectuer le montage:

Code Block
languagebash
$ gio mount smb://...

Note:
Je n'ai pas réussi à faire ça sur Helvetios, peut-être à cause des sécurités du serveur. Mais ça fonctionne bien sur mon ordinateur personnel.

Si le montage ne se voit pas dans /run/user/[USERID]/gvfs , un kill de tous les process impliquants gvfs peut aider:

Code Block
languagebash
$ ps -elf | grep -i gvfs | grep degiorgi
Code Block
languagetext
/usr/libexec/gvfs-udisks2-volume-monitor
/usr/libexec/gvfsd
/usr/libexec/gvfsd-smb --spawner :1.1 /org/gtk/gvfs/exec_spaw/0
/usr/libexec/gvfsd
/usr/libexec/gvfsd
/usr/libexec/gvfs-udisks2-volume-monitor
/usr/libexec/gvfs-udisks2-volume-monitor
/usr/libexec/gvfsd-smb --spawner :1.1 /org/gtk/gvfs/exec_spaw/3
/usr/libexec/gvfsd

Sources intéressantes:

  • GVFS Gnome project (liste de variables)
  • Gnome Developer (gio variables)


    top