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

Add example for --seek-length flag in systemd unit #168

Closed alethenorio closed 3 years ago

alethenorio commented 3 years ago

I am using a systemd unit in rar2fs and I have looked everywhere but cannot find an answer on how do I configure rar2fs --seek-length flag in a systemd unit file.

Can we maybe add it as an example in Wiki?

hasse69 commented 3 years ago

Sorry, I have very little experience with systemd mount units. But from what I can tell you should use the Options= section. Is that not working?

https://dev.to/adarshkkumar/mount-a-volume-using-systemd-1h2f

Guessing here, but maybe something like this?

[Unit]
Description=Whatever

[Mount]
What=/your/source/folder
Where=/your/target/folder
Type=rar2fs
Options=defaults,--seek-length=1

[Install]
WantedBy=multi-user.target
alethenorio commented 3 years ago

I am also not good at systemd unit files. I have googled everywhere but couldn't find a lot of good documentation on the subject. I'll keep digging and see if I can find out how and update the issue

hasse69 commented 3 years ago

So the example above did not give you any additional clues? Maybe Options= should be a space separated list, not using ','?

alethenorio commented 3 years ago

Apologies. You are absolutely correct. I tried it out with a comma separation as you originally suggested and it seems to work (at least the directory mounts but I am not quite sure how to verify). Thank you.

Maybe add it as an example in the Wiki?

hasse69 commented 3 years ago

I guess easiest way to verify is to misspell the option on purpose and verify that mount fails 😉

Yes, we can add it to the wiki? Should I give you write access so that you can do it once you have some real example to share?

zappepappe commented 3 years ago

Not sure for mounting with systemd, but for me htop will show the currently running rar2fs with mount points and options.

alethenorio commented 3 years ago

I'll be more than happy to write an example in the wiki.

@zappepappe Yeah I just checked PS and grepped by the process name and could verify as well

hasse69 commented 3 years ago

@alethenorio you have been invited as a collaborator

hasse69 commented 3 years ago

@alethenorio I saw that there was already some good info about automount/mount and systemd in the wiki, maybe you can simply complement that with some info about adding additional arguments to the mount command.

alethenorio commented 3 years ago

Indeed. That was my plan. :)

hasse69 commented 3 years ago

@alethenorio Please close the issue when you feel ready with your updates to the wiki.

alethenorio commented 3 years ago

Sorry for the delay here. It is now fixed.