WillMcavoy
WillMcavoy

Reputation: 1815

Mount using offline file system (OFS+FUSE)

I am trying to explore OFS (Offline file system) built on the top of FUSE and still exploring it.

http://offlinefs.sourceforge.net/wiki/

I installed it on both Fedora and Ubuntu 14.04,however whenever I try to mount any local directory using mount utility, I get the “Transport endpoint not connected” for mount directory.

This is how I am running it :

mount –t ofs file:/home/user/Downloads/src /home/user/Downloads/mountdir

The above executes without error and if I run mount command on ../mountdir ,it correctly says

ofs on /mountdir type fuse.ofs.

However when I try to browse /mountdir I get “Transport endpoint not connected”.I even tried unmounting and restarting the machine,no use!

Can someone point me to a right direction.

Upvotes: 0

Views: 2820

Answers (2)

Ignacio
Ignacio

Reputation: 1

It only worked in my case (ubuntu 16) with the following command:

mount -t ofs -o remoteoptions=username=XXXXX:password=xxxx:guest:vers=3.0 cifs://HOST/dir /mountpoint

Upvotes: 0

Anya Shenanigans
Anya Shenanigans

Reputation: 94829

You're using it incorrectly, you must have two forward slashes in the URI that is specified as the mount device i.e. file://.

As an e.g.

$ sudo mount -t ofs file://usr /tmp/mnt
$ ls /tmp/mnt
bin/  etc/  games/  include/  lib/  lib32/  libx32/  local/  sbin/  share/  src/
$ sudo umount /tmp/mnt

with a single file:/ we have:

$ sudo mount -t ofs file:/usr /tmp/mnt
$ ls /tmp/mnt
ls: cannot access /tmp/mnt: Transport endpoint is not connected
$ sudo umount /tmp/mnt

Now if you're intending to use a remote filesystem with OFS, which is the primary use-case, you have to first install the relevant remote filesystem packages on the OS you're using, then use, for example, if we've got cifs, which is the newer name for smb/samba:

sudo mount -t ofs cifs://127.0.0.1/Music /tmp/music

Now, if you need to pass options to cifs, such as the password/username/a config file, you can use the remoteoptions parameter, so for example for guest account access:

sudo mount -t ofs -o remoteoptions=guest cifs://127.0.0.1/Music /tmp/music

or, if you're using a credentials file (see mount.cifs manual page), you can use:

sudo mount -t ofs -o remoteoptions=credentials=/etc/remotecreds.conf cifs://127.0.0.1/Music /tmp/music

for remote options, you use a : as the separator (it gets swapped for a , when passed into the underlying mount command), so to mount as an explicit user/password:

sudo mount -t ofs -o remoteoptions=username=mike:password=mike1 cifs://127.0.0.1/Music /tmp/music

Upvotes: 1

Related Questions