A Linux client in the TUD network
Your TUD login and TUD password (referenced by <tud-login> and <tud-password>)
The following information from the Self-Service Portal (SSP):
The Shared Storage name (referenced by <name>)
The SVM name of the Shared Storage (referenced by <svm>)
Install the package cifs-utils
Create a file with your login credentials:
File contents:
username=<tud-login> password=<tud-password> domain=dom.tu-dresden.de
Recommendation: Restrict file permissions
chmod 600 <credentials>
Mount the Shared Storage with the following command
sudo mount -t cifs //<svm>.zih.tu-dresden.de/<name> <path> -o credentials=<credentials>Replace <svm>, <name> and <credentials> with your respective values. <path> is any target folder on the local system.
(Optional) Persistent mount in /etc/fstab
//<svm>.zih.tu-dresden.de/<name> <path> cifs credentials=<credentials>,_netdev,nofail,x-systemd.automount 0 0We recommend the options _netdev,nofail,x-systemd.automount so that the system does not hang if the Shared Storage is unavailable.
The possibilities described above for mounting a Shared Storage only allow access with root by default, because CIFS mounts without additional options locally belong to the root user.
To completely disable local access restrictions, the option noperm can be used. This gives EVERY local user access to the mounted filesystem:
sudo mount -t cifs //<svm>.zih.tu-dresden.de/<name> <path> -o credentials=<credentials>,noperm
To grant access to a specific user or group, the options uid and/or gid must be set accordingly. This assigns the mounted filesystem to that user or group. The options file_mode and dir_mode set the access permissions (0660 and 0770 are typical here):
sudo mount -t cifs //<svm>.zih.tu-dresden.de/<name> <path> -o credentials=<credentials>,uid=service,gid=service,file_mode=0660,dir_mode=0770
Prerequisites for direct access
Requires an NFS share with root access for the client’s IP address (can be set up in the SSP)
Please see the notes in Special Case NFS
Setup
Mount the Shared Storage with the following command
sudo mount -t nfs <svm>.zih.tu-dresden.de:/<name> <path> -o vers=3Replace <svm> and <name> with your respective values. <path> is any target folder on the local system.
(Optional) Persistent mount in /etc/fstab
<svm>.zih.tu-dresden.de:/<name> <path> nfs vers=3,_netdev,nofail,x-systemd.automount 0 0We recommend the options _netdev,nofail,x-systemd.automount so that the system does not hang if the Shared Storage is unavailable.
Shared Storages with NFS shares can also be accessed via the Datagateway.
Detailed information and specific notes (such as access paths) can be found in the Datagateway article.
In the following examples, the TUD user fooba705g accesses the Shared Storage huawei_test_laufwerk_nfs (SVM vs-grp109) on the Datagateway.
Graphical Access with FileZilla
For access with a graphical interface, we recommend the program FileZilla. A guide can be found in the Datagateway - Access with FileZilla article.
Example with scp
$ scp fooba705g@dgw.zih.tu-dresden.de:/svm/vs-grp109/huawei_test_laufwerk_nfs/hello.txt . $ cat hello.txt Hello World
Example with sshfs
Recommendation: SSHFS is more prone to errors due to the detour via the Datagateway. We recommend mounting directly with NFS or SMB.$ mkdir test $ sshfs fooba705g@dgw.zih.tu-dresden.de:/svm/vs-grp109/huawei_test_laufwerk_nfs/ test $ ls test bar bat.txt blabla.txt foo/ hello.txt
Persistent sshfs mount:
Register an SSH public key in the user’s authorized_keys file on the Datagateway. See Datagateway.
(Optional) Test the connection via the command from Example with sshfs. There should be no password prompt.
Create the entry in /etc/fstab
sshfs#<tud-login>@dgw.zih.tu-dresden.de:/svm/<svm>/<name> <path> fuse _netdev,noauto,x-systemd.automount,x-systemd.idle-timeout=60,rw,allow_other,reconnect,uid=1000,gid=1000,IdentityFile=<private-key> 0 0Replace <tud-login>, <svm> and <name> with your respective values. <path> is any target folder on the local system.
Mount the drive
sudo systemctl daemon-reload sudo mount <path>
Example with sftp
$ sftp fooba705g@dgw.zih.tu-dresden.de:/svm/vs-grp109/huawei_test_laufwerk_nfs Connected to dgw.zih.tu-dresden.de. Changing to: /svm/vs-grp109/huawei_test_laufwerk_nfs sftp> dir bar bat.txt blabla.txt foo hello.txt
Example with rsync
rsync -avz fooba705g@dgw.zih.tu-dresden.de:/svm/vs-grp109/huawei_test_laufwerk_nfs/ ./local_folder/