MDKPredator/degoo_drive

Question - Is this read and write or only read.

swannie-eire opened this issue · 11 comments

In my tests i can only read from the degoo drive is it possible to write to it also?

You cannot, for example, edit files, you can only add new ones, or read them

For adding new files is it as simple as just copying the file to the degoo folder or is it more complex?

Copy it as is, but keep this in mind

I successfully mount my degoo to /home/degoo with docker and can see all files, but I guess cp some files to it seems silently ignored (if its big file, some waiting time needed though) and no file shows up.

--debug

2022-04-08 10:09:24.564 MainThread: [__main__] reading /Web/test
2022-04-08 10:09:30.271 MainThread: [__main__] lookup for simpleDXF-Model.pdf in 17418974510
2022-04-08 10:09:30.274 MainThread: [__main__] lookup for simpleDXF-Model.pdf in 17418974510
2022-04-08 10:09:30.277 MainThread: [__main__] _add_path for 1321812, /tmp/simpleDXF-Model.pdf

--debug-fuse

root@b13eedf8b220:~# python /degoo_drive/fuse_degoo.py --debug-fuse
FUSE library version: 3.10.3
unique: 2, opcode: INIT (26), nodeid: 0, insize: 56, pid: 0
INIT: 7.32
flags=0x03fffffb
max_readahead=0x00020000
   INIT: 7.31
   flags=0x0041b039
   max_readahead=0x00020000
   max_write=0x00100000
   max_background=0
   congestion_threshold=0
   time_gran=1
   unique: 2, success, outsize: 80
unique: 4, opcode: GETATTR (3), nodeid: 1, insize: 56, pid: 161
   unique: 4, success, outsize: 120
unique: 6, opcode: OPENDIR (27), nodeid: 1, insize: 48, pid: 161
   unique: 6, success, outsize: 32
unique: 8, opcode: READDIRPLUS (44), nodeid: 1, insize: 80, pid: 161
   unique: 8, success, outsize: 512
unique: 10, opcode: READDIRPLUS (44), nodeid: 1, insize: 80, pid: 161
   unique: 10, success, outsize: 16
unique: 12, opcode: RELEASEDIR (29), nodeid: 1, insize: 64, pid: 0
   unique: 12, error: -38 (Function not implemented), outsize: 16
unique: 14, opcode: GETATTR (3), nodeid: 1, insize: 56, pid: 161
   unique: 14, success, outsize: 120
unique: 16, opcode: OPENDIR (27), nodeid: 1, insize: 48, pid: 161
   unique: 16, success, outsize: 32
unique: 18, opcode: READDIRPLUS (44), nodeid: 1, insize: 80, pid: 161
   unique: 18, success, outsize: 512
unique: 20, opcode: READDIRPLUS (44), nodeid: 1, insize: 80, pid: 161
   unique: 20, success, outsize: 16
unique: 22, opcode: RELEASEDIR (29), nodeid: 1, insize: 64, pid: 0
   unique: 22, error: -38 (Function not implemented), outsize: 16
unique: 24, opcode: GETATTR (3), nodeid: 1, insize: 56, pid: 161
   unique: 24, success, outsize: 120
unique: 26, opcode: OPENDIR (27), nodeid: 15808835807, insize: 48, pid: 161
   unique: 26, success, outsize: 32
unique: 28, opcode: READDIRPLUS (44), nodeid: 15808835807, insize: 80, pid: 161
   unique: 28, success, outsize: 904
unique: 30, opcode: READDIRPLUS (44), nodeid: 15808835807, insize: 80, pid: 161
   unique: 30, success, outsize: 16
unique: 32, opcode: RELEASEDIR (29), nodeid: 15808835807, insize: 64, pid: 0
   unique: 32, error: -38 (Function not implemented), outsize: 16
unique: 34, opcode: GETATTR (3), nodeid: 15808835807, insize: 56, pid: 161
   unique: 34, success, outsize: 120
unique: 36, opcode: OPENDIR (27), nodeid: 17418974510, insize: 48, pid: 196
   unique: 36, success, outsize: 32
unique: 38, opcode: READDIRPLUS (44), nodeid: 17418974510, insize: 80, pid: 196
   unique: 38, success, outsize: 200
unique: 40, opcode: READDIRPLUS (44), nodeid: 17418974510, insize: 80, pid: 196
   unique: 40, success, outsize: 16
unique: 42, opcode: RELEASEDIR (29), nodeid: 17418974510, insize: 64, pid: 0
   unique: 42, error: -38 (Function not implemented), outsize: 16
unique: 44, opcode: OPENDIR (27), nodeid: 17418974510, insize: 48, pid: 197
   unique: 44, success, outsize: 32
unique: 46, opcode: GETATTR (3), nodeid: 17418974510, insize: 56, pid: 197
   unique: 46, success, outsize: 120
