Menu

#171 SSHFS Error mounting remote directory

closed-fixed
5
2015-02-18
2013-03-29
No

I use the SSHFS approach to mount /home/partimag on a remote computer where I store backups. It no longer works from the clonezilla-live-2.1.1-7-amd64.iso or clonezilla-live-20130314-quantal-amd64.iso disks. The problem appears to be in the SSHFS command itself, and the solution is to include the trailing / character on the source path name.

the command that the menus run is: `sshfs -o noemplty,noatime -p 22 "user"@ipaddress:"/home/partimag" /home/partimag`
I am prompted for the password, enter it, and get the message "Clonezilla image home directory /home/partimag is not a mounting point! Failed to mount other dvice as /home/partimag!" The directory is partially mounted - I can't mount on top of it, and umount works.

When I run the command manually in the second console, it works, but when I try a command like sudo ls /home/partimag, the result is:
ls: cannot access /home/partimag: Input/output error

Changing the mount command to `sshfs -o noemplty,noatime -p 22 "user"@ipaddress:"/home/partimag/" /home/partimag` resolves the issue.

Here is the supporting post from a SSHFS page: http://permalink.gmane.org/gmane.comp.file-systems.fuse.sshfs/1189

Discussion

  • Steven Shiau

    Steven Shiau - 2013-04-01

    "Changing the mount command to `sshfs -o noemplty,noatime -p 22 "user"@ipaddress:"/home/partimag/" /home/partimag` resolves the issue. " -> I can not tell where you have changed... What did you change?

    Steven.

     
  • Richard Freeman

    Richard Freeman - 2013-10-12

    I can also confirm this behavior.

    To clarify - the issue is if the remote path doesn't end in a slash, it won't correctly mount. This appears to be an issue with sshfs.

    So, if I accept the defaults the program tries to mount user@server:/home/partimage and it fails.

    If I specify the remote path as "/home/partimage/" then it works. Note the trailing slash. This is about the REMOTE path, not the local one (confusing, because they're the same by default.

    Seems like the correction would be to either make the default have a slash, or add it to the sshfs command. The latter seems safer to me - a double-slash shouldn't hurt anything and works if the user modifies the path (I did not test this, however).

    So either:
    LC_ALL=C sshfs "$ssh_account"@$ssh_srv:"$sshfs_dir" $ocsroot -p $ssh_port $sshfs_extra_opt
    becomes
    LC_ALL=C sshfs "$ssh_account"@$ssh_srv:"$sshfs_dir/" $ocsroot -p $ssh_port $sshfs_extra_opt

    or
    $DIA --backtitle "$msg_nchc_free_software_labs" --title \ "Mount sshfs" --inputbox "$msg_sshfs_dir_path, $msg_ex $ocsroot" \ 0 0 $ocsroot $DIA_ESC \ 2> $TMP
    becomes
    $DIA --backtitle "$msg_nchc_free_software_labs" --title \ "Mount sshfs" --inputbox "$msg_sshfs_dir_path, $msg_ex $ocsroot/" \ 0 0 $ocsroot/ $DIA_ESC \ 2> $TMP

    Note - I did not test either of these changes.

     
  • Steven Shiau

    Steven Shiau - 2013-10-13
    • status: open --> closed-fixed
    • assigned_to: Steven Shiau
     
  • Steven Shiau

    Steven Shiau - 2013-10-13

    Got it. It's fixed in the git repository, and will be used in the next testing release.

    Thanks.

    Steven.

     

Log in to post a comment.