Score:1

Mount a webDAV to a specific disk

pt flag

I want to mount a webDAV to a specific disk. I am copying large files to the webDAV, but it appears when I do this, it takes up space on my main disk (which is not /media/username/Crucial) instead of the disk the webdav is mounted on. Can the fstab be setup to have files uploaded/downloaded/viewed (whatever triggers the file to be copied locally) to use the disk it is mounted on.

The relevant lines of my /etc/fstab are below:

/dev/disk/by-uuid/<long-uuid> /media/username/Crucial auto nosuid,nodev,nofail,x-gvfs-show 0 0
https://dav.box.com/dav /media/username/Crucial/box.com davfs rw,user,noauto 0 0

Version info

Ubuntu 22.10

mount.davfs -V
davfs2 1.6.1  <http://savannah.nongnu.org/projects/davfs2>

Disk info

My main drive and secondary drive (Crucial) are ext4.

David avatar
cn flag
What version of Ubuntu is involved?
nikost avatar
pt flag
I am using Ubuntu 22.10
Score:1
iq flag

the davfs2 configuration might be using a cache directory on your main disk that would cause it to consume space temporarily but with WebDAV the files you upload or download should use the disk space on the mounted disk.

Lets change the cache directory on your secondary drive, first we create the cache directory mkdir /media/username/Crucial/davfs2_cache then we open davfs2 sudo nano /etc/davfs2/davfs2.conf we change the line that start with cache_dir like that cache_dir /media/username/Crucial/davfs2_cache then we save and exit the file and we unmount and mount WebDAV, now it should work

nikost avatar
pt flag
Thanks for the insight. I searched for the current cache directory and sure enough it was quite large. I'll be sure to implement your solution to put the cache on the desired drive.
Saxtheowl avatar
iq flag
You welcome :) dont forget to accept the answer if it fixed your problem.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.