hasse69 / rar2fs

FUSE file system for reading RAR archives
https://hasse69.github.io/rar2fs/
GNU General Public License v3.0
275 stars 27 forks source link

Can't see unrared files #127

Closed jepz88 closed 4 years ago

jepz88 commented 4 years ago

Hi, Love the idea of this, but cant seem to make it work. The build works fine, the mount works, BUT when i enter the mounted folders there are no files. Well, all rar files are gone but the archived file is not there.

For example, I can 'cd' to the rar2fs mounted volume, and the structure is just like my real NAS, but when entering folder 1, there is just a .nfo and .sfv file, no video file (mkv mostly).

What could I been doing wrong?

Would really like this to get to work with my plex server. Se log outputs below.

Thanks! :)

--

Linux nuc 4.15.0-72-generic #81-Ubuntu SMP Tue Nov 26 12:20:02 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

rar2fs v1.28.0-gitc223aa4 (DLL version 7) Copyright (C) 2009 Hans Beckerus This program comes with ABSOLUTELY NO WARRANTY. This is free software, and you are welcome to redistribute it under certain conditions; see http://www.gnu.org/licenses/ for details. FUSE library version: 2.9.7 fusermount version: 2.9.7 using FUSE kernel interface version 7.19

linux-vdso.so.1 (0x00007ffff45ea000)
libfuse.so.2 => /lib/x86_64-linux-gnu/libfuse.so.2 (0x00007fc2976fa000)
libunrar.so => /usr/lib/libunrar.so (0x00007fc2974a4000)
librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007fc29729c000)
libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007fc296f13000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007fc296cfb000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007fc296adc000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fc2966eb000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007fc2964e7000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007fc296149000)
/lib64/ld-linux-x86-64.so.2 (0x00007fc297b4d000) 
hasse69 commented 4 years ago

Hello, thanks for the issue report. One things strikes me a bit odd here, this looks like a version of rar2fs you built yourself, but then why do we see this

libunrar.so => /usr/lib/libunrar.so (0x00007fc2974a4000)

By default rar2fs links statically to libunrar, so what version of unrarsrc did you build against and what is the version in /usr/lib ? I have seen this problem before when an incompatible version of libunrar is installed on the system compared to what rar2fs was compiled against.

hasse69 commented 4 years ago

My guess is that there is a version mismatch

rar2fs v1.28.0-gitf140078 (DLL version 8)    Copyright (C) 2009 Hans Beckerus

Your build says version 7 here. I really doubt you downloaded an old version of unrarsrc? Did you really build the unrarsrc package too?

Did you check this out https://github.com/hasse69/rar2fs/wiki#q-13-how-do-i-build-this-package ?

jepz88 commented 4 years ago

Hi! Redid everything (a few times) accoring to your steps, but doesnt work anyway. Get a new version in the though.. Can you see something has been missed? Feels like something with unrar is screwing it up? Tried the same unrar source file to build to my server. How do i check the right version?

rar2fs v1.28.0-gitc223aa4 (DLL version 8) Copyright (C) 2009 Hans Beckerus This program comes with ABSOLUTELY NO WARRANTY. This is free software, and you are welcome to redistribute it under certain conditions; see http://www.gnu.org/licenses/ for details. FUSE library version: 2.9.7 fusermount version: 2.9.7 using FUSE kernel interface version 7.19

linux-vdso.so.1 (0x00007ffddcbe2000) libfuse.so.2 => /lib/x86_64-linux-gnu/libfuse.so.2 (0x00007f8820ed4000) librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f8820ccc000) libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f8820943000) libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f882072b000) libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f882050c000) libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f882011b000) libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f881ff17000) libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f881fb79000) /lib64/ld-linux-x86-64.so.2 (0x00007f8821376000)

hasse69 commented 4 years ago

Now we can conclude it is not a version mismatch as I first thought. It has been statically linked so whatever version is installed on your system does not matter. This was an interesting problem, never heard of it before, not when versions are matching at least. Then we need to try some things to narrow it down.

