Open winny- opened 2 years ago
Yeah, this is really annoying. I can't run Steam on my laptop because my NAS is powered off and the laptop has an NFS automount for the NAS. :man_facepalming:
❯ steam
bwrap: Can't bind mount /oldroot/mnt on /newroot/mnt: Unable to apply mount flags: remount "/newroot/mnt/nas": No such device
Found that a way to unblock is stop the systemd mount that's causing the problem.
❯ systemctl | rg -i nas
mnt-nas.automount loaded active running mnt-nas.automount
mnt-nas.mount loaded activating mounting start /mnt/nas
❯ sudo systemctl status mnt-nas.automount
● mnt-nas.automount
Loaded: loaded (/etc/fstab; generated)
Active: active (running) since Fri 2023-05-26 10:05:29 PDT; 1 day 9h ago
Triggers: ● mnt-nas.mount
Where: /mnt/nas
Docs: man:fstab(5)
man:systemd-fstab-generator(8)
May 27 19:16:21 austin-work systemd[1]: mnt-nas.automount: Got automount request for /mnt/nas, triggered by 539849 (.gvfsd-recent-w)
May 27 19:16:31 austin-work systemd[1]: mnt-nas.automount: Got automount request for /mnt/nas, triggered by 539849 (.gvfsd-recent-w)
May 27 19:16:41 austin-work systemd[1]: mnt-nas.automount: Got automount request for /mnt/nas, triggered by 479117 (.gvfsd-recent-w)
May 27 19:16:51 austin-work systemd[1]: mnt-nas.automount: Got automount request for /mnt/nas, triggered by 608084 (.gvfsd-recent-w)
May 27 19:17:01 austin-work systemd[1]: mnt-nas.automount: Got automount request for /mnt/nas, triggered by 539849 (.gvfsd-recent-w)
May 27 19:17:12 austin-work systemd[1]: mnt-nas.automount: Got automount request for /mnt/nas, triggered by 479117 (.gvfsd-recent-w)
May 27 19:17:22 austin-work systemd[1]: mnt-nas.automount: Got automount request for /mnt/nas, triggered by 539849 (.gvfsd-recent-w)
May 27 19:17:32 austin-work systemd[1]: mnt-nas.automount: Got automount request for /mnt/nas, triggered by 608084 (.gvfsd-recent-w)
May 27 19:17:42 austin-work systemd[1]: mnt-nas.automount: Got automount request for /mnt/nas, triggered by 608084 (.gvfsd-recent-w)
May 27 19:17:53 austin-work systemd[1]: mnt-nas.automount: Got automount request for /mnt/nas, triggered by 479117 (.gvfsd-recent-w)
❯ sudo systemctl stop mnt-nas.automount
This issue has been mentioned on NixOS Discourse. There might be relevant details there:
Describe the bug
I have a roaming CIFS filesystem mounted at
/multimedia
. This means when the server is available, systemd happily ensures access. Otherwise I get an error such as: "no such device". This is intentional.When using programs that use
build-fhs-userenv-bubblewrap
, it appears all directories directly under/
are bind-mounted, unless blacklisted. This appears to cause a problem because bindmounting a roaming filesystems results in the following error:For example, when launching android-studio when the
/multimedia
mountpoint is not connected, I get the following error after a timeout:Steps To Reproduce
Steps to reproduce the behavior:
build-fhs-userenv-bubblewrap
/
. See https://nixos.wiki/wiki/Samba#cifs_mountandroid-studio
)Expected behavior
program launches, bwrap is set up with usable parameters.
Screenshots
If applicable, add screenshots to help explain your problem.
Additional context
My particular filesystem configuration https://gitlab.com/winny/nixos-configs/-/blob/9186c639498073cbb03ad8a82b1bf77d63ea4e28/common/base.nix
Work around, move the filesytem mountpoint to a directory whose parent is not
/
.Notify maintainers
Metadata
Please run
nix-shell -p nix-info --run "nix-info -m"
and paste the result.