gensrjh / macfuse

Automatically exported from code.google.com/p/macfuse
Other
1 stars 0 forks source link

sshfs 0.3.0 has problems editing files that have changed since the volume was mounted #260

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Connect to remote ssh server
2. Create file and enter line of test text on volume
3. Edit file from another machine, add 2nd line of test text
4. View file on first machine, 2nd line of test text not shown

What is the expected output? What do you see instead?
You'd expect to see the file containing 2 lines of text. Instead you see one 
line of text, or you get 
a Mac OS error "An unexpected end-of-file was encountered (MacOS Error code: 
-39)".

What version of the product are you using? On what operating system?
sshfs 0.3.0 on Mac OS X 10.4.10 Build 8R2218 and MacFUSE 0.4.0

Please provide any additional information below.
Sometimes the corruption is not the same. Some changes show, some don't. It's 
very 
unpredictable on larger files. This makes working with someone on a site 
virtually impossible!

Original issue reported on code.google.com by ischools...@googlemail.com on 30 Aug 2007 at 8:22

GoogleCodeExporter commented 9 years ago
1. Has been discussed many times. Please search in past issues and on the 
macfuse-devel forum.

2. sshfs, the program, does not implement a true distributed file system, so 
what you're expecting of it isn't 
quite reasonable. For a good understanding of why this is so, you'll have to 
look up previous discussions (I 
have some more info below).

3. It is possible to simulate much of the behavior you want by specifying the 
'-onolocalcaches -ocache=no' 
mount-time options to sshfs. You'll probably need to run the sshfs command-line 
binary to specify these 
options (the GUI wrapper downloadable from this site is just a trivial demo 
that doesn't expose any advanced 
options).

4. I made sshfs available as an unsupported demo--it isn't really part of what 
I "officially" support (MacFUSE 
Core, which consists of the MacFUSE kernel extension, the libfuse library, and 
the fusefs.fs bundle).

Unlike distributed file systems like NFS, AFS, Coda, etc., sshfs is much 
simpler "file system" that uses SFTP as 
its underlying transport mechanism to make remote things appear locally. It 
wasn't meant to support 
simultaneous file editing by multiple clients. In this case, the best you can 
do is to try what I said in #3 above. 
Even that has caveats. Firstly, it will turn off the OS X buffer cache for the 
entire volume--OS X wasn't meant 
to run in this mode (it does work OK, but there could be problems I haven't yet 
foreseen). Secondly, all that 
will do is not cache anything on the client side, so sshfs will have to go to 
the server for every request. This 
still doesn't do any distributed file locking or guarantee the order in which a 
concurrently edited file will be 
written.

Original comment by si...@gmail.com on 30 Aug 2007 at 8:49

GoogleCodeExporter commented 9 years ago
Thanks man! We did do some searching but clearly not enough. What we wanted to 
achieve has now been done 
using the no cache method you described. We only wanted to be able to edit 
files at different times to each 
other, so that's done the job nicely. Thanks!!

Original comment by ischools...@googlemail.com on 30 Aug 2007 at 9:25