Solved Saving files in Fuse disk from GUI gives "disk full"

Hi,

I am moving all my work environment from Linux/Debian to FreeBSD,
and I got almost all working, and working well !
Still I have to solve some minor issues as the following one.

My configuration is: FreeBSD 11.1 is running into a VMWare virtual machine,
OSX is the host. VMWare shares two folders with FreeBSD which are
Dropbox and GoogleDrive.

I can copy files to to Dropbox and GoogleDrive from the shell, no problem.

The problem is when i try to copy into Dropbox or GoogleDrive a file
using Dolphin / Konqueror / Nautilus. They all tell me "Disk Full".
Which is of course not true.

I am mounting the filesystems in /etc/rc.local with
Code:
kldload fuse
/usr/local/bin/vmhgfs-fuse .host:/Dropbox /home/p/dropbox/ -o allow_other
/usr/local/bin/vmhgfs-fuse .host:'/Google Drive' /home/p/google-drive -o allow_other


I would like to keep using Dolphin,
Do you have any idea of how could I solve this ?

Bye
Nicola
 
I found that both Virtualbox's and VMware's sharing mechanisms are not reliable. I think in macOS it's better to use NFS as an out-of-the-box working service.
Create/edit /etc/exports (in macOS) and add:
Code:
/path/to/shared/dir -network 192.168.0.0 -mask 255.255.255.0
Then (re)start the nfs daemon in macOS:
Code:
# nfsd restart
Now you can mount the shared dir in FreeBSD:
Code:
# mount host_name_or_address:/path/to/shared/dir /mnt/my_google_drive
Of course, you can add more nfs options in the host's /etc/exports to map users etc.

EDIT: Just tested in High Sierra in iMac ― perfectly works with a local directory (Idon't use Google drive), but I guess should work with any directory.
 
That could be viable solution .

Problem is I still have "El Capitan", because those people at Apple decided my computer
is too old to upgrade (it is a 2012, but i have 8G ram and 512GB solid state HD) !
I saw the VPN is broken and they are not fixing it, I start to think they broke it on purpose;P

I could cross my fineger and hope NFS server is still working, I will try
in one day or two and let you know.

thank you for now !

bye
n.
 
Does your host version have sshd enabled? In that case you might be able to use sysutils/fusefs-sshfs. Then you'd just need to use sshfs <user>@<host>:<path> <mountpoint> to mount the folder and umount <mountpoint> to unmount it. Also if you just want to do some ad-hoc transfer, simply using scp might be an option as well.
 
Does your host version have sshd enabled?
All versions of Mac's OSs have sshd, it's not enabled by default, you can turn it on in system settings -> sharing. They used to allow setting a custom port number, but not in the latest ones (although it still can be done manually).
 
Ok, guys, i got it working a few hours ago and it seems stable.
I have choosen the "ssh" solution as suggested by p3rj because i know far
better "ssh" than "nfs" service. I thank again aragats for his usuful
contributions.

So, I i will try to report here all passages needed for a user who may
need this in future.

It must be stresssed that this solution is sub-optimal
because it needs an sshd server running in VMWare host machine, which
is usually not a problem in OSX but it in other plaforms e.g. Windows
it could mean it is necessary to install software.

The reason why the GUI file managers give "disk full" remains unknown,
maybe a Dtrace analysis could help understand the thing. Unfortunately
I can not do it now, I know Dtrace exists but still I don't know how to use it.
Another option cold be to look at the (e.g.) Dolphin code for "copy file",
maybe I could give it a try in future.

So, let's summarize the solution.
-] VMWare Fusion 8.5.10 is running in OSX El Capitan 10.11.6.
-] A FreeBSD 11.1 virtual machine is running inside VMWare as guest.
-] In the FreeBSD v.m. I enabled a VMWare NATted network device
which appears in FreeBSD as em0 and takes its configuration from VMWare dhcp.
its IP is 172.16.0.250.
-] In OSX VMWare made a vmnet device with ip 172.16.0.1
-] My user in OSX is called "Nicola" in FreeBSD machine my user is "p"
-] I Enabled sshd in OSX with:
SystemPreferences → Sharing → (select) Remote Login →
Choose the users you would like to be accessible via ssh,
in my case "Nicola".
-] In FreeBSD
---] Install fusefs

