nagyistoce / rar2fs

Automatically exported from code.google.com/p/rar2fs
0 stars 0 forks source link

Documentation: fstab #8

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Explaination how to add rar2fs to fstab:

create /sbin/mount.rar2fs:
#!/bin/bash
OPTIONS="`echo $* |  sed 's/,--/ --/g'`"
sudo rar2fs --seek-length=1 $OPTIONS

In fstab:
/mnt/files    /mnt/rar    rar2fs    ro,noatime,--seek-length=1      0       0

Original issue reported on code.google.com by irba...@gmail.com on 21 Jun 2011 at 9:54

GoogleCodeExporter commented 9 years ago
Ooops!

it should read:
sudo rar2fs $OPTIONS

Original comment by irba...@gmail.com on 21 Jun 2011 at 11:24

GoogleCodeExporter commented 9 years ago
Interesting post. But what about that sudo business?
I think this is how it should be done
http://www.debuntu.org/2006/04/27/39-mounting-a-fuse-filesystem-form-etcfstab

Remember, if you mount your fs as root you need to use -oallow_other to allow 
for normals users to access the mount point. A proper fuse installation should 
allow mounting from non-root users.

Original comment by hans.bec...@gmail.com on 22 Jun 2011 at 6:38

GoogleCodeExporter commented 9 years ago

Original comment by hans.bec...@gmail.com on 22 Jun 2011 at 6:43

GoogleCodeExporter commented 9 years ago
Using "normal" fuse-mount you can't (AFAIK) pass rar2fs parameters in fstab.
rar2fs#/mnt/files /mnt/rar ro,noatime,--seek-length=1 0 0
doesn't work. either does ro,noatime,seek-length=1. Hence the sed command.

I can't remember why I'm using sudo; might be because of one of my own special 
cases for my system at home, so it can most probably be omitted.

Original comment by irba...@gmail.com on 22 Jun 2011 at 11:05

GoogleCodeExporter commented 9 years ago
Have you tried the afuse utility for auto-mounting FUSE file systems when mount 
points are accessed ? Maybe it is not what you want though.

Original comment by hans.bec...@gmail.com on 25 Aug 2011 at 6:23

GoogleCodeExporter commented 9 years ago
Here is an update to this issue.

The latest version of rar2fs has an updated argument parser. The new parser 
makes sure options are treated in the same way as native fuse options. For fuse 
the following two examples are both valid and will start fuse in the foreground:

  a) rar2fs -f x y -o ro
  b) rar2fs x y -o ro,-f

That means that mounting fuse through /etc/fstab is possible, still when 
providing non-standard mount options. This is now also the case for the 
'longopts' as defined by rar2fs.

The below is thus syntactically correct and will properly mount from /etc/fstab 
and setting seek length to 2.

  rar2fs#/mnt/files /mnt/rar fuse ro,noatime,--seek-length=2 0 0

All this provided of course that fuse is correctly installed and there is a 
'/sbin/mount.fuse' and 'fusermount' utility available. Also rar2fs must be 
accessible through the systems path.

Original comment by hans.bec...@gmail.com on 9 Jan 2012 at 8:37

GoogleCodeExporter commented 9 years ago
 Case closed.

Original comment by hans.bec...@gmail.com on 26 Jan 2013 at 3:19