Can't boot the router with a usb disk attach

I try to add a usb disk (SSD/USB3.1) to my turris Omnia.
I set all the mount option, every seems to be ok, i can walk to all the directories.
But if i try to reboot the router, it can reboot, I can’t have any access so I have no idea of what going on, I need to remove the disk en reset the router to gain access to it.

config global
option anon_swap ‘0’
option anon_mount ‘0’
option auto_swap ‘1’
option auto_mount ‘1’
option delay_root ‘5’
option check_fs ‘0’

config mount
option uuid ‘3520e929-d6ef-4829-9c20-d46916b80004’
option target ‘/mnt/part1’
option enabled ‘1’
option fstype ‘ext4’

config mount
option enabled ‘1’
option uuid ‘9ec1daad-9cb0-4c8e-853d-b94a15c3f59b’
option target ‘/mnt/part2’
option fstype ‘ext4’

config mount
option uuid ‘0b4cfe0e-40f3-4ea4-9fcc-c1103e1437ec’
option target ‘/mnt/nas’
option enabled ‘1’
option fstype ‘ext4’

Other information before rebooting

root@turris:~# blkid
/dev/mmcblk0p1: UUID=“ccb8999a-96d3-4da7-b1c0-5293f7e453e6” UUID_SUB=“9f0a7b5a-e a7c-43a2-afc3-ac167950c9f4” TYPE=“btrfs” PARTUUID=“e47fb470-01”
/dev/sda1: LABEL=“part1” UUID=“3520e929-d6ef-4829-9c20-d46916b80004” TYPE=“ext4” PARTLABEL=“part1” PARTUUID=“b48d7594-439f-4171-ad91-9fed2e46e2c6”
/dev/sda2: LABEL=“part2” UUID=“9ec1daad-9cb0-4c8e-853d-b94a15c3f59b” TYPE=“ext4” PARTLABEL=“part2” PARTUUID=“035d90e3-de30-41db-8bbb-698912c28370”
/dev/sda3: LABEL=“part3” UUID=“75a810a0-a984-4805-8514-4e5ce4a93201” TYPE=“ext4” PARTLABEL=“part3” PARTUUID=“b7434707-28ad-453a-92da-8e7d2b67412b”

root@turris:~# lsusb -tv
/: Bus 05.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 5000M
|__ Port 1: Dev 2, If 0, Class=Mass Storage, Driver=usb-storage, 5000M
/: Bus 04.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 480M
/: Bus 03.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 5000M
/: Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 480M
/: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=orion-ehci/1p, 480M

root@turris:~# df -h
Filesystem Size Used Available Use% Mounted on
/dev/mmcblk0p1 7.3G 663.1M 6.6G 9% /
devtmpfs 512.0K 0 512.0K 0% /dev
tmpfs 512.0K 0 512.0K 0% /sys/fs/cgroup
tmpfs 502.3M 45.5M 456.8M 9% /tmp
tmpfs 512.0K 0 512.0K 0% /dev
/dev/sda1 59.8G 52.0M 56.7G 0% /mnt/part1
/dev/sda2 59.8G 52.0M 56.7G 0% /mnt/part2
/dev/sda3 612.4G 72.0M 581.1G 0% /mnt/nas

I don’t have a terminal cable so I can’t monitor what’s going on during the boot process.

If i understand well, you can boot router without the usb drive plugged and you can mount it later on as used to. But while plugged usd drive, router does not boot (at all ? or it freeze at some point — what color and what leds were on/off/blinking, you can guess at least the phase from some colors or how they flashes). Strange … not sure how to help without additional info … but maybe my notes and questions will push you further. …

notes & questions

