0

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.

WillMcavoy
  • 1,795
  • 4
  • 22
  • 34

2 Answers2

1

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
Anya Shenanigans
  • 91,618
  • 3
  • 107
  • 122
  • :Thanks.It worked for local directory.Now i am trying to mount a remote samba share using OFS mount utility.The samba share is working properly and is accessible via smbclient.However when i try to execute `sudo mount -t ofs smb://192.168.11.129/sharedfolder /home/usr/Downloads/test/` ,I get an error **unknown filesystem type 'smb'**.What can be the reason behind this.OFS supports smb as per their documentation. – WillMcavoy Feb 13 '15 at 16:05
  • depending on your linux distro and it's age, you can end up with it called either `cifs` or `smb`. On my debian system, it's called `cifs` so you use `cifs://` for the uri, rather than `smb://`. – Anya Shenanigans Feb 13 '15 at 16:13
  • I am trying to mount it on ubuntu machine.Both smb:// and smbfs:// do not work. – WillMcavoy Feb 13 '15 at 16:14
  • Does not work for cifs://. Error:wrong fs type, bad option. Ubuntu 14.04 – WillMcavoy Feb 13 '15 at 16:17
  • Sounds like you don't have `mount.cifs` on your system. Have you tried adding the `cifs-utils` package? e.g. by trying `apt-get install samba cifs-utils`? – Anya Shenanigans Feb 13 '15 at 16:22
  • I have mount.ofs in my system. ofs is built on the top of FUSE.I want to mount using OFS mount utility and they say it supports samba. [link]http://offlinefs.sourceforge.net/wiki/usage/getting_started – WillMcavoy Feb 13 '15 at 16:25
  • Your **OS** has to support the filesystem that OFS is using - it's simply a layer on top of the underlying filesystem. If you don't have samba/cifs support installed on your system, then you can't use OFS on top of it. What OFS does is mount the remote filesystem somewhere else and arbitrate access to it. – Anya Shenanigans Feb 13 '15 at 16:33
  • Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/70865/discussion-between-willmcavoy-and-petesh). – WillMcavoy Feb 13 '15 at 16:36
0

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

Ivan Vinogradov
  • 4,269
  • 6
  • 29
  • 39