Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot make home mount if a seperate mount exists for the persistent path #232

Open
zackattackz opened this issue Nov 8, 2024 · 1 comment

Comments

@zackattackz
Copy link

zackattackz commented Nov 8, 2024

There is an issue I believe with the code for the home fuse mount service, specifically here:

if ! mount | grep -F ${mountPoint}' ' && ! mount | grep -F ${mountPoint}/; then

The issue is that if a user has an already existing mount that contains mountPoint as a substring, this service will fail with There is already an active mount at or below ${mountPoint}!

I believe this check was intended to ensure that the existing mount won't be overridden, but it fails in the case I describe above. I'm not sure what a fix would look like, but I think it might be to add a space to the beginning of the grep like so:

if ! mount | grep -F ' '${mountPoint}' ' && ! mount | grep -F ${mountPoint}/; then

The specific mount that the grep is finding in my case is a bind mount I've configured from /persistent/home/z/.local/share/lutris to/mnt/data/home/z/LutrisShare:

/dev/sda1 on /persistent/home/z/.local/share/lutris type ext4 (rw,relatime,x-systemd.requires-mounts-for=/persistent,x-systemd.requires-mounts-for=/mnt/data)

The nix config for the bind is:

  fileSystems."/persistent/home/z/.local/share/lutris" = {
    depends = [
      "/persistent"
      "/mnt/data"
    ];
    device = "/mnt/data/home/z/LutrisShare";
    fsType = "none";
    options = [ "bind" ];
  };

The reason I even need this bind in the first place is because /mnt/data is an entirely separate disk than what my /persistent is normally on. I wanted the data for lutris to be stored on this separate disk rather than the disk that /persistent is on, and this is the only way I could think to do that.

@zackattackz
Copy link
Author

Seems to be same issue as #198

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant