I believe this only happens with USB3 capable thumb drives.
As far as I can tell this is what's happening: Router OS is assigning a drive slot name to each USB device reported by the xhci-hcd driver. xhci-hcd reports two USB devices for each physical USB port (/system/resource/usb):
- "Device: 1-0", a "USB Version: 2.0" device with "speed: 480"
- Assigned the USB interface name "USB 2.10 480Mbps"
- Assigned the disk slot name "usb2")
- "Device: 2-0", a "USB Version: 3.0" device with "speed: 5000"
- Assigned the USB interface name "USB 3.00 5000Mbps"
- Assigned the disk slot name "usb1")
When a thumb drive is DETECTED as USB 3, it appears on the xhci-hcd USB 3 interface and the drive's partition is mounted to "/usb1" (the disk slot assigned to that device); likewise, when the drive is DETECTED as USB 2, it appears on the xhci-hcd USB 2 interface and the drive's partition is mounted to "/usb2" (the disk slot assigned to that device).
The problem appears to be that USB3 thumb drives are alternately recognized as either USB2 or USB3, changing state (almost) every reboot cycle. Possible causes for this include not cycling the USB's power during the reboot (or having too short a cycle) so that the thumb drive is in an state unanticipated by the driver (e.g., thumb drive is already enabled and ready to run as a drive, but driver queries the capabilities of the thumb drive as if it were already reset), insufficient delay after a reboot before identifying the device, or a software bug in the driver code. Since the problem seems generally to flip once per reboot, I tend to think it is either a hardware state problem or a driver software bug rather than a hardware defect.
This means the problem is actually two-fold: your partition is mounted at the wrong location AND your USB 3.0 drive is running at USB 2.1 speeds.
The fix is fairly simple: if the device was incorrectly detected, reboot the router.
Add this /system/scheduler script as "Reboot_if_USB3_detected_as_USB2" and schedule it to run when the router boots. It simply detects if the drive has been incorrectly identified as a USB 2.1 device and, if so, logs an errors, waits 60 seconds, and then reboots the router. It attempts to do this no more than 5 times and then gives up. Remember, you can't stop a running script once it starts, so don't remove the delay: if a change to this script or to the router firmware causes this script to reboot every time and there is no delay, you will have effectively bricked your machine and will need to do a NetInstall! Be VERY careful modifying this script...
Also, check the code for yourself, as I am NEW to Mikrotik Scripting. This is literally my second script!
#log as an error because auto rebooting after we just booted can be pretty confusing and a pretty big deal.
:log error "Waiting 20 seconds before testing for USB3 recognized as USB2 and possibly rebooting... (not an error)"
:delay 20s
:log error "Testing for USB3 recognized as USB2 (not an error)"
:local attempts 0
# Check if the file exists and read the attempts
:if ([/file find name="USB_Fix_Attempts"] != "") do={
:set attempts [/file get [find name="USB_Fix_Attempts"] contents]
} else {
# Create the file if it doesn't exist and set initial value to 0
/file add name="USB_Fix_Attempts" contents="0"
}
:if ($attempts < 5) do={
:foreach disk in=[/disk find] do={
:if (([:pick [/disk get $disk interface] 0 5] = "USB 2") && [:len [/disk get $disk model]] > 0 && [:len [/disk get $disk serial]] > 0) do={
:log error ("USB3 Drive incorrectly recognized as USB2, have attempted " . $attempts)
:log error ("times to reboot so far; rebooting in 60 seconds!")
:log error ("Disable the /system/scheduler entry Reboot_if_USB3_detected_as_USB2 to prevent more reboots!")
:set attempts ($attempts + 1)
# Update the file with the new attempts count
/file set USB_Fix_Attempts contents=$attempts
:delay 60s
:log error ("Rebooting")
/system reboot
:error "USB3 device incorrectly recognized as USB2, rebooting now."
}
}
# Success! It might be messed up again next time, so reset counter to repeat the process.
:log error "Everything looks good, no reboot required."
} else {
:log error "Ran out of attempts (5) trying to fix USB 3 seen as USB 2... maybe it really is USB 2? Booting anyway...."
}
# We're keeping this boot. No matter what, test again next time.
:set attempts 0
/file set USB_Fix_Attempts contents=$attempts