How do I configure fuse-hdfs with autofs?

04
2013-08
  • desuser

    I am trying to setup autofs so it will automatically mount hdfs. From /etc/fstab if I have:

    /fs1/fuse_dfs.wrapper.sh#dfs://namenode:9000   /hdfs fuse
    

    this works.

    Now I am trying to setup /etc/auto.master with this:

    hdfs -fstype=fuse,rw,nodev,nonempty,noatime,allow_other :/fs1/fuse_dfs.wrapper.sh#dfs://namenode:9000 -debug
    

    When I restart autofs I get:

    handle_mounts: mount of /fs1/fuse_dfs.wrapper.sh#dfs://namenode:9000 failed!
    

    References:

  • Answers
    Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

    Related Question

    ubuntu - cannot mount remote partition using fstab/fuse
  • HorusKol

    Using a combination of http://ubuntu-tutorials.com/2007/01/02/mount-remote-directories-securely-with-ssh-ubuntu-6061-610/ and http://www.tuxfiles.org/linuxhelp/fstab.html I figured I could mount the root of another computer to somewhere on my new laptop to make it easier to transfer files and stuff.

    Now, I can connect through SSH and browser the files through an ad-hoc mount - but I would like to be able to do this automatically, and so had a look at fstab.

    my new entry in fstab is:

    remote_comp:/        /var/remote_comp     fuse    defaults       0        0
    

    but testing with mount -a results in the following error:

    /bin/sh: remote_comp:/: not found
    

    I thought the problem was because I was trying to mount the root of the other computer, but even trying sub-directories result in the same error message.


  • Related Answers
  • Shiki

    First, you should use a folder like /mnt/remote OR /media/remote. /var is NOT for that purpose, you should leave it as it is.

    Second, fstab should look like this:
    [email protected]:/home/user /media/user fuse defaults,allow_other 0 0
    OR
    [email protected]:/home/llib/FAH /media/FAH2 fuse defaults 0 0
    (Example is from the Arch howto.)

  • dag729

    I'd simply go with

    #!/bin/sh
    
    sshfs user@hostname:/path/to/folder /local/folder
    

    and then put it in /etc/inittab