I have a raspberry pi4 that is booting from SD card and then using an external NVME SSD via USB3 as the root partition. (I couldn't get it to boot from the SSD, which is why I am still using the SD card to boot).
After a few days, the SSD decides to go to sleep so the root partition is no longer available and I have to hard reset the device. This is very annoying as I'm using it as a PiHole to block adverts as well as a "desktop" machine.
It will error with, eg:
EXT4-fs error (device sda2): __ext4_find_entry:1536 inode #14286850: comm qmmp: reading direction lblock 0
...as I am using qmmp to play music. I have attempted to modify the boot parameters to disable various things as deduced by wandering around the Internet. /boot/cmdline.txt reads:
console=tty1 root=PARTUUID=d9b3f437-02 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait nvme_core.default_ps_max_latency_us=0 pcie_aspm=off
If I interrogate the system for values related to pcie_aspm or nvme, I get nothing:
sudo sysctl -a | grep nvme
sudo sysctl -a | grep aspm
so I am guessing they're just ignored?
The SSD is a Kingston A2000 (SA2000M8/250G) and the enclosure is a SSK Alunminium M.2 NVME SSD Enclosure Adapter (both from the Amazon descriptions).
I have even attempted to force the disk to stay awake with a crontab -e
*/10 * * * * echo "dummy" > /home/pi/.dummy && sync
...but this doesn't work. Does anyone have any suggestions how to keep the thing on or have joy with other NVME enclosures? I am still within my return window for the enclosure/SSD you see.
Thanks in advance.