!oNSIfazDqEcwhcOjSL:matrix.org

disko

366 Members
disko - declarative disk partitioning - https://github.com/nix-community/disko95 Servers

Load older messages


SenderMessageTime
30 May 2024
@lillecarl:matrix.orglillecarlNah I've got that same thing on my desktop10:35:02
@lillecarl:matrix.orglillecarl

waltmck: https://github.com/Lillecarl/nixos/blob/master/hosts/shitbox/disko.nix You can compare with mine. I don't raid my bootloader though, I mirror with grub. Don't use my thing as a reference for "this is right".

What happens if you run the erroring command (as root) yourself?

10:38:19
@waltmck:matrix.orgwaltmck
In reply to @lillecarl:matrix.org

waltmck: https://github.com/Lillecarl/nixos/blob/master/hosts/shitbox/disko.nix You can compare with mine. I don't raid my bootloader though, I mirror with grub. Don't use my thing as a reference for "this is right".

What happens if you run the erroring command (as root) yourself?

Same thing happens. I am actually running this entire thing as root (sshing to root@hostname)
10:57:41
@lillecarl:matrix.orglillecarl

waltmck: ```bash
lsblk && findmnt

11:12:16
@lassulus:lassul.uslassulusInvalid argument during seek for read on /dev/md/raid1 seems like a corrupt partition table. can you try printing it with fdisk -l or parted -l?11:12:31
@lassulus:lassul.uslassulus * Invalid argument during seek for read on /dev/md/raid1 seems like a corrupt partition table. can you try printing it with fdisk -l or parted -l? 11:12:42
@lillecarl:matrix.orglillecarl *

waltmck:

lsblk && findmnt
11:12:46
@waltmck:matrix.orgwaltmck
In reply to @lillecarl:matrix.org

waltmck:

lsblk && findmnt
NAME        MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINTS
loop0         7:0    0 304.5M  0 loop  /nix/.ro-store
nvme0n1     259:0    0 476.9G  0 disk
├─nvme0n1p1 259:3    0     1M  0 part
├─nvme0n1p2 259:4    0   500M  0 part
│ └─md127     9:127  0 499.9M  0 raid1
└─nvme0n1p3 259:7    0 476.4G  0 part
  └─md126     9:126  0 476.3G  0 raid1
nvme1n1     259:1    0 476.9G  0 disk
├─nvme1n1p1 259:2    0     1M  0 part
├─nvme1n1p2 259:8    0   500M  0 part
│ └─md127     9:127  0 499.9M  0 raid1
└─nvme1n1p3 259:10   0 476.4G  0 part
  └─md126     9:126  0 476.3G  0 raid1
TARGET                SOURCE  FSTYPE  OPTIONS
/                     tmpfs   tmpfs   rw,relatime,mode=755
├─/dev                devtmpfs
│                             devtmpf rw,nosuid,size=3282888k,nr_inodes=8164266,m
│ ├─/dev/pts          devpts  devpts  rw,nosuid,noexec,relatime,gid=3,mode=620,pt
│ ├─/dev/shm          tmpfs   tmpfs   rw,nosuid,nodev,size=32828852k
│ ├─/dev/mqueue       mqueue  mqueue  rw,nosuid,nodev,noexec,relatime
│ └─/dev/hugepages    hugetlbfs
│                             hugetlb rw,nosuid,nodev,relatime,pagesize=2M
├─/proc               proc    proc    rw,nosuid,nodev,noexec,relatime
├─/run                tmpfs   tmpfs   rw,nosuid,nodev,size=16414428k,mode=755
│ ├─/run/keys         ramfs   ramfs   rw,nosuid,nodev,relatime,mode=750
│ ├─/run/wrappers     tmpfs   tmpfs   rw,nodev,relatime,size=32828852k,mode=755
│ ├─/run/user/1000    tmpfs   tmpfs   rw,nosuid,nodev,relatime,size=6565768k,nr_i
│ └─/run/user/0       tmpfs   tmpfs   rw,nosuid,nodev,relatime,size=6565768k,nr_i
├─/sys                sysfs   sysfs   rw,nosuid,nodev,noexec,relatime
│ ├─/sys/kernel/security
│ │                   securityfs
│ │                           securit rw,nosuid,nodev,noexec,relatime
│ ├─/sys/fs/cgroup    cgroup2 cgroup2 rw,nosuid,nodev,noexec,relatime,nsdelegate,
│ ├─/sys/fs/pstore    pstore  pstore  rw,nosuid,nodev,noexec,relatime
│ ├─/sys/firmware/efi/efivars
│ │                   efivarfs
│ │                           efivarf rw,nosuid,nodev,noexec,relatime
│ ├─/sys/fs/bpf       bpf     bpf     rw,nosuid,nodev,noexec,relatime,mode=700
│ ├─/sys/kernel/config
│ │                   configfs
│ │                           configf rw,nosuid,nodev,noexec,relatime
│ ├─/sys/fs/fuse/connections
│ │                   fusectl fusectl rw,nosuid,nodev,noexec,relatime
│ └─/sys/kernel/debug debugfs debugfs rw,nosuid,nodev,noexec,relatime
├─/nix/.ro-store      /dev/loop0
│                             squashf ro,relatime,errors=continue
├─/nix/.rw-store      tmpfs   tmpfs   rw,relatime,mode=755
└─/nix/store          overlay overlay rw,relatime,lowerdir=/mnt-root/nix/.ro-stor
  └─/nix/store        overlay overlay ro,relatime,lowerdir=/mnt-root/nix/.ro-stor
11:13:04
@waltmck:matrix.orgwaltmck
In reply to @lassulus:lassul.us
Invalid argument during seek for read on /dev/md/raid1 seems like a corrupt partition table. can you try printing it with fdisk -l or parted -l?

fdisk -l gives

GPT PMBR size mismatch (1997844479 != 998922239) will be corrected by write.
Disk /dev/md/raid1: 476.32 GiB, 511448186880 bytes, 998922240 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x00000000

Device          Boot Start       End   Sectors   Size Id Type
/dev/md/raid1p1          1 998922239 998922239 476.3G ee GPT
11:14:45
@lassulus:lassul.uslassulushuh dos11:18:08
@lassulus:lassul.uslassulusthat doesn't see right11:18:13
@lassulus:lassul.uslassulusmaybe there was already a partition table which got mixed up somehow and the cleanup script failed to delete it11:18:44
@lassulus:lassul.uslassulushow did you run disko?11:19:24
@waltmck:matrix.orgwaltmckInteresting. That means that disko isn't actually totally reproducible/declarative?11:19:29
@waltmck:matrix.orgwaltmckI am running it through nixos-anywhere11:19:40
@waltmck:matrix.orgwaltmckI have a rescue system booted from a network drive so I have access to the disks11:20:06
@lassulus:lassul.uslassulusit should be, but removing existing partitions is sometimes a bit lagging :)11:20:14
@lassulus:lassul.uslassulussince they can be used in all different sort of ways11:20:29
@lassulus:lassul.uslassulusbut nixos-anywhere usually takes care of that by running a kexec11:20:45
@waltmck:matrix.orgwaltmckwhen you initialize a new partition, you shouldn't be assuming that the disk is zeroed out11:20:47
@waltmck:matrix.orgwaltmckRight, disko runs after a kexec11:21:07
@lassulus:lassul.uslassulusah, we run wipefs before running disko11:22:06
@lassulus:lassul.uslassulushttps://github.com/nix-community/disko/blob/master/disk-deactivate/disk-deactivate.jq#L3311:22:06
@waltmck:matrix.orgwaltmckI've tried this many times across reboots and it is totally reproducible. I haven't tried manually zeroing out the disks though just because I assumed that semantically the curring contents of a disk shouldn't matter when reformatting11:22:13
@waltmck:matrix.orgwaltmck
In reply to @waltmck:matrix.org
I've tried this many times across reboots and it is totally reproducible. I haven't tried manually zeroing out the disks though just because I assumed that semantically the curring contents of a disk shouldn't matter when reformatting
current
11:22:43
@lassulus:lassul.uslassuluswell they shouldn't, but sometimes, if there is already an mdadm it can get activated at random times and that can interfere for example with other stuff11:23:28
@waltmck:matrix.orgwaltmckInteresting, I'm not really sure how that works. How does the mdadm get activated? Is the problem that writes to the virtual device might be concurrent with writes to the underlying devices?11:24:34
@lassulus:lassul.uslassulusnot sure when that exactly happens, otherwise I would have reproduced and fixed it :) but I have seen raid devices being activated later, some minutes after booting11:26:34
@lassulus:lassul.uslassulusif this happens after we run the disk-deactivate script, things get wonky11:27:05
@lassulus:lassul.uslassulusbut not sure that's even the issue here, I guess you can check if there are any lingering raid devices active11:28:02

Show newer messages


Back to Room ListRoom Version: 10