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

Unable to create Directory-based Storage #120

Open
Kraust opened this issue Feb 2, 2025 · 0 comments
Open

Unable to create Directory-based Storage #120

Kraust opened this issue Feb 2, 2025 · 0 comments

Comments

@Kraust
Copy link

Kraust commented Feb 2, 2025

Before Attemtping this I had to add the following to enable ZFS support (even if I don't intend on using it).

let
  zfsCompatibleKernelPackages = lib.filterAttrs (
    name: kernelPackages:
    (builtins.match "linux_[0-9]+_[0-9]+" name) != null
    && (builtins.tryEval kernelPackages).success
    && (!kernelPackages.${config.boot.zfs.package.kernelModuleAttribute}.meta.broken)
  ) pkgs.linuxKernel.packages;
  latestKernelPackage = lib.last (
    lib.sort (a: b: (lib.versionOlder a.kernel.version b.kernel.version)) (
      builtins.attrValues zfsCompatibleKernelPackages
    )
  );
in
{
...
  boot.kernelPackages = latestKernelPackage;
  boot.zfs.package = pkgs.zfs_unstable;
  boot.supportedFilesystems = [ "zfs" ];
  networking.hostId = "30c52ebd";

...
}

As a result the following gets reported when I try and create a Directory:


Feb 02 16:11:42 nixos pvedaemon[5532]: unable to open file '/etc/systemd/system/mnt-pve-storage\x2d1.mount.tmp.5532' - Read-only file system
Feb 02 16:11:42 nixos pvedaemon[3248]: <root@pam> end task UPID:nixos:0000159C:0000686F:679FDF6C:dircreate:storage-1:root@pam: unable to open file '/etc/systemd/system/mnt-pve-storage\x2d1.mount.tmp.5532' - Read-only file system

I was able to bypass this by creating ZFS Pools for my two disks and including an existing directory from my filesystem. You could probably bypass this all together if you let nixos manage your disks and then just add the directories manually instead of letting Proxmox format them for you (I only learned this after I posted the issue).

Note that it appears the only supported Storage medium is ZFS (which requires the following above to be configured). I was not able to create LVMs or Directory Disks this way.

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