SSHFS mounts on a mobile laptop - system hangs when not on LAN
Clash Royale CLAN TAG#URR8PPP
up vote
3
down vote
favorite
This is an Arch Linux system. I have 7 SSHFS mounts listed in /etc/fstab. They all use these options:
<source> <mountpoint> fuse.sshfs x-systemd.automount,_netdev,user,follow_symlinks,identityfile=/home/user/.ssh/id_rsa,default_permissions
The source for these mounts is a local file server. When connected to the LAN, everything works as expected.
However, when the laptop is elsewhere, these mounts cause a problem. Booting up takes a long time and some applications will hang for a long time. For example, Dolphin opens and hangs, then has to be force closed.
I would like for these SSHFS mounts to only be attempted when the laptop is connected to the LAN via wired Ethernet.
How can this be achieved?
(I could be wrong, but I don't believe autofs is the solution because I don't want the mounts to be attempted upon browsing to a mountpoint (as in Dolphin), unless the system is connected to the LAN.)
mount fstab sshfs
add a comment |Â
up vote
3
down vote
favorite
This is an Arch Linux system. I have 7 SSHFS mounts listed in /etc/fstab. They all use these options:
<source> <mountpoint> fuse.sshfs x-systemd.automount,_netdev,user,follow_symlinks,identityfile=/home/user/.ssh/id_rsa,default_permissions
The source for these mounts is a local file server. When connected to the LAN, everything works as expected.
However, when the laptop is elsewhere, these mounts cause a problem. Booting up takes a long time and some applications will hang for a long time. For example, Dolphin opens and hangs, then has to be force closed.
I would like for these SSHFS mounts to only be attempted when the laptop is connected to the LAN via wired Ethernet.
How can this be achieved?
(I could be wrong, but I don't believe autofs is the solution because I don't want the mounts to be attempted upon browsing to a mountpoint (as in Dolphin), unless the system is connected to the LAN.)
mount fstab sshfs
Did you have a look at creating a udev rule
â RubberStamp
Jan 4 at 21:50
@RubberStamp - udev seems like a good idea. I would need some help to implement it in this case. I wasn't even aware that udev could be used in this way until you suggested it.
â MountainX
Jan 5 at 0:40
add a comment |Â
up vote
3
down vote
favorite
up vote
3
down vote
favorite
This is an Arch Linux system. I have 7 SSHFS mounts listed in /etc/fstab. They all use these options:
<source> <mountpoint> fuse.sshfs x-systemd.automount,_netdev,user,follow_symlinks,identityfile=/home/user/.ssh/id_rsa,default_permissions
The source for these mounts is a local file server. When connected to the LAN, everything works as expected.
However, when the laptop is elsewhere, these mounts cause a problem. Booting up takes a long time and some applications will hang for a long time. For example, Dolphin opens and hangs, then has to be force closed.
I would like for these SSHFS mounts to only be attempted when the laptop is connected to the LAN via wired Ethernet.
How can this be achieved?
(I could be wrong, but I don't believe autofs is the solution because I don't want the mounts to be attempted upon browsing to a mountpoint (as in Dolphin), unless the system is connected to the LAN.)
mount fstab sshfs
This is an Arch Linux system. I have 7 SSHFS mounts listed in /etc/fstab. They all use these options:
<source> <mountpoint> fuse.sshfs x-systemd.automount,_netdev,user,follow_symlinks,identityfile=/home/user/.ssh/id_rsa,default_permissions
The source for these mounts is a local file server. When connected to the LAN, everything works as expected.
However, when the laptop is elsewhere, these mounts cause a problem. Booting up takes a long time and some applications will hang for a long time. For example, Dolphin opens and hangs, then has to be force closed.
I would like for these SSHFS mounts to only be attempted when the laptop is connected to the LAN via wired Ethernet.
How can this be achieved?
(I could be wrong, but I don't believe autofs is the solution because I don't want the mounts to be attempted upon browsing to a mountpoint (as in Dolphin), unless the system is connected to the LAN.)
mount fstab sshfs
edited Jan 5 at 7:54
jasonwryan
46.9k14127176
46.9k14127176
asked Jan 4 at 21:28
MountainX
4,4612367116
4,4612367116
Did you have a look at creating a udev rule
â RubberStamp
Jan 4 at 21:50
@RubberStamp - udev seems like a good idea. I would need some help to implement it in this case. I wasn't even aware that udev could be used in this way until you suggested it.
â MountainX
Jan 5 at 0:40
add a comment |Â
Did you have a look at creating a udev rule
â RubberStamp
Jan 4 at 21:50
@RubberStamp - udev seems like a good idea. I would need some help to implement it in this case. I wasn't even aware that udev could be used in this way until you suggested it.
â MountainX
Jan 5 at 0:40
Did you have a look at creating a udev rule
â RubberStamp
Jan 4 at 21:50
Did you have a look at creating a udev rule
â RubberStamp
Jan 4 at 21:50
@RubberStamp - udev seems like a good idea. I would need some help to implement it in this case. I wasn't even aware that udev could be used in this way until you suggested it.
â MountainX
Jan 5 at 0:40
@RubberStamp - udev seems like a good idea. I would need some help to implement it in this case. I wasn't even aware that udev could be used in this way until you suggested it.
â MountainX
Jan 5 at 0:40
add a comment |Â
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f414861%2fsshfs-mounts-on-a-mobile-laptop-system-hangs-when-not-on-lan%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Did you have a look at creating a udev rule
â RubberStamp
Jan 4 at 21:50
@RubberStamp - udev seems like a good idea. I would need some help to implement it in this case. I wasn't even aware that udev could be used in this way until you suggested it.
â MountainX
Jan 5 at 0:40