diff --git a/checks/default.nix b/checks/default.nix index 7f535f80..42581433 100644 --- a/checks/default.nix +++ b/checks/default.nix @@ -23,7 +23,10 @@ let nodes.machine = { pkgs, ... }: { - virtualisation.emptyDiskImages = [ 4096 ]; + virtualisation.emptyDiskImages = [ + 4096 + 1024 + ]; boot.supportedFilesystems = [ "bcachefs" ]; boot.kernelPackages = pkgs.linuxPackages_latest; diff --git a/checks/encrypted-multidev.sh b/checks/encrypted-multidev.sh index d4e5c9ff..3048d61e 100755 --- a/checks/encrypted-multidev.sh +++ b/checks/encrypted-multidev.sh @@ -2,6 +2,7 @@ set -euxo pipefail blkdev="/dev/vdb" +blkdev2="/dev/vdc" mnt=$(mktemp -d) pw=$(genpass) uuid=$(uuidgen) @@ -24,14 +25,21 @@ echo "$pw" | bcachefs format \ --replicas=2 \ --uuid "$uuid" \ --fs_label test-fs \ - "$blkdev"? + "${blkdev}"{1,2} udevadm settle echo "$pw" | bcachefs mount "UUID=$uuid" "$mnt" +bcachefs device add "$mnt" "${blkdev}3" +bcachefs device add "$mnt" "$blkdev2" + +udevadm settle + +blkid + keyctl search @u user "bcachefs:$uuid" umount "$mnt" -bcachefs mount "${blkdev}1" "$mnt" +bcachefs mount "UUID=$uuid" "$mnt"