Umbrel node hangs while mining

It’s strange, but when I use my Umbrel node to mine Bitcoin by renting hashrate, using the following, my Umbrel hangs and I have to restart Bitcoin Knots to get it to sync again.

  • DATUM
  • HashGG
  • playit.gg
  • Brainins (2 or 3 bids)
  • Ocean

something from the log

ata1.00: failed command: WRITE FPDMA QUEUED

sd 0:0:0:0: [sda] tag#14 FAILED Result: hostbyte=DID_TIME_OUT driverbyte=DRIVER_OK cmd_age=35s

I/O error, dev sda, sector 936794792 op 0x1:(WRITE)

EXT4-fs warning (device sda4): ext4_end_bio:353: I/O error 10 writing to inode 263235

I/O error, dev sda, sector 936798320 op 0x1:(WRITE)

EXT4-fs (sda4): failed to convert unwritten extents to written extents – potential data loss!

Buffer I/O error on device sda4, logical block 111992078
Buffer I/O error on device sda4, logical block 111992079
Buffer I/O error on device sda4, logical block 111992080

This indicates there was a write error to the drive. It could be the drive beginning to fail, or could be a power issue. Has this happened multiple times, or just once?

Yes, it happens multiple times, but when I stop mining, my Umbrel node works normally.

Is it an official Umbrel or a DIY build?

DIY, I am using a mini pc

My best guess is that high rented hashrate (which causes frequent template/share/RPC/logging activity) naturally increases the CPU, memory, network, and disk pressure on the system. That pressure is likely exposing an unstable power supply, disk, SATA cable/adapter, or filesystem corruption. Obviously that is a long list of possible causes, but unfortunately corrupted data can be caused by many things. The increased pressure on the system is likely bringing whatever that cause is up to the surface.

Probably a good starting point will be checking the disk for errors. For that, SSH into your Umbrel and try running the following:

sudo apt update
sudo apt install smartmontools
sudo smartctl -a /dev/sda
sudo smartctl -t long /dev/sda

Then after the long test completes:

sudo smartctl -a /dev/sda

Bad signs would include reallocated sectors, pending sectors, uncorrectable errors, UDMA CRC errors, media wearout, failed self-tests, or increasing error counters. You’ll kind of need to dig through the report output to see if anything stands out. SMART is a good tool to use for suspected disk failure (one possible cause for what you are seeing).