Connecting to the Yoda Network Disk using davfs2
Connecting to the Yoda Network Disk using davfs2
This page describes how to connect to the Yoda Network Disk on a Linux system using davfs2. It assumes familiarity with using commandline tools. The instructions are suitable for RedHat-based distributions (e.g. Fedora or CentOS) and for Debian-based distributions (e.g. Ubuntu).
Installing the package
Install the davfs2 package.
For Debian/Ubuntu:
- sudo apt -y install davfs2
- Confirm that unprivileged users should be able to mount davfs2 volumes (“Yes”).
For RedHat/CentOS/Fedora:
- sudo yum -y install epel-release
- sudo yum -y install davfs2
Configuring group membership
Look up your user name, uid and gid using the “id” command.
Add your user account to the davfs2 group: sudo usermod -aG davfs2 user (replace “user” with your user name).
Close the terminal window and open a new one to activate the group change.
Configuring Davfs2
Open the davfs2 configfile in a text editor (e.g. sudo vi /etc/davfs2/davfs2.conf). Ensure parameter delay_upload is set to 0 (zero). This limits the risk of data loss from a failure to flush data after large file transfers.
Open the /etc/fstab file in a text editor (e.g. sudo vi /etc/fstab) and add a configuration line for the Yoda Network Disk:
https://data.yoda.vu.nl /mnt davfs user,auto,uid=1000,gid=1000 0 0
And adjust the parameters as needed:
- Replace https://data.yoda.vu.nl with the URL of your Yoda Network Disk
- If you’d like to mount the Yoda Network Disk in a different location, replace /mnt with a different local directory.
- Replace the uid and gid parameters with your uid and gid, as shown by the id command.
- If you don’t want the Yoda Network Disk to be mounted automatically after your system starts, remove “auto,” from the options.
First set a Data Access Password.
Now use a text editor to create a secrets file, which contains your Yoda Network Disk URL, Yoda user name and password, separated by spaces. If you are an employee or student at Vrije Universiteit, your user name is your VU email address (in lowercase) and your password is your Data Access Password. External users have usually received their user name via email, along with a link to set their password. Example of a secrets file: “https://data.yoda.vu.nl xxx@vu.nl myDataAccessPassword”. You need to escape any backslashes and double quotes in your password with a backslash (e.g. use “\\” instead of “\”).
Install this secrets file as the global davfs2 secrets file:
- sudo install -m 0600 -o root -g root secrets /etc/davfs2/secrets
- rm secrets
Mounting the Yoda Network Disk
The disk should be mounted automatically after a reboot if you have configured the “auto” option in /etc/fstab.
To manually mount the Yoda Network Disk:
- On Debian/Ubuntu: mount /mnt
- On RedHat/CentOS/Fedora: sudo mount /mnt (you can ignore any warnings about writing to the mtab file)
Acknowledgements
Thanks to Joost de Graaf for his contributions to this guide.