LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 05-10-2019, 06:12 PM   #1
BryanFRitt
Member
 
Registered: May 2004
Distribution: Debian
Posts: 37

Rep: Reputation: 0
How to unbind/rebind paths over sshfs without disconnect/reconnecting the network


How to unbind/rebind paths over sshfs without disconnect/reconnecting the network?

I mounted a sshfs directory, then binded directories within that.
If I unbind the binded mount points and then try to rebind them, they fails to rebind.
However, if I disconnect the network, and reconnect, the rebinding will then again work.

Code:
# shorting down the script, here's what I'm doing...

# mount the main sshfs directory
sudo sshfs -p "$RPORT" -o follow_symlinks -o allow_other -o IdentityFile="$RSAKEY" -o reconnect "$RFSUSER@$url:/" "$MAINMOUNTPOINT"

# bind the subdirectory
sudo bindfs "$MAINMOUNTPOINT/media/$drive" "/media/$drive"

# unmount the subdirectory bind, etc...
sudo umount "/media/$drive"; sudo umount "$MAINMOUNTPOINT" # followed by the sshfs command above

# try to rebind it again... fails to rebind, no error message
sudo bindfs "$MAINMOUNTPOINT/media/$drive" "/media/$drive"
# disconnect then reconnect the network, and try again... command succeeds
 
Old 05-12-2019, 12:17 AM   #2
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 11,687
Blog Entries: 9

Rep: Reputation: 3102Reputation: 3102Reputation: 3102Reputation: 3102Reputation: 3102Reputation: 3102Reputation: 3102Reputation: 3102Reputation: 3102Reputation: 3102Reputation: 3102
i don't know about the bind/unbind bit, but back when i was still using sshfs (i long since switched to NFS), i had sth like this:
Code:
# mounting:
sshfs -C -o "$sshfs_options" "$location" "$mountdir"
# unmounting:
fusermount -u -z "$mountdir"
 
  


Reply

Tags
bind, mount, sshfs, umount, unmount


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Temporary "unbind" WiFi interface mackowiakp Linux - General 4 03-24-2015 02:54 AM
USB modem safely remove fails. manually unbind help needed deepclutch Linux - Hardware 1 04-30-2012 10:45 AM
[SOLVED] rebind key in TTY rizzy Linux - Software 3 04-10-2012 02:11 PM
Tell DHCP to not rebind its old lease. 1veedo Linux - Networking 3 06-20-2010 06:30 PM
Rebind mouse button 6? jago25_98 Linux - Software 2 04-27-2004 07:27 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 09:39 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration