Rockpi-sata.service unmounts md RAID array

Hello, I have a problem that appeared after I have created a software RAID 5 array using mdadm. Before that, while I still only had my 3 disks connected individually, everything seemed to work fine and the OLED display on the Quad SATA HAT seemed to be showing correct information and it was responsive to button presses.

After I have configured the array and mounted in in OMV, I noticed the OLED screen became stuck and unresponsive to any button presses. After a restart, the OLED screen has never turned on again. I have noticed that when I reboot the whole device (unplug from power), raspberry pi and OMV boot up just fine, the array is mounted and I can use it without any apparent issues. However, when I then connect to the rpi over ssh and try to restart the rockpi service, the raid array gets unmounted for some reason and the OLED screen is still blank. I can see some errors in the journal, but I do not understand how those can be connected to the rockpi service.

I have tried to update the jms firmware and I have tried both versions of the python script files- A verison that comes with the install script from the wiki article and also updated script files that are on github repo. None of it made any difference. Did anyone experience anything similar?

service status before attempting a restart:

sudo systemctl status rockpi-sata.service
● rockpi-sata.service - Rockpi SATA Hat
   Loaded: loaded (/lib/systemd/system/rockpi-sata.service; enabled; vendor preset: enabled)
   Active: active (running) since Mon 2022-01-03 17:10:58 CET; 24min ago
 Main PID: 692 (python3)
    Tasks: 3 (limit: 4915)
   CGroup: /system.slice/rockpi-sata.service
           ├─ 692 /usr/bin/python3 /usr/bin/rockpi-sata/main.py on
           └─2117 /usr/bin/python3 /usr/bin/rockpi-sata/main.py on

a part of journal output after rockpi service restart:

Jan 03 17:36:47 raspberrypi sudo[9280]: pam_unix(sudo:session): session opened for user root by pi(uid=0)
Jan 03 17:36:47 raspberrypi systemd[1]: Stopping Rockpi SATA Hat...
-- Subject: A stop job for unit rockpi-sata.service has begun execution
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- A stop job for unit rockpi-sata.service has begun execution.
--
-- The job identifier is 871.
Jan 03 17:36:47 raspberrypi systemd[1]: rockpi-sata.service: Main process exited, code=killed, status=15/TERM
-- Subject: Unit process exited
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- An ExecStart= process belonging to unit rockpi-sata.service has exited.
--
-- The process' exit code is 'killed' and its exit status is 15.
Jan 03 17:36:47 raspberrypi systemd[1]: rockpi-sata.service: Succeeded.
-- Subject: Unit succeeded
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- The unit rockpi-sata.service has successfully entered the 'dead' state.
Jan 03 17:36:47 raspberrypi systemd[1]: Stopped Rockpi SATA Hat.
-- Subject: A stop job for unit rockpi-sata.service has finished
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- A stop job for unit rockpi-sata.service has finished.
--
-- The job identifier is 871 and the job result is done.
Jan 03 17:36:47 raspberrypi systemd[1]: Started Rockpi SATA Hat.
-- Subject: A start job for unit rockpi-sata.service has finished successfully
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- A start job for unit rockpi-sata.service has finished successfully.
--
-- The job identifier is 871.
Jan 03 17:36:47 raspberrypi sudo[9280]: pam_unix(sudo:session): session closed for user root
Jan 03 17:36:48 raspberrypi kernel: usb 2-2: USB disconnect, device number 2
Jan 03 17:36:48 raspberrypi kernel: sd 0:0:0:0: [sda] Synchronizing SCSI cache
Jan 03 17:36:48 raspberrypi kernel: sd 0:0:0:0: [sda] Synchronize Cache(10) failed: Result: hostbyte=0x07 driverbyte=0x00
Jan 03 17:36:48 raspberrypi kernel: sd 0:0:0:1: [sdb] Synchronizing SCSI cache
Jan 03 17:36:49 raspberrypi kernel: sd 0:0:0:1: [sdb] Synchronize Cache(10) failed: Result: hostbyte=0x07 driverbyte=0x00
Jan 03 17:36:49 raspberrypi kernel: usb 2-1: USB disconnect, device number 3
Jan 03 17:36:49 raspberrypi kernel: sd 1:0:0:0: [sdc] Synchronizing SCSI cache
Jan 03 17:36:50 raspberrypi kernel: sd 1:0:0:0: [sdc] Synchronize Cache(10) failed: Result: hostbyte=0x07 driverbyte=0x00
Jan 03 17:36:51 raspberrypi kernel: usb 2-2: new SuperSpeed Gen 1 USB device number 4 using xhci_hcd
Jan 03 17:36:51 raspberrypi kernel: usb 2-2: New USB device found, idVendor=1058, idProduct=0a10, bcdDevice=81.36
Jan 03 17:36:51 raspberrypi kernel: usb 2-2: New USB device strings: Mfr=1, Product=2, SerialNumber=5
Jan 03 17:36:51 raspberrypi kernel: usb 2-2: Product: JMS56x Series
Jan 03 17:36:51 raspberrypi kernel: usb 2-2: Manufacturer: JMicron
Jan 03 17:36:51 raspberrypi kernel: usb 2-2: SerialNumber: 1234567890123
Jan 03 17:36:51 raspberrypi kernel: scsi host2: uas
Jan 03 17:36:51 raspberrypi kernel: scsi 2:0:0:0: Direct-Access     ST2000LM 015-2E8174       8136 PQ: 0 ANSI: 6
Jan 03 17:36:51 raspberrypi kernel: sd 2:0:0:0: Attached scsi generic sg0 type 0
Jan 03 17:36:51 raspberrypi kernel: sd 2:0:0:0: [sdd] 3907029168 512-byte logical blocks: (2.00 TB/1.82 TiB)
Jan 03 17:36:51 raspberrypi kernel: sd 2:0:0:0: [sdd] Write Protect is off
Jan 03 17:36:51 raspberrypi kernel: sd 2:0:0:0: [sdd] Mode Sense: 67 00 10 08
Jan 03 17:36:51 raspberrypi kernel: scsi 2:0:0:1: Direct-Access     ST2000LM 015-2E8174       8136 PQ: 0 ANSI: 6
Jan 03 17:36:51 raspberrypi kernel: sd 2:0:0:0: [sdd] Write cache: enabled, read cache: enabled, supports DPO and FUA
Jan 03 17:36:51 raspberrypi kernel: sd 2:0:0:0: [sdd] Optimal transfer size 33553920 bytes
Jan 03 17:36:51 raspberrypi kernel: sd 2:0:0:1: Attached scsi generic sg1 type 0
Jan 03 17:36:51 raspberrypi kernel: sd 2:0:0:1: [sde] 3907029168 512-byte logical blocks: (2.00 TB/1.82 TiB)
Jan 03 17:36:51 raspberrypi kernel: sd 2:0:0:1: [sde] Write Protect is off
Jan 03 17:36:51 raspberrypi kernel: sd 2:0:0:1: [sde] Mode Sense: 67 00 10 08
Jan 03 17:36:51 raspberrypi kernel: sd 2:0:0:1: [sde] Write cache: enabled, read cache: enabled, supports DPO and FUA
Jan 03 17:36:51 raspberrypi kernel: sd 2:0:0:1: [sde] Optimal transfer size 33553920 bytes
Jan 03 17:36:51 raspberrypi kernel: sd 2:0:0:0: [sdd] Attached SCSI disk
Jan 03 17:36:51 raspberrypi kernel: sd 2:0:0:1: [sde] Attached SCSI disk
Jan 03 17:36:52 raspberrypi kernel: md/raid:md0: Disk failure on sda, disabling device.
                                    md/raid:md0: Operation continuing on 2 devices.
Jan 03 17:36:52 raspberrypi kernel: md: super_written gets error=-5
Jan 03 17:36:52 raspberrypi kernel: md: super_written gets error=-5
Jan 03 17:36:52 raspberrypi kernel: md: super_written gets error=-5
Jan 03 17:36:52 raspberrypi kernel: md: super_written gets error=-5
Jan 03 17:36:52 raspberrypi kernel: md: super_written gets error=-5
Jan 03 17:36:52 raspberrypi kernel: md: super_written gets error=-5
Jan 03 17:36:52 raspberrypi kernel: md: super_written gets error=-5
Jan 03 17:36:52 raspberrypi kernel: md: super_written gets error=-5
Jan 03 17:36:52 raspberrypi kernel: md: super_written gets error=-5
Jan 03 17:36:52 raspberrypi kernel: md: super_written gets error=-5
Jan 03 17:36:52 raspberrypi kernel: md: super_written gets error=-5
Jan 03 17:36:52 raspberrypi kernel: md: super_written gets error=-5
Jan 03 17:36:53 raspberrypi systemd-udevd[9323]: Process '/sbin/mdadm -If sdb --path platform-fd500000.pcie-pci-0000:01:00.0-usb-0:2:1.0-scsi-0:0:0:1' failed with exit code 1.
Jan 03 17:36:53 raspberrypi systemd[1]: Unmounting /srv/dev-disk-by-uuid-e0a2d316-197b-41fc-a6f9-9d7d14348742...
-- Subject: A stop job for unit srv-dev\x2ddisk\x2dby\x2duuid\x2de0a2d316\x2d197b\x2d41fc\x2da6f9\x2d9d7d14348742.mount has begun execution
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- A stop job for unit srv-dev\x2ddisk\x2dby\x2duuid\x2de0a2d316\x2d197b\x2d41fc\x2da6f9\x2d9d7d14348742.mount has begun execution.
--
-- The job identifier is 952.
Jan 03 17:36:53 raspberrypi mtp-probe[9452]: checking bus 2, device 4: "/sys/devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb2/2-2"
Jan 03 17:36:53 raspberrypi mtp-probe[9452]: bus: 2, device: 4 was not an MTP device
Jan 03 17:36:53 raspberrypi systemd[2824]: srv-dev\x2ddisk\x2dby\x2duuid\x2de0a2d316\x2d197b\x2d41fc\x2da6f9\x2d9d7d14348742.mount: Succeeded.
-- Subject: Unit succeeded
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- The unit UNIT has successfully entered the 'dead' state.
Jan 03 17:36:53 raspberrypi mtp-probe[9455]: checking bus 2, device 4: "/sys/devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb2/2-2"
Jan 03 17:36:53 raspberrypi mtp-probe[9455]: bus: 2, device: 4 was not an MTP device
Jan 03 17:36:53 raspberrypi kernel: md: super_written gets error=-5
Jan 03 17:36:53 raspberrypi kernel: md: super_written gets error=-5
Jan 03 17:36:53 raspberrypi kernel: md: super_written gets error=-5
Jan 03 17:36:53 raspberrypi kernel: md: super_written gets error=-5
Jan 03 17:36:53 raspberrypi kernel: md: super_written gets error=-5
Jan 03 17:36:53 raspberrypi kernel: md: super_written gets error=-5
Jan 03 17:36:53 raspberrypi kernel: md/raid:md0: read error not correctable (sector 1952843984 on sdc).
Jan 03 17:36:53 raspberrypi kernel: md/raid:md0: read error not correctable (sector 1952843984 on sdb).
Jan 03 17:36:53 raspberrypi kernel: md/raid:md0: read error not correctable (sector 1952843992 on sdc).
Jan 03 17:36:53 raspberrypi kernel: md/raid:md0: read error not correctable (sector 1952843992 on sdb).
Jan 03 17:36:53 raspberrypi kernel: md/raid:md0: read error not correctable (sector 1952843984 on sdc).
Jan 03 17:36:53 raspberrypi kernel: md/raid:md0: read error not correctable (sector 1952843984 on sdb).
Jan 03 17:36:53 raspberrypi kernel: md: super_written gets error=-5
Jan 03 17:36:53 raspberrypi kernel: md: super_written gets error=-5
Jan 03 17:36:53 raspberrypi kernel: md: super_written gets error=-5
Jan 03 17:36:53 raspberrypi kernel: md: super_written gets error=-5
Jan 03 17:36:53 raspberrypi kernel: md: super_written gets error=-5
Jan 03 17:36:53 raspberrypi kernel: md: super_written gets error=-5
Jan 03 17:36:53 raspberrypi kernel: md/raid:md0: read error not correctable (sector 1952843992 on sdc).
Jan 03 17:36:53 raspberrypi kernel: md/raid:md0: read error not correctable (sector 1952843992 on sdb).
Jan 03 17:36:53 raspberrypi kernel: md: super_written gets error=-5
Jan 03 17:36:53 raspberrypi kernel: md: super_written gets error=-5
Jan 03 17:36:53 raspberrypi kernel: md: super_written gets error=-5
Jan 03 17:36:53 raspberrypi kernel: md: super_written gets error=-5
Jan 03 17:36:53 raspberrypi kernel: md: super_written gets error=-5
Jan 03 17:36:53 raspberrypi kernel: md: super_written gets error=-5
Jan 03 17:36:53 raspberrypi kernel: Aborting journal on device md0-8.
Jan 03 17:36:53 raspberrypi kernel: md: super_written gets error=-5
Jan 03 17:36:53 raspberrypi kernel: md: super_written gets error=-5
Jan 03 17:36:53 raspberrypi kernel: md: super_written gets error=-5
Jan 03 17:36:53 raspberrypi kernel: md: super_written gets error=-5
Jan 03 17:36:53 raspberrypi kernel: md: super_written gets error=-5
Jan 03 17:36:53 raspberrypi kernel: md: super_written gets error=-5
Jan 03 17:36:53 raspberrypi kernel: Buffer I/O error on dev md0, logical block 488144896, lost sync page write
Jan 03 17:36:53 raspberrypi kernel: JBD2: Error -5 detected when updating journal superblock for md0-8.
Jan 03 17:36:53 raspberrypi kernel: md: super_written gets error=-5
Jan 03 17:36:53 raspberrypi kernel: md: super_written gets error=-5
Jan 03 17:36:53 raspberrypi kernel: md: super_written gets error=-5
Jan 03 17:36:53 raspberrypi kernel: md: super_written gets error=-5
Jan 03 17:36:53 raspberrypi kernel: md: super_written gets error=-5
Jan 03 17:36:53 raspberrypi kernel: md: super_written gets error=-5
Jan 03 17:36:53 raspberrypi kernel: md: super_written gets error=-5
Jan 03 17:36:53 raspberrypi kernel: Buffer I/O error on dev md0, logical block 0, lost sync page write
Jan 03 17:36:53 raspberrypi kernel: EXT4-fs (md0): I/O error while writing superblock
Jan 03 17:36:53 raspberrypi kernel: EXT4-fs error (device md0): ext4_journal_check_start:83: Detected aborted journal
Jan 03 17:36:53 raspberrypi kernel: EXT4-fs (md0): Remounting filesystem read-only
Jan 03 17:36:53 raspberrypi systemd[1]: srv-dev\x2ddisk\x2dby\x2duuid\x2de0a2d316\x2d197b\x2d41fc\x2da6f9\x2d9d7d14348742.mount: Succeeded.
-- Subject: Unit succeeded
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- The unit srv-dev\x2ddisk\x2dby\x2duuid\x2de0a2d316\x2d197b\x2d41fc\x2da6f9\x2d9d7d14348742.mount has successfully entered the 'dead' state.
Jan 03 17:36:53 raspberrypi systemd[1]: Unmounted /srv/dev-disk-by-uuid-e0a2d316-197b-41fc-a6f9-9d7d14348742.
-- Subject: A stop job for unit srv-dev\x2ddisk\x2dby\x2duuid\x2de0a2d316\x2d197b\x2d41fc\x2da6f9\x2d9d7d14348742.mount has finished
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- A stop job for unit srv-dev\x2ddisk\x2dby\x2duuid\x2de0a2d316\x2d197b\x2d41fc\x2da6f9\x2d9d7d14348742.mount has finished.
--
-- The job identifier is 952 and the job result is done.
Jan 03 17:36:53 raspberrypi systemd[1]: systemd-fsck@dev-disk-by\x2duuid-e0a2d316\x2d197b\x2d41fc\x2da6f9\x2d9d7d14348742.service: Succeeded.
-- Subject: Unit succeeded
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- The unit systemd-fsck@dev-disk-by\x2duuid-e0a2d316\x2d197b\x2d41fc\x2da6f9\x2d9d7d14348742.service has successfully entered the 'dead' state.
Jan 03 17:36:53 raspberrypi systemd[1]: Stopped File System Check on /dev/disk/by-uuid/e0a2d316-197b-41fc-a6f9-9d7d14348742.
-- Subject: A stop job for unit systemd-fsck@dev-disk-by\x2duuid-e0a2d316\x2d197b\x2d41fc\x2da6f9\x2d9d7d14348742.service has finished
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- A stop job for unit systemd-fsck@dev-disk-by\x2duuid-e0a2d316\x2d197b\x2d41fc\x2da6f9\x2d9d7d14348742.service has finished.
--
-- The job identifier is 953 and the job result is done.
Jan 03 17:36:53 raspberrypi kernel: md: super_written gets error=-5
Jan 03 17:36:53 raspberrypi kernel: md: super_written gets error=-5
Jan 03 17:36:53 raspberrypi kernel: md: super_written gets error=-5
Jan 03 17:36:53 raspberrypi kernel: md: super_written gets error=-5
Jan 03 17:36:53 raspberrypi kernel: md: super_written gets error=-5
Jan 03 17:36:53 raspberrypi kernel: md: super_written gets error=-5
Jan 03 17:36:53 raspberrypi kernel: md/raid:md0: read error not correctable (sector 3907028864 on sdb).
Jan 03 17:36:53 raspberrypi kernel: md/raid:md0: read error not correctable (sector 3907028864 on sdb).
Jan 03 17:36:56 raspberrypi kernel: usb 2-1: new SuperSpeed Gen 1 USB device number 5 using xhci_hcd
Jan 03 17:36:56 raspberrypi kernel: usb 2-1: New USB device found, idVendor=1058, idProduct=0a10, bcdDevice=81.36
Jan 03 17:36:56 raspberrypi kernel: usb 2-1: New USB device strings: Mfr=1, Product=2, SerialNumber=5
Jan 03 17:36:56 raspberrypi kernel: usb 2-1: Product: JMS56x Series
Jan 03 17:36:56 raspberrypi kernel: usb 2-1: Manufacturer: JMicron
Jan 03 17:36:56 raspberrypi kernel: usb 2-1: SerialNumber: 1234567890123
Jan 03 17:36:56 raspberrypi kernel: scsi host3: uas
Jan 03 17:36:56 raspberrypi kernel: scsi 3:0:0:0: Direct-Access     ST2000LM 015-2E8174       8136 PQ: 0 ANSI: 6
Jan 03 17:36:56 raspberrypi kernel: sd 3:0:0:0: Attached scsi generic sg2 type 0
Jan 03 17:36:56 raspberrypi kernel: sd 3:0:0:0: [sda] 3907029168 512-byte logical blocks: (2.00 TB/1.82 TiB)
Jan 03 17:36:56 raspberrypi kernel: sd 3:0:0:0: [sda] Write Protect is off
Jan 03 17:36:56 raspberrypi kernel: sd 3:0:0:0: [sda] Mode Sense: 67 00 10 08
Jan 03 17:36:56 raspberrypi kernel: sd 3:0:0:0: [sda] Write cache: enabled, read cache: enabled, supports DPO and FUA
Jan 03 17:36:56 raspberrypi kernel: sd 3:0:0:0: [sda] Optimal transfer size 33553920 bytes
Jan 03 17:36:56 raspberrypi kernel: sd 3:0:0:0: [sda] Attached SCSI disk
Jan 03 17:36:58 raspberrypi systemd-udevd[9346]: Process '/sbin/mdadm -If sdc --path platform-fd500000.pcie-pci-0000:01:00.0-usb-0:1:1.0-scsi-0:0:0:0' failed with exit code 1.
Jan 03 17:36:58 raspberrypi mtp-probe[9650]: checking bus 2, device 5: "/sys/devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb2/2-1"
Jan 03 17:36:58 raspberrypi mtp-probe[9650]: bus: 2, device: 5 was not an MTP device
Jan 03 17:36:58 raspberrypi mtp-probe[9651]: checking bus 2, device 5: "/sys/devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb2/2-1"
Jan 03 17:36:58 raspberrypi mtp-probe[9651]: bus: 2, device: 5 was not an MTP device
Jan 03 17:37:01 raspberrypi CRON[9735]: pam_unix(cron:session): session opened for user root by (uid=0)
Jan 03 17:37:01 raspberrypi CRON[9736]: (root) CMD (/usr/sbin/omv-ionice >/dev/null 2>&1)
Jan 03 17:37:01 raspberrypi CRON[9735]: pam_unix(cron:session): session closed for user root
Jan 03 17:37:16 raspberrypi monit[2717]: Lookup for '/srv/dev-disk-by-uuid-e0a2d316-197b-41fc-a6f9-9d7d14348742' filesystem failed  -- not found in /proc/self/mounts
Jan 03 17:37:16 raspberrypi monit[2717]: Filesystem '/srv/dev-disk-by-uuid-e0a2d316-197b-41fc-a6f9-9d7d14348742' not mounted
Jan 03 17:37:16 raspberrypi monit[2717]: 'filesystem_srv_dev-disk-by-uuid-e0a2d316-197b-41fc-a6f9-9d7d14348742' unable to read filesystem '/srv/dev-disk-by-uuid-e0a2d316-197b-41fc-a6f9-9d7d14348742' state
Jan 03 17:37:16 raspberrypi monit[2717]: 'filesystem_srv_dev-disk-by-uuid-e0a2d316-197b-41fc-a6f9-9d7d14348742' trying to restart
Jan 03 17:37:46 raspberrypi monit[2717]: Lookup for '/srv/dev-disk-by-uuid-e0a2d316-197b-41fc-a6f9-9d7d14348742' filesystem failed  -- not found in /proc/self/mounts
Jan 03 17:37:46 raspberrypi monit[2717]: Filesystem '/srv/dev-disk-by-uuid-e0a2d316-197b-41fc-a6f9-9d7d14348742' not mounted
Jan 03 17:37:46 raspberrypi monit[2717]: 'filesystem_srv_dev-disk-by-uuid-e0a2d316-197b-41fc-a6f9-9d7d14348742' unable to read filesystem '/srv/dev-disk-by-uuid-e0a2d316-197b-41fc-a6f9-9d7d14348742' state
Jan 03 17:37:46 raspberrypi monit[2717]: 'filesystem_srv_dev-disk-by-uuid-e0a2d316-197b-41fc-a6f9-9d7d14348742' trying to restart
Jan 03 17:37:46 raspberrypi monit[2717]: 'mountpoint_srv_dev-disk-by-uuid-e0a2d316-197b-41fc-a6f9-9d7d14348742' status failed (1) -- /srv/dev-disk-by-uuid-e0a2d316-197b-41fc-a6f9-9d7d14348742 is not a mountpoint