| 10 Dec 2024 |
Mic92 | Just include your main drive for nixos-anywhere in your nixos configuration. and for your data partition use the disko cli | 19:52:12 |
BeatLink | thanks | 19:52:42 |
BeatLink | I wanted to also use disko to handle mounting the drive in the installed system | 19:52:55 |
Mic92 | You will need to add a fileSystems entry in your nixos configuration for your data drive. | 19:53:01 |
BeatLink | right | 19:53:07 |
BeatLink | I've already went ahead and coded in my script to comment out the data drive during installation and uncomment it once the installation is complete | 19:53:34 |
Mic92 | I guess that also works. | 19:53:48 |
BeatLink | yeah, that way its disko all the way down | 19:54:08 |
BeatLink | a bit risky tho, since if the script fails to comment the line, there goes my cat pictures lol | 19:54:23 |
BeatLink | i have an off site backup setup tho so im not tooo worried | 19:54:41 |
Mic92 | Still time consuming | 19:54:52 |
BeatLink | yep | 19:54:58 |
BeatLink | it would be great if disko took an argument with a list of which devices to ignore | 19:55:27 |
BeatLink | like --ignore-device=/dev/sda | 19:55:39 |
BeatLink | and that could be repeated numerous times | 19:55:49 |
| 11 Dec 2024 |
| kagehisa joined the room. | 10:06:32 |
| marijan changed their profile picture. | 14:20:18 |
| SkamDart joined the room. | 21:03:43 |
SkamDart | Running this https://gist.github.com/SkamDart/30af3d3e4d93ee2dbd732ff3645bb29e config and getting the following error
/nix/store/32ycfg2axcjxdii9irj0fddbcb2xlr9z-disko-format-mount/bin/disko-format-mount: line 6
3: mkfs.fat32: command not found
nothing came up in my nix-locate search and mkfs.fat32 isn't provided by dosfstools or e2fsprogs.
does it make more sense to write a custom _create attribute that calls out to mkfs.fat -F 32 or am I missing the obvious way to do this?
| 21:13:36 |
netpleb | in my disks.nix I have a btrfs setup like the example https://github.com/nix-community/disko/blob/master/example/luks-btrfs-subvolumes.nix but only recently noticed when trying to nixos-rebuild switch that I get this error:
Dec 11 15:26:26 aleph0 systemd[1]: Activating swap /.swapvol/swapfile...
Dec 11 15:26:26 aleph0 kernel: BTRFS warning (device dm-2): swapfile must not be copy-on-write
Dec 11 15:26:26 aleph0 swapon[367622]: swapon: /.swapvol/swapfile: swapon failed: Invalid argument
Dec 11 15:26:26 aleph0 systemd[1]: \x2eswapvol-swapfile.swap: Swap process exited, code=exited, status=255/EXCEPTION
Dec 11 15:26:26 aleph0 systemd[1]: \x2eswapvol-swapfile.swap: Failed with result 'exit-code'.
Does disko need to set some mount option differently for the swap subvolume?
| 23:46:16 |
| 12 Dec 2024 |
netpleb | I found the issue. At the bottom of this answer it says: "Swap file can't be located on a btrfs raid of any sort." | 00:04:11 |
netpleb | * I found the issue. At the bottom of this answer it says: "Swap file can't be located on a btrfs raid of any sort." But alas I recently transitioned mine to a raid setup. Will now move swap over to a non-raid partition and hopefully it will solve the issue. | 00:04:55 |
magic_rb | Friendly recommendation, don't use swap files | 01:47:09 |
netpleb | swap files specifically? or swap in general? I do not know enough about either really to have an opinion. | 04:07:06 |
BeatLink | Swap on CoW filesystems like BTRFS and ZFS is a bad idea | 04:07:47 |
BeatLink | swap is a write heavy requirement and CoW amplifies writes | 04:08:03 |
BeatLink | it will thrash your storage devices, especially if its SSDs | 04:08:13 |
BeatLink | if you must use swap, create a dedicated partition for it | 04:08:39 |
netpleb | I see, thanks. I had read some of the btrfs docs and it seems like it is aware of files which are used for swap and alters behavior accordingly (disabling CoW and such), but maybe that is more in theory than in practice? | 04:10:13 |
BeatLink | Im not sure but that output you posted does show that the kernel have some safeguards to prevent mixing swap and CoW | 04:10:49 |