On 7/18/23 07:09, Linus Sphinx wrote:
It's been so smooth and worked so long I'd forgotten how difficult Nvidia could be. Wish I'd waited for 6.4 autofs still puts my machine in a death spiral but NFS doesn't. I blew a drive in my NAS, vintage thecus n5200, 5 3TB Hitachi deathfarts, io error, not a bad sector, even passed a bad sector scan and didn't fail til you tried to add it as a spare. Found one exact model NOS on B&H Photo, had to break all the disk caddy locks, no clue where the keys went, popped it in, scanned/added/rebuilt itself just like it's supposed to, was amazing. Can't remember where I commented it out or what I turned off to disable it while waiting for the disk, has to be something I did.
I never understood what about autofs/automounter is needed or desirable. /etc/fstab -> mount <foo> -> umount <foo>. Simple, works. Did I miss the memo?
The mdraid manpages are a bit confusing about how to add a device as a spare, but here's a cool method to ease the pain, make a fake RAID from fake disks made from plain files. Make your mistakes in the no-pain sandbox.
# Create 5 fake block devices (fake disks), each 10MB for i in `seq 1 5`; do truncate --size=10M fakeblockdev$i; done # Create loopback mountpoints and mount the fake disks for i in `seq 1 5` ; do losetup /dev/loop$i fakeblockdev$i; done # Create a RAID from ther fake disks mdadm --create --level=10 --raid-devices=4 --spare-devices=1 /dev/md42 /dev/loop{1..5}
# Create fake filesystems on the fake raid mke2fs -m 0 -L fakeraid -t ext2 /dev/md42
# cat /proc/mdstat
md42 : active raid10 loop5[4](*S*) loop4[3] loop3[2] loop2[1] loop1[0] 16384 blocks super 1.2 512K chunks 2 near-copies [4/4] [UUUU]
Wallah! Once you've got it working in the sandbox, the same commands should work on the real thing.