| 2 Feb 2024 |
waterturkey | Hi Lily Foster - is it possible to set up native btrfs raid1 with disko? It seems like a few people have been asking about it on the github, but I haven't been able to confirm if it is available. | 21:51:56 |
waterturkey | Also, sorry to ping you if you aren't the right person to ask! | 21:52:15 |
Lily Foster | In reply to @waterturkey:matrix.org Hi Lily Foster - is it possible to set up native btrfs raid1 with disko? It seems like a few people have been asking about it on the github, but I haven't been able to confirm if it is available. no worries! i don't think it's currently possible with disko, unfortunately | 22:49:35 |
waterturkey | In reply to @lily:lily.flowers no worries! i don't think it's currently possible with disko, unfortunately That's what I was thinking. Do you think it would work if I pre-formated the btrfs raid1 and then added the /dev/sda as a subvolume mountpoint in disko? | 22:55:48 |
waterturkey | Just trying to think of a workaround | 22:56:27 |
| 3 Feb 2024 |
waterturkey | In reply to @waterturkey:matrix.org Just trying to think of a workaround I've just tried it on a VM and it didn't work. Guess I'll do it the old fashioned way. | 00:43:32 |
| @guanran928:mozilla.org changed their display name from Charles He to Charles He |moved -> @lime:catgirl.cloud. | 07:17:55 |
| @guanran928:mozilla.org changed their display name from Charles He |moved -> @lime:catgirl.cloud to Charles He | moved -> @lime:catgirl.cloud. | 07:32:29 |
| networkException (moving to @networkexception:nwex.de) changed their profile picture. | 11:45:31 |
| tim joined the room. | 14:17:28 |
@dave:tiredofit.ca | BTRFS Raid 1 will work with Disko May I suggest if it is giving you problems set up your subvolumes on your second disk instead of the first. Otherwise I ha r a fre examples of it here: https://github.com/tiredofit/nixos-config/tree/main/templates/disko | 23:34:20 |
@dave:tiredofit.ca | * BTRFS Raid 1 will work with Disko May I suggest if it is giving you problems set up your subvolumes on your second disk instead of the first. Otherwise I have a few examples of it here: https://github.com/tiredofit/nixos-config/tree/main/templates/disko | 23:34:34 |
| 4 Feb 2024 |
waterturkey | In reply to @dave:tiredofit.ca BTRFS Raid 1 will work with Disko May I suggest if it is giving you problems set up your subvolumes on your second disk instead of the first. Otherwise I have a few examples of it here: https://github.com/tiredofit/nixos-config/tree/main/templates/disko Thanks! This is exactly what I was looking for. | 09:38:17 |
| 11 Feb 2024 |
| @guanran928:mozilla.org changed their display name from Charles He | moved -> @lime:catgirl.cloud to Charles He. | 07:16:05 |
eyJhb | { lib, ... }:
{
disko.devices = {
disk.disk1 = {
type = "disk";
device = lib.mkDefault "/dev/sda";
content = {
type = "gpt";
partitions = {
boot = {
name = "boot";
size = "1M";
type = "EF02";
};
esp = {
name = "ESP";
size = "500M";
type = "EF00";
content = {
type = "filesystem";
format = "vfat";
mountpoint = "/boot";
};
};
zfs = {
size = "100%";
content = {
type = "zfs";
pool = "zpool";
};
};
};
};
};
zpool = {
rpool = {
type = "zpool";
# mode = "mirror";
rootFsOptions.compression = "zstd";
# rootFsOptions."com.sun:auto-snapshot" = "false";
datasets = {
"root" = {
type = "zfs_fs";
mountpoint = "/";
options.mountpoint = "legacy";
postCreateHook = "zfs snapshot rpool/root@blank";
};
"local/nix" = {
type = "zfs_fs";
mountpoint = "/nix";
options.mountpoint = "legacy";
};
"local/stash" = {
type = "zfs_fs";
mountpoint = "/state/stash";
options.mountpoint = "legacy";
};
# safe
"safe/home" = {
type = "zfs_fs";
mountpoint = "/state/home";
options.mountpoint = "legacy";
};
"safe/persistent" = {
type = "zfs_fs";
mountpoint = "/state/root";
options.mountpoint = "legacy";
};
};
};
};
};
}
| 11:59:25 |
eyJhb | Anyone that can see the flaw in that config? Error is
+ readarray -t zfs_devices
++ cat /tmp/tmp.gk3UVSF6cj/zfs_rpool
cat: /tmp/tmp.gk3UVSF6cj/zfs_rpool: No such file or directory
+ zpool create -f rpool -R /mnt -O compression=zstd
missing vdev specification
usage:
create [-fnd] [-o property=value] ...
[-O file-system-property=value] ...
[-m mountpoint] [-R root] <pool> <vdev> ...
+ rm -rf /tmp/tmp.gk3UVSF6cj
| 11:59:42 |
matthewcroughan | Doesn't look like the partitions are the same as the example | 12:01:18 |
matthewcroughan | https://github.com/nix-community/disko/blob/master/example/zfs.nix#L9-L27 | 12:01:23 |
matthewcroughan | you don't have a partitions.boot.content | 12:01:35 |
eyJhb | They are yoinked directly from here https://github.com/nix-community/nixos-anywhere-examples/blob/main/disk-config.nix#L9-L25 | 12:02:14 |
matthewcroughan | you have disk.disk1.content instead of idks.disk1.partitions.boot.content | 12:02:17 |
matthewcroughan | * you have disk.disk1.content instead of diss.disk1.partitions.boot.content | 12:02:22 |
matthewcroughan | * you have disk.disk1.content instead of disk.disk1.partitions.boot.content | 12:02:33 |
matthewcroughan | the nixos-anywhere examples may be outdated compared to the disko examples which have tests for them | 12:02:50 |
matthewcroughan | what you can do is try to make a test for this disk-config.nix directly in the disko repo and try to run the VM test for that, to see if it works or gives you the same error | 12:03:21 |
matthewcroughan | it's hard to debug otherwise, unless a VM test is made | 12:03:27 |
eyJhb | The disk-config.nix works for the nixos-anywhere-examples, but not when I've tried to change it to zfs | 12:03:49 |
eyJhb | * The disk-config.nix works from the nixos-anywhere-examples, but not when I've tried to change it to zfs | 12:04:03 |
matthewcroughan | oh, well then you need to follow the zfs example that I linked | 12:04:05 |
eyJhb | That's what I've been trying to follow :p - I'm very unsure what should be in the file it tries to cat. | 12:04:30 |