getumbrel / umbrel-os

umbrelOS for Raspberry Pi 4 (only). Covert your Raspberry Pi into a home server in one click. For other hardware, checkout https://github.com/getumbrel/umbrel
https://umbrel.com
BSD 3-Clause "New" or "Revised" License
586 stars 55 forks source link

Improve stability for ADATA ED600 SSD enclosure #139

Closed mirceavesa closed 3 years ago

mirceavesa commented 3 years ago

Noticed that bitcoin container kept crashing after setting up Umbrel on my Raspberry Pi 4, so I've applied the fix mentioned here: https://www.raspberrypi.org/forums/viewtopic.php?t=245931

Device info from my setup:

Log data for bitcoin container: umbrel@umbrel:~ $ grep -i error /var/log/syslog | tail Oct 18 15:10:11 umbrel kernel: [ 1043.975680] JBD2: Detected IO errors while flushing file data on sda1-8 Oct 18 15:10:11 umbrel kernel: [ 1043.975865] EXT4-fs error (device sda1) in ext4_reserve_inode_write:5941: Journal has aborted Oct 18 15:10:11 umbrel kernel: [ 1043.982697] EXT4-fs error (device sda1): ext4_journal_check_start:61: Detected aborted journal Oct 18 15:10:11 umbrel kernel: [ 1043.984461] JBD2: Detected IO errors while flushing file data on sda1-8 Oct 18 15:10:11 umbrel middleware[610]: LndError: Unable to unlock wallet Oct 18 15:10:12 umbrel bitcoin[610]: 2020-10-18T15:10:12Z ERROR: UndoWriteToDisk: OpenUndoFile failed Oct 18 15:10:12 umbrel bitcoin[610]: 2020-10-18T15:10:12Z Error: A fatal internal error occurred, see debug.log for details Oct 18 15:10:12 umbrel bitcoin[610]: 2020-10-18T15:10:12Z ERROR: ConnectTip: ConnectBlock 0000000000000000184c1483b14d9861995ba77958f67d82a00b281b656a20b5 failed, Failed to write undo data Oct 18 15:10:12 umbrel bitcoin[610]: Error: A fatal internal error occurred, see debug.log for details Oct 18 15:10:46 umbrel dockerd[610]: time="2020-10-18T15:10:46.427465831Z" level=error msg=Error setting up exec command in container bitcoin: Container 63b4bde31207e453658096406080084dfc7dd21e9ceb28bb40fbd8bfee144f52 is not running

Confirmed the fix is applied: [ 1.948864] usb 1-1.4: new high-speed USB device number 3 using xhci_hcd [ 2.130544] usb 1-1.4: New USB device found, idVendor=125f, idProduct=a76a, bcdDevice= 2.04 [ 2.130591] usb 1-1.4: New USB device strings: Mfr=1, Product=2, SerialNumber=3 [ 2.130621] usb 1-1.4: Product: ADATA ED600 USB Device [ 2.130645] usb 1-1.4: Manufacturer: ADATA [ 2.130667] usb 1-1.4: SerialNumber: 00000000001C [ 2.137374] scsi host0: uas [ 2.139172] scsi 0:0:0:0: Direct-Access ADATA ED600 0204 PQ: 0 ANSI: 6 [ 1.522300] usb 2-2: UAS is blacklisted for this device, using usb-storage instead [ 1.522434] usb 2-2: UAS is blacklisted for this device, using usb-storage instead

mirceavesa commented 3 years ago

Hey @AaronDewes , I've updated the .txt file too, apologies if it's still not right, I'm a bit unfamiliar with this.

AaronDewes commented 3 years ago

The patch file should look like this:

--- stage2.orig/rootfs/boot/cmdline.txt
+++ stage2/rootfs/boot/cmdline.txt
@@ -1 +1 @@
-usb-storage.quirks=152d:1561:u,152d:1576:u,152d:0578:u,125f:a76a:u console=serial0,115200 console=tty1 root=ROOTDEV rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait
+usb-storage.quirks=152d:1561:u,152d:1576:u,152d:0578:u,125f:a76a:u console=serial0,115200 console=tty1 root=ROOTDEV rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait quiet init=/usr/lib/raspi-config/init_resize.sh
mirceavesa commented 3 years ago

@AaronDewes I updated the patch file per your previous comment, but something's still not right :(

mirceavesa commented 3 years ago

Yay!

mirceavesa commented 3 years ago

Is there anything else required from my part? It says "Review required" at the very end

AaronDewes commented 3 years ago

No, this only means a member of the Umbrel team has to revuew your PR, then it wil be merged.

mirceavesa commented 3 years ago

Thanks for bearing with me through this! :)

lukechilds commented 3 years ago

Apologies for the delay on this guys!

Thanks a lot for the contribution @mirceavesa and thanks for your help reviewing @AaronDewes!