First of all, can you download (checkout) latest official release version (v1.28.0) from git instead of master/HEAD. Just to out rule some recent change caused this to break.

Also try to mount using the -d switch (foreground debug mode), it will dump a lot of information that might become valuable.

If you try to list one of your folders using ls -a, do you see the . and .. folders?

I am starting to wonder if this might be caused by some permission problems. Do you mount as root or as a "regular" user?

jepz88 commented 4 years ago

Hi again, I used git clone from your link.. Also tried mount as root.

And yes, I see . and .. and also jpg, sfv and folders inside but not rar nor mkv :(

Jesper

hasse69 commented 4 years ago

Did you clone a specific version? Make sure to do git checkout v1.28.0 after you cloned the repo and rebuild. Please attach a log from -d here or if you feel it contains information you do not wish to reveal you can send it as private email to hans.beckerus AT gmail.com.

The only reason why no files would show up is if the archive contents cannot be parsed for some reason. Does this happen for all you archives? Have you tried just to mount a single .rar file and not a complete directory tree?

jepz88 commented 4 years ago

Yes its the same for all my files (well, i checked +15 folders). Also tried to mount single .r01-files etc, but nothing there either.

Rebuilt it again, and -d when mounting. See below:

root@nuc:/home/jepzor/rar2fs/rar2fs# rar2fs -d /home/nas02/video/HD/ /home/jepzor/test/ rar2fs[23605]: mounted /home/jepzor/test unique: 1, opcode: INIT (26), nodeid: 0, insize: 56, pid: 0 INIT: 7.26 flags=0x001ffffb max_readahead=0x00020000 INIT: 7.19 flags=0x00000010 max_readahead=0x00020000 max_write=0x00020000 max_background=0 congestion_threshold=0 unique: 1, success, outsize: 40

jepz88 commented 4 years ago

Feels like a permission thing now. After rebuilding again, I now was able to see the unrared files. Although the mount wont show up in Plex, so it feels like I need to put some permission for it?

hasse69 commented 4 years ago

Strange, I am using PLEX too without issues. But you should add the -oallow_other mount option I think. Fuse and permissions is always causing confusion. The PMS is using its own user AFAIK. You must make sure it has access to your files. Maybe even add it to the fuseuser group if such exists.

jepz88 commented 4 years ago

Finally! Absolutly awesome! :) Only thing remaining is automount the NAS so rar2fs also mounts at start :)

Huge thank you!

Jesper

hasse69 commented 4 years ago

For systemd you can check here https://github.com/hasse69/rar2fs/wiki#3-automount-with-rar2fs or simply use /etc/fstab.

An entry like this in fstab should do it

/home/nas02/video/HD/ /home/jepzor/test/ rar2fs --seek-length=1,allow_other 0 0
hasse69 commented 4 years ago

Closing issue since it is not a problem with rar2fs

hasse69 commented 4 years ago

Do not use latest version from git, it is broken. Please use the official release v1.28.0.

jepz88 commented 4 years ago

Ah okey, must have gotten the broken version at first then :)

hasse69 commented 4 years ago

No, not necessarily. Only if you used the seek length option you would see this. I recommend you use it and stick with version 1.28.0 until I will find some time to fix the problem on master.

jepz88 commented 4 years ago

Ended up with rar2fs v1.28.0 (DLL version 8). And mounting by a .sh-script in a systemd service:
mount -t cifs //192.168.1.3/nas02 /home/nas02 -o credentials=/home/jepzor/.smbcredentials /usr/local/bin/rar2fs -o allow_other --seek-length=0 /home/nas02/video /home/jepzor/rar2fsmovies/

Didnt get it to work in fstab. Works with mount -a but not automatically. And when trying to mount with rar2fs it says "dont recognize rar2fs filesystem" or similar..

hasse69 commented 4 years ago

If you get that error you probably did not install the mount.rar2fs helper which should be in installed by default in /usr/local/sbin by ’make install’.