Description
I’ve implemented a filesystem using pyfilesystem that works very well and can be mounted using Fuse in a Linux box. Now I need to create a network share on it via Samba. The problem is that when I access the Samba share, files can be successfully read, but fails to write new files, telling me there's not enough space. I have implemented getmeta() to provide values for free_space and total_space, but the method is not called at all.
I'm not sure but reckon the problem is with pyfilesystem. I've compared pyfilesystem’s OSFS with fusepy’s Loopback. OSFS is run as below:
cfs = OSFS("/tmp/")
fuse.mount(cfs,"/home/nima/mntOSFS", allow_other=True, foreground=True)and fusepy's Loopback:
fuse = FUSE(Loopback('/tmp'), '/home/nima/mntFusepy', foreground=True, allow_other=True)Running both codes, /tmp is mounted successfully under corresponding mount points, but df shows only the fusepy's. Samba can also correctly write to share on fusepy's loopback, but not on pyfilesystem's OSFS.
nima@nima-vm:~$ df -H
Filesystem Size Used Avail Use% Mounted on
[ommited]
Loopback 20G 15G 4.8G 75% /home/nima/mntFusepy
Upon running df, underlying FUSE.statfs is called for fusepy, but is not so for pyfilesystem.
Activity
nimamox commentedon Dec 17, 2016
I realized that the delegating interface FSOperations misses a
statfs()method and can be simply added to callgetmeta()of the underlying FS. I prependstatvfs.to the names to distinguish these non-generic metadata ingetmeta()as documentation specifies. Any thoughts?