Are you using “hot-plug-mounting” feature (luci>mounts) , do you have entry for that drive(partition) in “/etc/config/fstab” and are you having that “hot-plug” feature on or off ; or are you having “filesystem check before mount” set on or off ; or are you using pre-generated fstab?
Are you using “Foris>Storage” feature “/etc/config/storage”? That storage uci config is responsible for extra mounting step before the regular one is called to use fstab uci config to produce “mtab”…
So just thinking, maybe there is collision between those two configs during bootup, but later manual mount works as new “dev” is detected…
Also if you are using backport, try to use the front one. Several users (including me) were having issues with speed of the port , interference with antenaes/multiplexer(as it is really almost touching the usb port --> better to isolate them).
Aside i do not know why, but for me, using (trying to use) “ext4” was not an option (i changed all my ext2, ext4 to ext3 and some to btrfs).
If you are interested in boot log, you can use “/etc/rc.local” to run “dmesg” and dump the actuall buffer to some file on permament filesystem, before syslog-ng hits in and you loose it. (you can see it shortly after boot, but later it became flooded with stuff from firewall, pcap, ucollect and suricata processes very quickly). I am even keeping like history of last 7 boot.log files, for any later analysis. In most cases not much use, but for stuff/cards plugged (radio chips, msata, lte …) it has sometimes some info.

Thanks for answering, yes your explanations are better than mine. Right now I can’t reboot i need my internet connection. A strange think that I notice is that the drive is recognized as a UAS on my desktop and a USB-Storage in the turris. I have the following in dmesg

[ 5.051317] usb 5-1: new SuperSpeed USB device number 2 using xhci-hcd
[ 5.082088] usb 5-1: USB controller f10f8000.usb3 does not support streams, which are required by the UAS driver.
[ 5.092385] usb 5-1: Please try an other USB controller if you wish to use UAS.
[ 5.099712] usb-storage 5-1:1.0: USB Mass Storage device detected

Partitioning with fdisk works but when I try to format the partition that’s take a long time and i have some I/O errors with the Turris but never on my desktop.

Rozbitý USB3 UAS po update (restartu) na 3.11.3 - SW chyby-diskuze [CZ] - Turris forum (in czech , but seems there were some bugs regarding UAS …in 3.11.x branche…, hope that linked sources will help, if you are struggling with czech , feel free to ask for quick-amaterish translate via pm ) … and openwrt ( kmod-usb-storage-uas: UASP is not working · Issue #12890 · openwrt/packages · GitHub )
… and there is also oldish thread about sata/drives issues (maybe not much helpfull in your situation)
SATA HDD issues - #66 by N0mi5 - SW bugs discussion - Turris forum

i suggest you to re-partition that drive using some live linux distro on different machine where you have full support for GPT. Somehow Turris is fine with gpt partitioning (to use them), but creating/removing gpt and partitions on larger disks can cause sometimes I/O error (using : cfdisk, fdisk, gdisk …hdparam).

...some more notes :)

… some vendors are using that UAS to provide also virtual cd-rom drive (where you have that bundled software and manual and drivers …usually very outdated anyway). Not mentioning that some vendors can have “extra” partition(s), hidden or shown as unsuported in some tools. Personally i use WD/Seagate “fancy” external drives only on Win clients.
RPI2/3 is also having similar issue like you on Turris, i am now using generic AXAGON and AKASA boxes with regular hdd inside (it costs more, but no surprises from vendor :slight_smile: .
That’s another issue with those fancy boxes, inside they use (sometimes) hdd with kind of strange connectors or/and pinouts → preventing users to use those drive elsewhere.

I found the problem by testing my drive on a desktop box, and the problem comes from the drive. So it’s solve sorry for that.

Was it faulty/damaged or a different kind of error?

I am also wondering what was the error/problem and of course solution. Just in case i face similar issue.

Hi folks and happy new year,

The problem comes from the drive itself, it’s a hardware problem. It also lock the boot process of a laptop. So in case of a similar problem, the good way is to make some test on other device (desktop or laptop). I think I’m face to this problem :

The issue affects SSDs with an HPE firmware version prior to HPD8 that results in SSD failure at 32,768 hours of operation (i.e., 3 years, 270 days 8 hours). After the SSD failure occurs, neither the SSD nor the data can be recovered. In addition, SSDs which were put into service at the same time will likely fail nearly simultaneously’

1 Like

Outch :smiley: We have a nice Czech word for that :slight_smile: