How can I nofail on sshfs?

I have added “nofail” to my options for sshfs, but it fails to boot, cause it’s unable to mount the sshfs at boot.

I’m dropped to an emergency shell, without network and a read-only fstab;)

I first have to add an ip, add a default gw and modify resolv.conf, then I have to mount the sshfs, before I’m allowed to boot;)

Is “nofail” supported for sshfs?

1 Like

nofail should be allowed for all filesystems, though where do you mount it? perhaps systemd considers the mount point infallible or important for something else?

  fileSystems."/mnt/bytesized" = {
    device = "fa@me:/home/hd1/";
    fsType = "sshfs";
    options =
      [
        "allow_other"        
        "_netdev"            
        "x-systemd.automount" 

        "nofail"

        "reconnect"
        "ServerAliveInterval=15"
        "IdentityFile=${config.sops.secrets.root_ssh_key_bytesized.path}"
      ];
  };

I should also mention that it tries to mount this, before even the network is up.

At least, that’s what I’m led to believe, when it drops me into an emergency shell and I have to manually set up the network.

That’s a secondary problem, though, cause “nofail” should be working to allow me to boot.

I’m not really sure how to troubleshoot this.