I ran fio on the block device on my Arch Linux OS drive, a 500GB 970 Evo.
I did not understand my colossal ef-up at the time and I rebooted.
I am now on an Ubuntu live USB disk having completed a full dd of the drive to my NAS.
The fio was programmed to run 4GB of random 4K writes on the drive. Needless to say it wreaked quite the havoc.
There are no partitions visible on the drive. I set my OS up as per the Arch Wiki.
I think I did /boot, /root, /home, /swap in this particular order. I don’t really remember the sizes of the partitions.
Anyone interested in helping me with some tech support?
The home partition does not want to mount. Running fsck I get a ton of errors. When it is completed, the home directory is empty and everything is in folders in the lost+found directory.
Some of the data will have likely been overwritten. The partition wont be good, but the data might. Thats where photorec comes in. Use it on your image to see what you can get back.
I also got some of the “root” files on the home partition back. I managed to get back (most) of the .config directory so I did not have to reconfigure everything as to get my setup back.
I ran Photorec and it has found lots of files but the naming is wrong so I have to manually go through it and find any files I am still missing or that have been corrupted and I don’t know about it yet. Meld is a good way to compare files and directories that might be of help if you happen to suffer from something like this.
The /root partition was absolutely intact for some reason. Fio probably thought better of overwriting it (or I just got lucky there since it was writing to the block device, not the partitions). So, it was just a matter of downloading an Arch bootable iso, setting up the EFI and swap partition again, correcting the fstab and generating the initramfs and kernel on the EFI partition and I mostly got my system back. I did reinstall all packages just in case something did get corrupted in the /root partition but everything works as it did previously. I now just have to sort out the files that I got back from the fsck and the files that Photorec managed to recover.
A backup would have saved me tons of time and frustration but I neglected it since I have been in the verge of turning my Arch install from a regular GPT partition install to moving /home and /root on ZFS so backing everything up to my ZFS NAS is easier, faster and less complicated. So I neglected backing up my files because I was in the process of making it easier for myself to back up my files