Yandex.Drive (webdav) and linux

Master Yandex.Disk in Linux. The use, as proposed in radio-t: mounted, threw a backup, have atlanterhavet.
As I understand davfs uses a cache, which adds up to ~./davfs2/cache
How to get davfs to sync the cache when unmounting or not to use cache?
I will explain what is the inconvenience.
Mount the disk, copy a large file (700 MB), amontero.
Yandex file does not appear, he was left lying in the user's cache.
In the ps output is the process that apparently tries to cache already edmontonians drive, but at what stage this process is not clear.
The size of the cache in devfs2.conf the default is 50 MB.
It is possible somehow to force to write files larger than the cache size, just to a remote disk?
October 8th 19 at 00:30
2 answers
October 8th 19 at 00:32
and try to mount with the sync option
All I/O to the filesystem should be done synchronously. In case of media with limited number of write cycles (e.g. some flash drives) "sync" may cause life-cycle shortening.
and yet already for the most DavFS delay_upload — how many seconds to wait after a file entry in the directory.
When a file that has been changed is closed, mount.davfs will wait that many seconds before it will upload it to the server. This will avoid uploading of temporary files that will be removed immediately after closing. If you need the files to appear on the server immediately after closing, set this option to 0.
Default: 10 - ebony.Brown79 commented on October 8th 19 at 00:35
Unfortunately for mount.davfs there is no such option. - gus.Wintheiser commented on October 8th 19 at 00:38
and try the sync command before unmounting. - ebony.Brown79 commented on October 8th 19 at 00:41
then try to put in delay_upload 0 - ebony.Brown79 commented on October 8th 19 at 00:44
sync was obviously not working.
delay_upload too. As I understand it, it's just a delay before sending.

So far, the only solution I found is to set the cache size to 1MB and before the umount in a loop to check the presence of files in the cache. Once the folder has become empty, you can unmount. - gus.Wintheiser commented on October 8th 19 at 00:47
October 8th 19 at 00:34
Well, actually, made a crutch: before unmounting waiting for cache, not leaving all of the files.

echo "Mount"
mount /mnt/yandex
echo "Copy"
cp ~/yandex_test/* /mnt/yandex
while [ `find ~/.davfs2/cache/ -type f -not-name "index"|wc-l` -gt 0 ]; do
sleep 1

echo "Umount"
umount /mnt/yandex

At the same time measured the speed. For two files with a total size 258мб script worked 7 minutes, 12 seconds. I.e. the rate of about 0.6 megabits. Yandex from my ISP is local. Maybe "Drive" does not fall within a local network, while in the stage of "betta".

Find more questions by tags LinuxYandex