Btrfs disks mount issue after USB reconnect

This forum is for discussion about general software issues.

Btrfs disks mount issue after USB reconnect

Postby arkap » Fri Apr 17, 2020 8:09 am

Hi,

I run a Pine64 with an external hard disk enclosure connected via USB3. I have 2 pairs of hard disks set up as btrfs RAID1 each.

It frequently happens that there is some issue with the USB connection and it gets powercycled:
$this->bbcode_second_pass_code('', '
[226866.289850] usb 5-1: Device not responding to setup address.
[226866.509734] usb 5-1: Device not responding to setup address.
[226866.729697] usb 5-1: device not accepting address 2, error -71
[226869.969815] usb usb5-port1: Cannot enable. Maybe the USB cable is bad?
[226872.559882] usb usb5-port1: Cannot enable. Maybe the USB cable is bad?
[226875.149936] usb usb5-port1: Cannot enable. Maybe the USB cable is bad?
[226875.150645] usb 5-1: USB disconnect, device number 2
...
[226878.380130] usb usb5-port1: Cannot enable. Maybe the USB cable is bad?
[226880.960101] usb usb5-port1: Cannot enable. Maybe the USB cable is bad?
[226880.960829] usb usb5-port1: attempt power cycle
')

Afterwards, the disks get recognized again as new block devices (e.g. /dev/sda1 becomes /dev/sde1) but with the same UUID. The mounts fail, of course, and I'm unable to re-mount because the btrfs subsystem thinks the old devices are still there:
$this->bbcode_second_pass_code('', 'kernel: BTRFS warning (device sda1): duplicate device fsid:devid for b541edf0-eb09-48bf-a68a-469d2fcabc95:1 old:/dev/sda1 new:/dev/sde1')

The only way I have been able to resolve the issue is to reboot the machine. Does someone know a better way (meaning automatic way other than rebooting) to address the problem?
arkap
 
Posts: 4
Joined: Fri Apr 17, 2020 7:59 am

Re: Btrfs disks mount issue after USB reconnect

Postby ufo6000 » Fri Apr 17, 2020 10:28 am

Before looking into a software workaround, I sugest to solve the hardware issue first, the error message you posted is clear: "Maybe the USB cable is bad?"

Check the cables, how long are they ? Real short USB 3.0 cable ? The original ones from the drives ? Contacts are clean ? They are not loose and are tight and firm in the connector? 2,5 or 3.5 HDD ? Own power suppy ?

You are lucky(!) to use the HDD at the moment after reboot, if your luck run out, both BTRFS can be unreadable, and btrfs is difficult to reapair.
ufo6000
 
Posts: 117
Joined: Fri Jan 22, 2016 7:54 pm

Re: Btrfs disks mount issue after USB reconnect

Postby arkap » Fri Apr 17, 2020 1:55 pm

Alright, thanks for the advice. I've changed the USB cable and made sure both ends are connected well. Let's hope this improves stability.
arkap
 
Posts: 4
Joined: Fri Apr 17, 2020 7:59 am

Re: Btrfs disks mount issue after USB reconnect

Postby arkap » Mon Apr 20, 2020 9:27 am

No luck, unfortunately. The same thing happened again last night. What are my options here? Can I disable the automatic powercycling of the USB? Can I take a closer look into the USB subsystem somehow?
arkap
 
Posts: 4
Joined: Fri Apr 17, 2020 7:59 am


Return to General

Who is online

Users browsing this forum: No registered users and 26 guests