-
Notifications
You must be signed in to change notification settings - Fork 0
LRZ_mount_DSS
Kilian Holzapfel edited this page Mar 8, 2022
·
2 revisions
This section covers a minimum example mounting (NFS) a DSS Container on a VM including a Compute Cloud VM. The only limitation is, that the VM (IP) has to be located in the LRZ data center.
- Make sure you have the ‘Is Manager’ right for the DSS container on https://dssweb.dss.lrz.de (in case, someone of the ECP group has to give it to you).
- log in at: dssweb.dss.lrz.de (only accessible in the ‘mwn’, in case use a VPN connection)
- select the DSS container. You should see: ‘DSS Container Details’
- Make sure you have the ‘Is Manager’ right for the DSS container in dssweb.dss.lrz.de. ( in case another Manager have to give it to you).
- Add the ‘Funktionskennung’ of the VM (the one you need to set up the VM in the Compute Cloud) to the container user
- At Container User click
Add new userand add theFunktionskennung - Accept the invitation coming by mail (the person which is liked to the
Funktionskennung)
- At Container User click
- At NFS Exports click
Add new exportand add the a IP of the VM (Floating IP for the Compute Cloud VM; the IP you will find at: https://cc.lrz.de/project/ -> Project -> Compute -> Instances) - keep the tab open, you’ll need the Mount Path (which is
<IP>:<Path>) later.
- log in to the VM via
ssh ... - In another tab, log in to:
ssh ab12cde@dsscli.dss.lrz.de(called dsscli in the following); replace ab12cde with your LRZ ID (not theFunktionskennung). (Only accessible in themwn, in case use a VPN connection).- type
loginand log in with your LRZ ID and Password - do the steps under 11.6. NFS helper functions from the official docs which are:
- On dsscli:
dss passwd list --containername pr74qo-dss-0000 pr74qo; replace:pr74qo-dss-0000with your container name andpr74qowith your project name (you will find the information in the tab from above, dssweb.dss.lrz.de) -
On the VM: Add the returned lines to:
/etc/passwd, (e.g., withsudo vim /etc/passwd) - Do the same with
dss group list --containername pr74qo-dss-0000 pr74qoon dsscli to/etc/groupson the VM - Now you have successfully added new user to the VM (passwords aren’t set)
- alternatively: if it is just one user, you can use:
sudo useradd -m -u <uid> <user>
- On dsscli:
- You can close the connection to dsscli, (
contr.+C) - Comment: you can also just extract the UID form a listed user ❌1234567:2222::/home/:-> 1234567. Change the UID on the VM of an existing user with useradd -u 1234567 <username_2> (This could cause some side effects like permission to the home directory). As for NFS, only the UID is important.
- type
- Set a password for one of the added user with:
sudo passwd <username>(can be anything) -
Check: you can check the UID with
id <username>on the VM
- This is the summary of: 2.2.3. Mounting a DSS Container on a VM of the official docs
- Create a new directory where the DSS is mounted to, here
/dssand mount it. Replace<IP>:<Path>with the Mount Path from Prepare the DSS Container
sudo mkdir -p /dss
sudo apt-get install nfs-common
sudo mount -t nfs -o rsize=1048576,wsize=1048576,hard,tcp,bg,timeo=600,vers=3 <IP>:<Path> /dss- Check: You can check with
df -h /dssormountif the<Path>is listed - Add it to
/etc/fstabfor automated mount- modify the file with:
sudo vim /etc/fstab - add the line and replace
<IP>:<Path>with the Mount Path from Prepare the DSS Container<IP>:<Path> /dss nfs rsize=1048576,wsize=1048576,hard,tcp,bg,timeo=600,vers=3 0 0
- save and close the file
- to check if it works
sudo umount /dss sudo mount /dss # this is now enough, it reads the settings from /etc/fstab - now the DSS is mounted automatically after a reboot
- modify the file with:
-
Comment: Only the users with the correct UID’s can access the
/dss(The root-user (i.e.sudo <cmd>) does not work here as it is set tonobodywhich is the wrong UID) -
Option 1: change the user for the one CMD only
-
sudo -u <username> <cmd>, e.g.sudo -u <username> ls /dss
-
-
Option 2: change the user
-
su - <username>+ enter the password you set before in the section - execute a
<cmd>, e.g.ls /dss
-