1 { kernelPackages ? null, mkXfsFlags ? "" }:
2 import ../make-test-python.nix ({ pkgs, lib, ... }: {
4 meta.maintainers = lib.teams.helsinki-systems.members;
6 nodes.machine = { pkgs, lib, ... }: {
7 # Minimum required size for VDO volume: 5063921664 bytes
8 virtualisation.emptyDiskImages = [ 8192 ];
10 boot.vdo.enable = true;
11 dmeventd.enable = true;
13 environment.systemPackages = with pkgs; [ xfsprogs ];
14 boot = lib.mkIf (kernelPackages != null) { inherit kernelPackages; };
18 machine.succeed("vgcreate test_vg /dev/vdb")
19 machine.succeed("lvcreate --type vdo -n vdo_lv -L 6G -V 12G test_vg/vdo_pool_lv")
20 machine.succeed("mkfs.xfs ${mkXfsFlags} -K /dev/test_vg/vdo_lv")
21 machine.succeed("mkdir /mnt; mount /dev/test_vg/vdo_lv /mnt")
22 assert "/dev/mapper/test_vg-vdo_lv" == machine.succeed("findmnt -no SOURCE /mnt").strip()
23 machine.succeed("umount /mnt")
24 machine.succeed("vdostats")
25 machine.succeed("vgchange -a n")