unique: 48, opcode: READDIRPLUS (44), nodeid: 17418974510, insize: 80, pid: 197
   unique: 48, success, outsize: 200
unique: 50, opcode: GETXATTR (22), nodeid: 17427894736, insize: 65, pid: 197
   unique: 50, error: -38 (Function not implemented), outsize: 16
unique: 52, opcode: READDIRPLUS (44), nodeid: 17418974510, insize: 80, pid: 197
   unique: 52, success, outsize: 16
unique: 54, opcode: RELEASEDIR (29), nodeid: 17418974510, insize: 64, pid: 0
   unique: 54, error: -38 (Function not implemented), outsize: 16
unique: 56, opcode: GETATTR (3), nodeid: 17418974510, insize: 56, pid: 198
   unique: 56, success, outsize: 120
unique: 58, opcode: LOOKUP (1), nodeid: 17418974510, insize: 60, pid: 198
   unique: 58, error: -2 (No such file or directory), outsize: 16
unique: 60, opcode: LOOKUP (1), nodeid: 17418974510, insize: 60, pid: 198
   unique: 60, error: -2 (No such file or directory), outsize: 16
unique: 62, opcode: CREATE (35), nodeid: 17418974510, insize: 76, pid: 198
   unique: 62, success, outsize: 160
unique: 64, opcode: GETATTR (3), nodeid: 1321812, insize: 56, pid: 198
   unique: 64, success, outsize: 120
unique: 66, opcode: GETATTR (3), nodeid: 1321812, insize: 56, pid: 198
   unique: 66, success, outsize: 120
unique: 68, opcode: WRITE (16), nodeid: 1321812, insize: 2000, pid: 198
   unique: 68, success, outsize: 24
unique: 70, opcode: FLUSH (25), nodeid: 1321812, insize: 64, pid: 198
   unique: 70, error: -38 (Function not implemented), outsize: 16
unique: 72, opcode: RELEASE (18), nodeid: 1321812, insize: 64, pid: 0
   unique: 72, success, outsize: 16

Hi @tf0054, Where are you trying to copy the file to? Inside the container or to the host? That is to say:

Container:
cp /home/degoo/myFile /destination/path/myFule

Container to host:
docker cp container:/home/degoo/myFile /host/path/myFile

Thank you for catching the comment.

Right. Im using a shell on the docker and the source file is located on a local folder which mounted to the docker with -v from Mac
The target folder is from degoo represented by degoo_drive.

Unfortunately files mounted with a volume are not visible from the host machine (I really don't know why). Therefore, you will have to mount the virtual drive directly on the host (without docker):
git clone...
python degoo_drive/fuse_degoo.py

Hmm. The file I'd like to copy and actually located on my host can be opened and read on the shell on the docker. (If this is the point you mentioned?)

Though I agree itd be a tricky compared with copying files from the folder actually located on the docker and which will cause the problem. Will try copy the docker local file tonight. Thanks!

--
Unfortunately, the file on docker cannot be copied to degoo too.

root@839a2b1454ef:/home/degoo/Web/test# ls -la
total 507
-rw-rw-r-- 1 root root 518723 Mar 29 12:47 sustainability-13-04025.pdf
root@839a2b1454ef:/home/degoo/Web/test# cp /etc/passwd .
root@839a2b1454ef:/home/degoo/Web/test# ls -la
total 507
-rw-rw-r-- 1 root root 518723 Mar 29 12:47 sustainability-13-04025.pdf
root@839a2b1454ef:/home/degoo/Web/test# 

Also copying file@degoo to newfile@degoo seems same result.

root@839a2b1454ef:/home/degoo/Web/test# ls -la
total 507
-rw-rw-r-- 1 root root 518723 Mar 29 12:47 sustainability-13-04025.pdf
root@839a2b1454ef:/home/degoo/Web/test# cp sustainability-13-04025.pdf sustainability-13-040252.pdf 
root@839a2b1454ef:/home/degoo/Web/test# ls -la
total 507
-rw-rw-r-- 1 root root 518723 Mar 29 12:47 sustainability-13-04025.pdf
root@839a2b1454ef:/home/degoo/Web/test# 

Hi @tf0054

Please do not edit the post once the topic is closed, I just happened to see it.

Have you checked the logs when you try to copy the file? (python degoo_drive/fuse_degoo.py --debug)

Keep in mind this

Hi, @MDKPredator
Right, but Im happy you found the change (:

I hadnt checked the logs, sorry. After the tries, I found bernd-wechner's cli worked on the same docker as expected and my urgent needs were satisfied.

But I will find time and post the logs!

I was not able to get write to work either. I got busy at work and didnt get a chance to go back and test.

I could cp the file to the degoo dir and it would show in the container dir but it would not show on the degoo web UI. i left it 24 hours and it still did not show in the degoo web UI.

Ill try to do some more testing when i have time and get the logs.