recently I upgraded my setup to RB5009 (coming from a HAP-Device).
I noticed (Version 7.11) that every now and then, mostly with a reboot, my USB-Stick got renamed (“SLOT” got changed).
One boot it’s USB1 (and the partition accordingly: USB1-Part1), next boot it is USB2 (and USB2-part2)…
Also I noticed an empty partition showing up which occupied the other slot.
Since this is annoying in having an SMB-Share or containers hosted, and I saw this happening to other users as well in the firmware-discussion threads, I’d like to share a workaround, which is working fine for me.
In Winbox open SYSTEM → DISKS
Write down or copy the MODEL - string of the attached device which is always changing (in this example: USB SanDisk 3.2Gen1 )
Open SYSTEM → SCHEDULER
Create a new scheduled script (by pressing +)
Script:
Name: Rename USB
Start Time: startup
On event:
:delay 10
/disk set slot=data [find model=“USB SanDisk 3.2Gen1”]
What’s this doing?
Every time the Routerboard is starting up the attached USB-Stick is renamed to “data”.
This is more reliable than hoping the correct order will be preserved after reboot.
You then will be able to create Containers stored in e.g. /data/container/ or you can be sure that your SMB-Services are running correctly if you add shares like /data/share .
For containers you will want to create another script, making them run after the rename-script did the job.
Autorun containers fail if you set them to “start on boot” and the devices name is still false.
Maybe someone knows, WHY the renaming is happening in the first place? Is it a bug? Is it depending on the USB-Hardware?
Hope this helps someone, somewhere
It was kinda working for a while. Now it does not again. It sets “data” on a not-being-used slot..
[myname@mikrofw] /disk> print
Flags: E - EMPTY, B - BLOCK-DEVICE; M - MOUNTED
Columns: SLOT, MODEL, SERIAL, INTERFACE, SIZE
# SLOT MODEL SERIAL INTERFACE SIZE
0 E data USB 3.20 5000Mbps
1 BM usb2 USB SanDisk 3.2Gen1 04019daf59f1114ca69b7e9c69df61073c08f7938c8cb9cd928ae2fbdd03f1efb1430000000000000000000048ce2b1600858b18915581072aaebe50 USB 2.10 480Mbps 250 148 290 560
That it shifts down the speed from USB3 > USB2 is a different topic. My router params:
What I did find out is, that this issue comes up after a firmware upgrade or a soft reboot = all reboots initiated via software (e.g. Winbox or ssh). Whenever I unplugg power for a couple of seconds and then plug it back again - it works correctly:
[myname@mikrofw] > /disk/print
Flags: E - EMPTY, B - BLOCK-DEVICE; M - MOUNTED
Columns: SLOT, MODEL, SERIAL, INTERFACE, SIZE, FREE, FS
# SLOT MODEL SERIAL INTERFACE SIZE FREE FS
0 BM data USB SanDisk 3.2Gen1 04019daf59f1114ca69b7e9c69df61073c08f7938c8cb9cd928ae2fbdd03f1efb1430000000000000000000048ce2b1600858b18915581072aaebe50 USB 3.20 5000Mbps 250 148 290 560 238 592 811 008 ext4
1 E usb2
[myname@mikrofw] > /system/routerboard print
routerboard: yes
model: RB5009UPr+S+
serial-number: cenzored
firmware-type: 70x0
factory-firmware: 7.8
current-firmware: 7.8
upgrade-firmware: 7.14
I am not sure what does it have to do with a soft-reboot, but that are my findings Hopefully, it will help someone.