Score:0

How do I replicate Ubuntu desktop file share mounting in Ubuntu server?

jp flag

I'm running a piece of software called hpool, it's related to Chia crypto farming. It is temperamental and somehow locks files in place that other crypto farming software needs. On windows I believe it does this with the exclusive use functionality. I had to run it last and keep the required shares as read/write access for that reason.

I decided to avoid this problem entirely by going to Ubuntu desktop, this allowed me to set the drives as read only and it didn't matter what order I ran the software in. I've since moved to Ubuntu server 21.04 and the problem is back.

I believe the problem is caused by the mounting method. On Ubuntu server I am using:

sudo mount.cifs //apollo/cf1/ /home/grumpy/mnt/apollo/cf1/ -o user=user,pass=pass

This mounts the network share on my Unraid server as expected, the shares are still read only, but I'm now experiencing the above issues.

I noticed that Ubuntu desktop doesn't use the same method and that the network share location looks like this:

/run/user/1000/gvfs/smb-share:server=apollo.local,share=cf1

Comparing cat /proc/mounts between ubuntu desktop and server shows that, as expected, on server they are mounted. However, they don't appear to be mounted on desktop.

Obviously the method on Ubuntu desktop is to click on Apollo (file share), enter login details and then right click > mount all the required shares.

How can I replicate this method on Ubuntu server 21.04?

Morbius1 avatar
es flag
Desktop Ubuntu runs `gio mount smb://apollo.local/share=cf1`. You can't do that on Server Ubuntu because for one thing it doesn't have gvfs-backends so it doesn't understand the command. Installing it on the server will bring in a whole lot of dependencies I don't think you want on a server. Based on my interpretation of your issue I would add nobrl to the list of options. This will tell the system not to request a lock on the share and it's files: `sudo mount.cifs //apollo/cf1/ /home/grumpy/mnt/apollo/cf1/ -o user=user,pass=pass,nobrl`
Modi avatar
jp flag
@Morbius1 That fixed it, thank you!
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.