Commit graph

144 commits

Author SHA1 Message Date
Leonie Marcy Vack
1ae7c794d9 zfs_volume: add zfs_volume without content to zfs example 2025-01-16 14:45:30 +01:00
provokateurin
5be012e917
fix: Apply umask=0077 to /boot partition in all examples 2025-01-06 20:23:33 +01:00
Aos Dabbagh
7d9940a4df doc: simple xfs with options
This PR documents an XFS example that uses the `xfs_quota` feature.
2024-12-28 16:43:16 -05:00
Jörg Thalheim
7ea6edd857 zfs-with-vdevs: add an example for using absolute device paths
This is the only way to assign devices rather than fixed gpt partitions.
Without reading the code it's not very obvious how disko actually
assigns devices to zpools.
2024-12-24 14:45:56 +01:00
Jörg Thalheim
d8f3cfc582 zfs: run load-key on mount 2024-12-20 14:24:53 +01:00
Gary Guo
3e83c11038 Fix evaluation when a GPT partition is left unformatted 2024-11-25 02:10:48 +00:00
mergify[bot]
b1aa08f8ce
Merge branch 'master' into feature/zfs-vdev-types 2024-11-20 06:17:47 +00:00
carschandler
da52cf4020
Add explanatory comment to examples/zfs-over-legacy.nix (#886) 2024-11-19 16:38:19 +01:00
Michon van Dooren
d192ffd944
Fix zpool create for disk vdev after mirror vdev
A config like

```nix
{
  vdev = [
    {
      mode = "mirror";
      members = [ "data1" "data2" ];
    }
    {
      members = [ "data3" ];
    }
  ];
}
```

would result in the following command:

```shell
zpool create -f <name> mirror /dev/data1 /dev/data2 /dev/data3
```

which would result in a single vdev with a 3-way mirror, rather than a
vdev with a 2-way mirror and a second vdev with a single disk. By
reordering the vdevs to handle those with an empty mode first we
transform this into:

```shell
zpool create -f <name> /dev/data3 mirror /dev/data1 /dev/data2
```

which does have the desired outcome.
2024-11-18 01:33:49 +01:00
Michon van Dooren
9b56c1afdb
Add support for ZFS spare, log & dedup vdevs 2024-11-17 15:52:28 +01:00
DavHau
58cd832497 lvm_vg: fix size=100% leading to crash
lvcreate -l does not accept a '100%' parameter which currently leads to a crash. THis change automatically changes `100%` to `100%FREE` leading to the intended behavior.
2024-10-26 11:42:42 +00:00
Felix Uhl
ca47da60e5 disko: fix improper handling of whitespace
Fixes #130

This should fix pretty much all cases where spaces or other special
characters would break disko due to improper quoting. I searched for all
instances of '.label', '.device' and '.name', so I believe I caught
whatever I could.

In some cases I changed single quotes to double quotes for consistency.

I know we don't usually fix bugs in the legacy table type, but it was so
easy I couldn't resist.
2024-10-22 09:10:08 +00:00
Chris Scutcher
78d685c123 tests: Add failing test to demonstrate issues with whitespace in part names
Reproduces #130.

For new style table the generated script has a few problems for example;

```sh
    sgdisk \
      --new=2:0:+100M \
      --change-name=2:disk-vdb-name with spaces \
      --typecode=2:EF00 \
      /dev/vdb
```

and

```sh
mkfs.vfat \
         \
        /dev/disk/by-partlabel/disk-vdb-name with spaces
```

Legacy table style generates slightly different problems e.g.;

```sh
parted -s /dev/vdb -- mkpart name with spaces  1MiB 100MiB
```
2024-10-22 09:10:08 +00:00
Felix Uhl
da8f49246c docs: Fix /boot security hole warning in examples
The alternative would be to do this automatically if format=="vfat" and
mountpoint=="/boot", but it's better to be upfront about this.

Fixes #527
2024-10-02 08:12:14 +00:00
Felix Uhl
b9c99485aa Fix and comment luks-encrypted btrfs raid example 2024-10-01 19:35:27 +02:00
Sk7Str1pe
c312692abe Create luks-btrfs-raid.nix 2024-10-01 19:34:46 +02:00
Jörg Thalheim
4e30bc7921 zfs-with-vdevs: increase pool import timeout
Fix fixes a long-standing test failures we have with the zfs-with-vdevs.
2024-10-01 10:08:10 +02:00
Jörg Thalheim
e72de0702d add workaround for failing zpool import test 2024-09-23 15:07:20 +02:00
Jörg Thalheim
9adb48e682 add workaround for flakey zfs tests 2024-09-20 15:16:46 +02:00
Jörg Thalheim
93c1dde419 tests/f2fs: add compression
This is a regression test for shellcheck, where we had to disable SC2054
2024-09-20 15:02:37 +02:00
Jörg Thalheim
37c83c08d1
Merge pull request #723 from dmadisetti/dm/zfs-extra
zfs: add ZFS "topology" features like explicit vdevs, cache, and special
2024-09-03 17:07:39 +02:00
dylan madisetti
c9d3bc3755
fix: properly apply oneOf 2024-08-26 14:00:44 -04:00
dylan madisetti
ea3ce722ea
zfs: fix test and add documentation 2024-08-26 13:03:25 -04:00
dylan madisetti
cc2e247193
zfs: make topology a mode type 2024-08-26 12:27:04 -04:00
matthewcroughan
cc86fe1a7c f2fs: init 2024-08-20 10:26:29 +01:00
dylan madisetti
8d071db09b
test: fix and add stub test for zfs-with-vdevs 2024-08-05 12:11:35 -04:00
dylan madisetti
f484389085
example: barebones example of zfs-with-vdevs 2024-08-01 16:00:11 -04:00
Jörg Thalheim
bec6e3cde9 examples: rename vdb -> main 2024-07-19 19:33:40 +00:00
Jörg Thalheim
d185770ea2 examples: drop priority as we now have a reasonable default 2024-06-30 07:50:33 +00:00
Matthew_Cash
b6a1262796 lvm_vg: add lvm thinpool/thinlv support
Co-authored-by: ajs124 <git@ajs124.de>
2024-06-26 11:36:52 +00:00
Giel van Schijndel
c5a25d5ced
swap: support swapDevices.*.priority option
This just forwards to the underlying NixOS option and expands the mount
script to exhibit the same behavior.
2024-05-06 12:11:58 +02:00
Giel van Schijndel
8a02c0507c
swap: support swapDevices.*.discardPolicy option 2024-05-06 12:11:58 +02:00
Qubasa
35d4378e74 Add EF02 priority=1 flag. Systems won't boot otherwise 2024-04-29 14:57:02 +00:00
Kira Bruneau
79eab0e82c types btrfs: fix format without swap or subvolumes 2024-04-08 21:37:04 +00:00
lassulus
f6b72bfed7 types *: make create idempotent 2024-03-13 09:58:33 +01:00
lassulus
561579a631 add long-device-name test & example 2024-03-04 14:55:56 +01:00
lassulus
c13d481b78 hybrid-mbr: cleanup test, wait for udev after paritioning 2024-02-17 04:06:51 +00:00
NAHO
15b52c3c8a example: fix typo 2024-02-08 10:44:38 +01:00
danjujan
f7424625dc
Rework Hybrid MBR https://github.com/nix-community/disko/pull/168 (#508)
Add hybrid MBR functionality to the gpt type
2024-01-26 21:59:23 +01:00
Michael Hoang
583bdf4fc6 tests: check canmount ZFS flag is respected 2024-01-01 01:09:11 +00:00
Michael Hoang
4346558fd4 tests: add test for running ZFS as not the rootfs 2023-12-19 23:49:20 +11:00
Jörg Thalheim
3cb78c93e6 swap: don't activate random encrypted swap files
This requires more code and is not implemented just now.
2023-11-25 15:47:29 +00:00
Andrew Marshall
2d7d77878c Implement preMountHook & postMountHook
These options previously existed but had no effect. Now they are
implemented. They only affect mount during disko’s filesystem creation,
not during any later mounts.

Adding test case to existing “complex” example and test mostly because
couldn’t think of any better place to put it.
2023-11-12 09:36:50 +00:00
lassulus
01ec6024d6 example lukgs-btrfs-subvolumes: fix passwordFile location 2023-11-12 09:21:13 +00:00
Aleksander Heintz
72bc152626 add btrfs swap support 2023-11-08 22:36:40 +00:00
Felix Buehler
548962c50b luks: use allowDiscards option 2023-11-04 12:09:41 +00:00
Jörg Thalheim
78fba3983d make boot large enough in tests
100M is not enough and I see people just copying examples without putting in any extra thoughts
https://github.com/TUM-DSE/doctor-cluster-config/pull/368
2023-09-27 06:19:07 +00:00
Jörg Thalheim
2b523b58e6 use M instead MiB suffix everywhere
This seems to do better alignment
2023-09-27 06:02:50 +00:00
cvoges12
0b178c0554 b/c DOS and Windows don't like lowercase labels 2023-09-26 20:26:41 +00:00
cvoges12
34dcdbbd64 boot -> Boot for change of order 2023-09-26 20:26:41 +00:00