Thanks, hadn't thought of that, just went into automatic modeRegardless of the bootable status of various rpi nvme implementations don't forget to take into account the fact if you "commission" a set of raid drives at the same time, they're gonna wear out at the same time. This is of particular concern with solid state. The "smartmontools" wear attribute varies according to manufacturer: my crucial ssd's use attribute 202 for instance whereas the pair of "XPG SPECTRIX S40G" in my PC yield nothing useful: well there is "Percentage Used" but as it's been sat at zero since forever methinks that's a waste of text. Consequently the second xpg is sat unused. It exists solely for me to restore my PC onto when the first one fails. (Knowing my luck the first xpg will fail in a way which prevents the second xpg from being used so I'll have to take the PC to bits anyway).
Long winded way of me saying I don't think raid is useful on solid state for domestic use because nobody is going to replace half their working disks six months down the line to avoid the above. Consequently, run on one nvme and rsync the first to the second periodically. Or, as you seem to know lvm, here's my PC....enough for the OS. The data volume group (sdu_data) is elsewhere but could easily be partition 4 above.Code:
foo@sdu:~$ sudo parted /dev/nvme0n1 p freeModel: XPG SPECTRIX S40G (nvme)Disk /dev/nvme0n1: 256GBSector size (logical/physical): 512B/512BPartition Table: gptDisk Flags: Number Start End Size File system Name Flags 17.4kB 1049kB 1031kB Free Space 1 1049kB 256MB 255MB fat32 efi boot, esp 2 256MB 64.0GB 63.7GB sdu lvm 3 64.0GB 128GB 64.0GB sdu lvm 128GB 256GB 128GB Free Space
The tool 'sdm' can create an lvm image. After pestering @bls months ago to add lvm support, it's only this weekend I've been able to look into it. I did this to a thumb drive....for a lite version 64bit bookworm. Loosely something like this..Code:
foo@pi20:/wrk $ sudo parted /dev/sda p freeModel: USB SanDisk 3.2Gen1 (scsi)Disk /dev/sda: 123GBSector size (logical/physical): 512B/512BPartition Table: gptDisk Flags: Number Start End Size File system Name Flags 17.4kB 4194kB 4177kB Free Space 1 4194kB 541MB 537MB fat32 msftdata 2 541MB 5943MB 5402MB lvm 5943MB 123GB 117GB Free Space
Code:
#!/bin/bashARC="2024-03-15-raspios-bookworm-arm64-lite.img.xz"IMG="T/z.img"DEV="/dev/sda": ${E:="echo"}mkdir -p T || exit 1[ -f "$IMG" ] || { xzcat --verbose "$ARC" > "$IMG" $E sdm --extend "$IMG" --xmb 1024 || exit 1}$E sdm --customize "$IMG" --batch \ --plugin user:"adduser=foo|uid=1001|password=oof" \ --plugin disables:piwiz \ || exit 1lsscsi | grep "$DEV"[ $? -eq 0 ] && { $E sdm --burn "$DEV" --hostname pi20 --convert-root lvm "$IMG"}
My current thought it I want to have a play with ZFS and using mirror mode for that, again maybe thats the same issues as you described above. But I am doing it more to play with zfs as well.
The current issue I am trying to workout is what to put on nvme and what to leave SD.
There is a lot of the directory structure that is static - read only - I did read though that reads also cause issues on SDs !
So I am thinking right now
/boot - fat can't get past this
some bit of root on ext4
some bit on ZFS - although if I have all of it on zfs I can snap before updates and potentially roll back
My concern though is what happens if something goes wrong how to get access to the disk - rescue disk - but i need ZFS on it etc etc.
But playing and learning is fun ... expect when you have killed your last DNS / DHCP server at home
SDM => https://github.com/gitbls/sdm
I'm planning to do the same. I have a nvme base duo from pimoroni and I want to set a zfs mirror and boot from here. Have you been able to do it?
Statistics: Posted by joseju — Wed Dec 11, 2024 6:38 pm