!oNSIfazDqEcwhcOjSL:matrix.org

disko

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

Load older messages


SenderMessageTime
27 Nov 2024
@netpleb:matrix.orgnetpleb but here is my question: can I somehow simply update my disks.nix file and use disko to add the 2nd device to the btrfs filesystem? or do I need to run the respective btrfs device add ... and btrfs balance start -mconvert=raid1 commands myself? 18:45:58
@netpleb:matrix.orgnetpleb * but here is my question: can I somehow simply update my disks.nix file and use disko to add the 2nd device to the btrfs filesystem? or do I need to run the respective btrfs device add ... and btrfs balance start -mconvert=raid1 commands myself (which is of course how I have done it in a non-declarative pre-disko world)? 18:46:27
@thedragon44:matrix.org@thedragon44:matrix.org left the room.23:33:42
29 Nov 2024
@joerg:thalheim.ioMic92 netpleb: there is a format mode that should not destroy your existing disk and add missing partitions disks etc. But I am not sure this works for raid conversion yet. 13:07:19
@joerg:thalheim.ioMic92I don't think we have any convert for this use case13:07:42
@joerg:thalheim.ioMic92 lassulus: https://github.com/nix-community/disko/pull/891/files#r1863500583 I need your help with one _unmount option definition. I don't yet understand yet, how thse magic { fs = ; dev = }; attrs are working and when I cannot use them 13:08:30
@lassulus:lassul.uslassuluswhats the error? I think you need to use config.content._unmount.fs instead of the top level thingie?13:17:39
@joerg:thalheim.ioMic92I think I fixed13:22:04
@joerg:thalheim.ioMic92Interestingly I think I found now a bug in the disko mount code.13:37:50
@joerg:thalheim.ioMic92https://buildbot.thalheim.io/#/builders/64/builds/872/steps/1/logs/stdio13:37:52
@joerg:thalheim.ioMic92Here it imports the zpool before resolving device dependencies.13:38:09
@joerg:thalheim.ioMic92 lassulus: any idea how to solve this? 13:39:34
@lassulus:lassul.uslassulusYou added a reverse list 13:40:22
@joerg:thalheim.ioMic92Not this is mount not unmount13:40:45
@lassulus:lassul.uslassulushttps://github.com/nix-community/disko/pull/891/files#diff-84f980eccc1d3f99c10f8b0e6c5c5fc2af2069517533c4c4d73264a190e85188R64713:41:00
@joerg:thalheim.ioMic92thx13:44:21
@joerg:thalheim.ioMic92Ok. CI is green now. Ready for review!13:50:31
@joerg:thalheim.ioMic92 lassulus: oh, new edge case for veritysetup. We would need a device that is used at mount time, that is different from the device at boot time. 15:43:59
@lassulus:lassul.uslassulusuh15:45:16
@lassulus:lassul.uslassulusI'm not sure I understand :D15:45:25
@joerg:thalheim.ioMic92 lassulus: So you first format /dev/sda with ext4, than mount it, write to it, unmount it. And than you run veritysetup format /dev/sda /dev/sdb. /dev/sdb is than your hash device that stores the hash merkel tree. At boot time you than mount veritysetup open mydevice /dev/sda /dev/sdb and mount /dev/mapper/mydevice to where ever it needs to go. 15:48:12
@lassulus:lassul.uslassuluscan't you mount it in a tmpdir for the first mount and mount it with veritysetup for the mount step?15:52:58
@joerg:thalheim.ioMic92 lassulus: no, because mounted veritysetup devices are read-only 15:54:38
@joerg:thalheim.ioMic92The idea is to have immutable filesystems that can be verified and not tempered with.15:55:18
@lassulus:lassul.uslassulusah, well the mount command from disko is just used for installation anyway15:57:35
@lassulus:lassul.uslassulusso you just define the /dev/sda in there and the verity thingie in the config?15:57:51
@lassulus:lassul.uslassulustype would be similiar to the luks type15:58:11
@lassulus:lassul.uslassulus changed their profile picture.18:30:30
@netpleb:matrix.orgnetpleb
In reply to @joerg:thalheim.io
netpleb: there is a format mode that should not destroy your existing disk and add missing partitions disks etc. But I am not sure this works for raid conversion yet.

Thanks for your reply. Ok, let's ignore the raid1 complication for now and just assume I want to add a second disk to my existing btrfs fileystem. So I would:

  1. update my disks.nix file in my flake repo to include the additional disk
  2. nixos-rebuild switch --flake . --target-host <user@target_ip>
  3. on target system run disko -m format ...
    And hope for the best. Is that about right?
23:50:38
@netpleb:matrix.orgnetpleb
In reply to @joerg:thalheim.io
netpleb: there is a format mode that should not destroy your existing disk and add missing partitions disks etc. But I am not sure this works for raid conversion yet.
*

Thanks for your reply. Ok, let's ignore the raid1 complication for now and just assume I want to add a second disk to my existing btrfs fileystem. So I would:

  1. update my disks.nix file in my flake repo to include the additional disk
  2. nixos-rebuild switch --flake . --target-host <user@target_ip>
  3. on target system run disko -m format ...

And hope for the best. Is that about right?

23:50:50

Show newer messages


Back to Room ListRoom Version: 10