2

I have a remote computer, and I mount its filesystem with sshfs to my local folder ~/user@host, like that:

sshfs user@host: ~/user@host

Works nice, but I want to implement "lazy" mount: i.e. I don't want it to be mounted at system startup, but I want it to be mounted just when I'm trying to open my local folder ~/user@host .

Probably there is some way to define like "filesystem hooks": just when user requests directory contents, some command should be executed. Is it possible?

4

I think you're describing autofs. Autofs mounts filesystems on demand, that is, when you try to access them. According to this Arch wiki page, it should work with sshfs. https://wiki.archlinux.org/index.php/autofs#FTP_and_SSH_.28with_FUSE.29

  • Thank you, it looks like exactly what I need (but I'll check later) – Dmitry Frank Mar 22 '15 at 14:45

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.