hasse69 / rar2fs

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

Systemd example has an error. #156

Closed SentinelCQ closed 3 years ago

SentinelCQ commented 3 years ago

In the Wiki, there is an example for enabling systemd automount. The Unit file for the .mount has the following.

[Mount] What=/mnt/mymount/rarfiles Where=/mnt/mymount/magic Type=fuse.rar2fs Options=allow_other

[Install] WantedBy=multi-user.target

But the current install only installs /usr/local/sbin/mount.rar2fs As such the mount fails, and unfortunately only gives the unhelpful error code 32 which is just mount failed.

After modifying the Type= line to say Type=rar2fs instead of Type=fuse.rar2fs it works.

hasse69 commented 3 years ago

Thanks for the observation. Since I am not actually the author of that section in the Wiki I have instead invited you to the project collaborators. Once accepted, feel free to update the Wiki and close the issue when done.

Adding @zimme, was this simply a typo?

SentinelCQ commented 3 years ago

I have updated the wiki with what worked for me using the current rar2fs as of Feb. 2021.

Will wait for a day or two to see if @zimme has a comment and otherwise will close the issue.

Thanks for the quick response.

zimme commented 3 years ago

Can't remember contributing something about systemd, I added some info related to threads and musl. Just a quick search about mounting fuse filesystems using systemd the type should be fuse.sshfs, fuse.rar2fs etc. However something might have changed in systemd?

hasse69 commented 3 years ago

Can't remember contributing something about systemd, I added some info related to threads and musl.

Sorry, my memory failed me. You are of course absolutely right, sorry for the spam :(

And also to be absolutely clear, rar2fs has never installed anything but the mount.rar2fs helper. So I agree with @zimme here, this must be something that has changed in systemd since this section was added to the wiki. Maybe worth the effort throwing in a comment about it?

SentinelCQ commented 3 years ago

Sure. I also got tripped up when I tried to add it via the fstab

rar2fs#/mnt/mymount/rarfiles /mnt/mymount/magic fuse rw,allow_other 0 0

I didn't end up trying it with just rarfs as the fstype in the list instead of fuse.

zimme commented 3 years ago

The programs mount and umount support filesystem subtypes. The subtype is defined by a '.subtype' suffix. For example 'fuse.sshfs'. It's recommended to use subtype notation rather than add any prefix to the mount source (for example 'sshfs#example.com' is deprecated).

It seems the prefix style has been deprecated. This is from man mount

hasse69 commented 3 years ago

Can we close this issue now?

zimme commented 3 years ago

The wiki has been updated and we know the cause of the problem so people running into this problem should be able to find a solution either here in the issues or on the wiki.

I'd say it's fine to close.