| 30 May 2024 |
waltmck | 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 | huh dos | 11:18:08 |
lassulus | that doesn't see right | 11:18:13 |
lassulus | maybe there was already a partition table which got mixed up somehow and the cleanup script failed to delete it | 11:18:44 |
lassulus | how did you run disko? | 11:19:24 |
waltmck | Interesting. That means that disko isn't actually totally reproducible/declarative? | 11:19:29 |
waltmck | I am running it through nixos-anywhere | 11:19:40 |
waltmck | I have a rescue system booted from a network drive so I have access to the disks | 11:20:06 |
lassulus | it should be, but removing existing partitions is sometimes a bit lagging :) | 11:20:14 |
lassulus | since they can be used in all different sort of ways | 11:20:29 |
lassulus | but nixos-anywhere usually takes care of that by running a kexec | 11:20:45 |
waltmck | when you initialize a new partition, you shouldn't be assuming that the disk is zeroed out | 11:20:47 |
waltmck | Right, disko runs after a kexec | 11:21:07 |
lassulus | ah, we run wipefs before running disko | 11:22:06 |
lassulus | https://github.com/nix-community/disko/blob/master/disk-deactivate/disk-deactivate.jq#L33 | 11:22:06 |
waltmck | 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 | 11:22:13 |
waltmck | 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 | well 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 stuff | 11:23:28 |
waltmck | Interesting, 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 |