cryfs / cryfs

Cryptographic filesystem for the cloud
https://www.cryfs.org
GNU Lesser General Public License v3.0
2.01k stars 155 forks source link

macOs: Getting "Device not configured" message on mounted WebDav directory with cryfs #167

Open Celerrime opened 7 years ago

Celerrime commented 7 years ago

Might be related to the slow transfer speeds.

Steps to Repro:

cryfs /Volumes/webdav/encrypted /Users/user/tmp cd /Users/user/tmp && touch myfile && mkdir mydir cd .. && umount /Users/user/tmp cryfs /Volumes/webdav/encrypted /Users/user/tmp ls /Users/user/tmp

Result:

tmp: Device not configured

tbabej commented 7 years ago

We're seeing this issue even when creating new CryFS mount on a regular filesystem on MacOS.

gertoe commented 7 years ago

I have seen this issue also (regular file system) – at least with the build via homebrew. A manual build from the github repo (tag version 0.9.7) has solved this issue for me.

So, if you have built cryfs via homebrew, you may want to try a manual build.

smessmer commented 7 years ago

I just installed it from homebrew and couldn't reproduce. Btw, trying to follow your steps to the letter, the unmount failed because I still was inside /Users/user/tmp, so I guess you did cd .. before the unmount?

Can you give more data? For example: If you run CryFS in the foreground (-f), does it output any logging?

Celerrime commented 7 years ago

I've updated the original post to add cd .. in the steps.

I tried running cryfs -f but it doesn't give additional output when I get $ ls: tmp: Device not configured.

I tried to reproduce this again today.

Screenshot below. I was able to successfully list the contents of the mounted directory. However, transferring larger files and list mounted directories with larger files yield the same problem.

The top terminal was running with cryfs -f /Volumes/webdav/encrypted ~/tmp

screen shot 2017-09-29 at 15 13 17
kgabor commented 2 years ago

Still happens with 0.11.1 built from source on macOS 11.6.2. Seems to be indeed connected to slow/unresponsive underlying device, in my case it is an external USB HDD with an exFat partition. rsync-ing a few 100 MBs, the system cache got filled and when flushed, the underlying device stops responding for a while. Being stuck/delayed for about 10s, the cryfs mount exits:

     48,332,800  62%  267.97kB/s    0:01:48  rsync: [receiver] write failed on "/Users/<. ... .>": Device not configured (6)
rsync: [receiver] stat "/Users/<. ... .>/" failed: Device not configured (6)
rsync: [receiver] rename "/Users/<. ... .>/..." -> "...": Device not configured (6)
rsync error: error in file IO (code 11) at receiver.c(378) [receiver=3.2.3]

rsync: [sender] write error: Broken pipe (32)
[2022-01-05 19:43:02.227] [cryfs] [info] Filesystem started.
[2022-01-05 20:03:22.461] [cryfs] [info] Filesystem stopped.

Also happens when disk is freshly mounted (no cache) for reading. Traversing the underlying directories on exFat is so slow that a simple ls on the cryfs mounted folder causes the error above.