mirror of
https://github.com/nix-community/disko.git
synced 2026-12-02 14:03:28 +01:00
Merge pull request #348 from DavHau/dave
improve examples and zpool mode type
This commit is contained in:
4 files changed
+11
-5
No files matched your search
+1
-1
@@ -152,7 +152,7 @@
|
|||||||
type = "zpool";
|
type = "zpool";
|
||||||
mode = "mirror";
|
mode = "mirror";
|
||||||
rootFsOptions = {
|
rootFsOptions = {
|
||||||
compression = "lz4";
|
compression = "zstd";
|
||||||
"com.sun:auto-snapshot" = "false";
|
"com.sun:auto-snapshot" = "false";
|
||||||
};
|
};
|
||||||
mountpoint = "/";
|
mountpoint = "/";
|
||||||
|
|||||||
+1
-1
@@ -48,7 +48,7 @@
|
|||||||
type = "zpool";
|
type = "zpool";
|
||||||
mode = "mirror";
|
mode = "mirror";
|
||||||
rootFsOptions = {
|
rootFsOptions = {
|
||||||
compression = "lz4";
|
compression = "zstd";
|
||||||
"com.sun:auto-snapshot" = "false";
|
"com.sun:auto-snapshot" = "false";
|
||||||
};
|
};
|
||||||
mountpoint = "/";
|
mountpoint = "/";
|
||||||
|
|||||||
+7
-1
@@ -13,7 +13,13 @@
|
|||||||
description = "Type";
|
description = "Type";
|
||||||
};
|
};
|
||||||
mode = lib.mkOption {
|
mode = lib.mkOption {
|
||||||
type = lib.types.str; # TODO zfs modes
|
type = lib.types.enum [
|
||||||
|
""
|
||||||
|
"mirror"
|
||||||
|
"raidz"
|
||||||
|
"raidz2"
|
||||||
|
"raidz3"
|
||||||
|
];
|
||||||
default = "";
|
default = "";
|
||||||
description = "Mode of the ZFS pool";
|
description = "Mode of the ZFS pool";
|
||||||
};
|
};
|
||||||
|
|||||||
+2
-2
@@ -19,8 +19,8 @@ diskoLib.testLib.makeDiskoTest {
|
|||||||
out == expected_value
|
out == expected_value
|
||||||
), f"Expected {property}={expected_value} on {ds}, got: {out}"
|
), f"Expected {property}={expected_value} on {ds}, got: {out}"
|
||||||
|
|
||||||
assert_property("zroot", "compression", "lz4")
|
assert_property("zroot", "compression", "zstd")
|
||||||
assert_property("zroot/zfs_fs", "compression", "lz4")
|
assert_property("zroot/zfs_fs", "compression", "zstd")
|
||||||
assert_property("zroot", "com.sun:auto-snapshot", "false")
|
assert_property("zroot", "com.sun:auto-snapshot", "false")
|
||||||
assert_property("zroot/zfs_fs", "com.sun:auto-snapshot", "true")
|
assert_property("zroot/zfs_fs", "com.sun:auto-snapshot", "true")
|
||||||
assert_property("zroot/zfs_testvolume", "volsize", "10M")
|
assert_property("zroot/zfs_testvolume", "volsize", "10M")
|
||||||
|
|||||||
Reference in new issue
Block a user