Two external hard drives (USB powered) are initially connected to a Raspberry Pi 4B via the two USB 3.0 ports and they have the following block ids:
mdadm to create a RADI0 configuration, however, at least once in a day, one of the drives get disconnected (probably). What results is a different id such as
For testing purposes, I removed the RAID0 configuration and timed how long the block name persists. While simply formatting the hard drive with
/dev/sda device disappeared for some time and reappeared as
Restarting the Pi again restores the original ids to the drives.
pi@naspi:~ $ lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT sda 8:0 0 465.8G 0 disk └─sda1 8:1 0 465.8G 0 part sdb 8:16 0 465.8G 0 disk └─sdb1 8:17 0 465.8G 0 part
Changes to: (sdb changes to sdc)
pi@naspi:~ $ lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT sda 8:0 0 465.8G 0 disk └─sda1 8:1 0 465.8G 0 part sdc 8:16 0 465.8G 0 disk └─sdc1 8:17 0 465.8G 0 part
How can I fix this without restarting the Pi every time this happens? I do not even know why this is occurring.
(owing to this problem, I can never set up a RAID0 configuration and then share that over my local network as a SAMBA server)