root@fbs> pkg install fusefs-sshfs-3.3.0

---] Give non root user permission to mount files

root@fbs> sysctl vfs.usermount=1

---] Add user "p" to "operator" group, this is necessary for "p" to use "fuse"

root@fbs> pw groupmod operator -m p

---] Copy "p" ssh public key in OSX /Users/nicola/.ssh/authorized_keys
to avoid write the password any time I mount the disk.
---] Mount OSX Dropbox directory into FreeBSD /home/p/dropbox

p@fbs> sshfs -o idmap=user nicola@172.16.0.1:/Users/Nicola/Dropbox /home/p/dropbox/


Bye
Nicola
 
SMB shares should work as well.
There also exist sysutils/mountsmb2 script to automount SMB shares at login.

That could be again another solution, for now i will keep it as it
is even if I discovered it is not so much stable.

I just made "Dolphin" hang brutally, I created a directory from "Dolphin" into
a "Google Drive" folder and voila', "Dolphin" froze.

Also, I lost access from the shell to /home/p/google-drive and
I was unable to unmount it. I had to reboot.

For me it is very important to copy/paste stuff from one place
to another in the filesystem and open documents from a GUI Filemanager, that
saves a lot of time respecto to shell typing. But "mkdir", ok, that
I can remember to run it from the shell (there is one inside Dolphin).

Bye
 
You are right, with Dolphin things seem to be rough. While it didn't lock hard, after creating a directory, it couldn't read that directory nor its parent. Had to close the window. Though after un- and then remounting, the directory had been created. From the command line it seems to work better. So maybe another file manager might work better as well? Don't have one to try currently (Dolphin for me is from KDE 5, BTW).
 
I tested with Nautilus and I had the same problem
so I would exclude that it is an issue related to Dolphin.

Also, in the last days even mounting "Dropbox" and "Google Drive"
via sshfs has given me problems in Dolphin.

In the present, I found again another solution which seems to be stable.
Dolphin has the possiblity to mount remote folders with sftp://foo.bar ...
ok, if I do like that it works well, it worked in the last 2 days. I prepared an incon in Dolphin
to access via "Dolphin-sftp" the dirs "Dropbbox" and "GoogleDrive" as shared by OSX.

This solution is ok for now but it has an ulgy drawback, I must access
"Google Drive" and "Dropbox" via Dolphin. To access them via shell
I must use e.g. sshfs. This is not good, I don't like it. Too many ways
to access the same material.

So, in my opinion, given tha available data, the problem
is related to fuse because ssfs and vm-ware shared folders both
use fuse.

I remove the "Solved" from this thread, I think with time we can
find the right way to solve it.
 
I have important good news about this subject.

Running sshfs -f -d I was able to see an error message when my fuse stuff hangs.
Code:
Assertion failed: (offset == 0), function cache_readdir, file ../cache.c, line 367.

Serching the web I found this page which says the bug has been recently solved.
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=223338

Also, if I understand well, this page says what are the changes to make to the port.
https://svnweb.freebsd.org/ports?view=revision&revision=458485

I will try the latest port version and let you know.
 
It works !

Roadmap to have it working.
Use the port version of sshfs and ensure yourself it is at least 3.3.1.
For newbies in FreeBSD, as I am, do:
$> less /usr/ports/sysutils/fusefs-sshfs/Makefile
And check "PORTVERSION" is at least 3.3.1.

During the many trials I made a discover what was the problem in sshfs I collected a bunch of usefull options I consider important when you mount a remote disk, here they are, you can read what they do in man sshfs.

Code:
-o idmap=user -o ServerAliveInterval=15 -o reconnect
 
Back
Top