!oNSIfazDqEcwhcOjSL:matrix.org

disko

357 Members
disko - declarative disk partitioning - https://github.com/nix-community/disko89 Servers

Load older messages


SenderMessageTime
10 Dec 2024
@joerg:thalheim.ioMic92Just include your main drive for nixos-anywhere in your nixos configuration. and for your data partition use the disko cli19:52:12
@beat_link:matrix.orgBeatLinkthanks19:52:42
@beat_link:matrix.orgBeatLinkI wanted to also use disko to handle mounting the drive in the installed system19:52:55
@joerg:thalheim.ioMic92 You will need to add a fileSystems entry in your nixos configuration for your data drive. 19:53:01
@beat_link:matrix.orgBeatLinkright19:53:07
@beat_link:matrix.orgBeatLinkI've already went ahead and coded in my script to comment out the data drive during installation and uncomment it once the installation is complete19:53:34
@joerg:thalheim.ioMic92I guess that also works.19:53:48
@beat_link:matrix.orgBeatLinkyeah, that way its disko all the way down19:54:08
@beat_link:matrix.orgBeatLinka bit risky tho, since if the script fails to comment the line, there goes my cat pictures lol19:54:23
@beat_link:matrix.orgBeatLinki have an off site backup setup tho so im not tooo worried19:54:41
@joerg:thalheim.ioMic92Still time consuming19:54:52
@beat_link:matrix.orgBeatLinkyep19:54:58
@beat_link:matrix.orgBeatLinkit would be great if disko took an argument with a list of which devices to ignore19:55:27
@beat_link:matrix.orgBeatLinklike --ignore-device=/dev/sda19:55:39
@beat_link:matrix.orgBeatLinkand that could be repeated numerous times19:55:49
11 Dec 2024
@kagehisa:matrix.orgkagehisa joined the room.10:06:32
@marijan:matrix.orgmarijan changed their profile picture.14:20:18
@skamdart:matrix.orgSkamDart joined the room.21:03:43
@skamdart:matrix.orgSkamDart

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:matrix.orgnetpleb

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:matrix.orgnetpleb 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:matrix.orgnetpleb * 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:matrix.redalder.orgmagic_rbFriendly recommendation, don't use swap files01:47:09
@netpleb:matrix.orgnetpleb swap files specifically? or swap in general? I do not know enough about either really to have an opinion. 04:07:06
@beat_link:matrix.orgBeatLink Swap on CoW filesystems like BTRFS and ZFS is a bad idea 04:07:47
@beat_link:matrix.orgBeatLinkswap is a write heavy requirement and CoW amplifies writes04:08:03
@beat_link:matrix.orgBeatLinkit will thrash your storage devices, especially if its SSDs 04:08:13
@beat_link:matrix.orgBeatLinkif you must use swap, create a dedicated partition for it04:08:39
@netpleb:matrix.orgnetplebI 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
@beat_link:matrix.orgBeatLinkIm not sure but that output you posted does show that the kernel have some safeguards to prevent mixing swap and CoW04:10:49

Show newer messages


Back to Room ListRoom Version: 10