6

Is it possible to mount a directory, either an ext# local one, or one in a /media mounted windows drive, so it is seen as a mounted drive itself?

10

If you only want quick access to a certain directory in Nautilus and the file dialogs, you can also use a bookmark of course...

Anyway, there is a FUSE filesystem named bindfs (`sudo apt-get install bindfs) that probably does exactly what you want. For example the following:

bindfs -n /media/USB-HDD-01/ISO/ /home/johnc/ISO-images

would result in ISO-images to show up as a mounted filesystem in the Places sidepanel in Nautilus. The -n is required because otherwise bindfs tries to use the allow_other FUSE option, which by default is not allowed for regular users (if you use bindfs in /etc/fstab this is not a problem).

The first directory you give is the existing one, the second directory you give is an empty directory under which the contents of the existing one will appear.

To unmount, use:

fusermount -u /home/johnc/ISO-images

PS: Nautilus (the file manager) will show mountable/mounted filesystems, not drives, but I assume that's what you were looking for.

  • 1
    A smidge of extra info: You may create a "bind" mount without using FUSE. sudo mount -o bind from_dir to_dir. I believe the result is the same though and using the FUSE filesystem does not require sudo access. – KFro Nov 3 '10 at 5:30
  • 2
    @KFro: with "mount --bind" it will not show up in the Nautilus "Places sidebar" though (I tested that before answering). – JanC Nov 3 '10 at 5:36
1

If you mount a folder using a transparent fusefs system, gnome will pick it up and show it as a drive. You'll loose some overhead in the calls, but not much for a fast machine.

You could also make a gvfs system that mounts a folder, or a localhost ftp, ssh or other type of mount. That will show as a drive too.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.