esdc-ce icon indicating copy to clipboard operation
esdc-ce copied to clipboard

USB 3 issue

Open alcir opened this issue 4 years ago • 7 comments

Hello. You may already know this issue mainly related to SmartOS (or illumos). The problem is that on some servers, USB 3 sticks are unable to boot the system because of some sort of lack of support for USB 3 drivers/modules. (Sorry, I'm not so expert). However, the issue is that you are able to boot from the USB stick, but just after the initial DC menu, just after the boot_archive decompression (I think), the system enters in maintenance mode.

Loading unix...
Loading /platform/i86pc/amd64/boot_archive...
Loading /platform/i86pc/amd64/boot_archive.hash...
Booting...
illumos Version esdc_20201111T142959Z 56-bit
[...]
Running from USB...
Nov 27 [...] svc.startd[8]: svc:/system/filesystem/smartdc:default: Method "/lib/svc/method/fs-joyent" failed with exit status 95.
[...]
Requesting System Maintenence Mode
[...]
Enter user name for system maintenance (control-d to bypass):

If I log in with the password we can find here https://download.danube.cloud/esdc/usb/stable/esdc-ce-cn-4.4.notes, I can gain a shell and indeed I'm unable to see the USB stick using rmformat -l (please have a look to https://github.com/joyent/smartos-live/issues/694). If, as suggested in the smartos-live issue, I remove the xhci module and then I add it again, the rmformat command successfully list the USB stick. Finally, If I enable the failed service (svcadm disable filesystem/smartdc && svcadm enable filesystem/smartdc) the boot process continue and I'm able to install Danube Cloud. Obviously, each time the system will be rebooted, I have to perform the aforementioned steps.

The question is: there is a way to deploy a workaround? Like inserting rem_drv xhci && add_drv xhci in the /lib/svc/method/fs-joyent script or somewhere else?

alcir avatar Nov 27 '20 15:11 alcir

Hi @alcir

It is possible to add the workaround code into fs-joyent. The code can be triggered by a boot parameter (e.g. usb-xhci-workaround=true). But I think it would be better to fix it in the upstream SmartOS.

Anyway, I believe you don't need such workaround in DC because you can use disk install. That way you need to boot from USB only once and if you disable USB3, you might be able to boot fine even the first time.

Jan

YanChii avatar Nov 29 '20 10:11 YanChii

But I think it would be better to fix it in the upstream SmartOS.

Eh, yes. The point is that, as far as I can remember, SmartOS has these issues with USB3 since a long time, sadly without a solution, so far. So, a workaround could be valuable.

Anyway, I believe you don't need such workaround in DC because you can use disk install. That way you need to boot from USB only once and if you disable USB3, you might be able to boot fine even the first time.

Sure, but the point is that we have these servers where we planned the disk size and configuration just to boot from USB. We had not planned a couple of disks for the operating system.

Thanks :-)

alcir avatar Dec 01 '20 16:12 alcir

But I think it would be better to fix it in the upstream SmartOS.

Eh, yes. The point is that, as far as I can remember, SmartOS has these issues with USB3 since a long time, sadly without a solution, so far. So, a workaround could be valuable.

If we create a workaround, we can do a PR to upstream it. I believe it could be accepted. But yes, we can still maintain a downstream patch.

Anyway, I believe you don't need such workaround in DC because you can use disk install. That way you need to boot from USB only once and if you disable USB3, you might be able to boot fine even the first time.

Sure, but the point is that we have these servers where we planned the disk size and configuration just to boot from USB. We had not planned a couple of disks for the operating system.

Either I don't understand your setup or you don't understand disk install in DC. You can boot from zones pool and you don't need separate disks just for boot. However if you have a ZFS ZIL attached, you cannot boot from that pool. In that case you need either PXE boot or the workaround.

YanChii avatar Dec 01 '20 16:12 YanChii

you don't understand disk install in DC

This one :sweat: :sweat_smile:

However if you have a ZFS ZIL attached

However, we have a logs device.

alcir avatar Dec 01 '20 16:12 alcir

Hi, I tried also to post a message to https://www.illumos.org/issues/8151 related to this: https://github.com/joyent/smartos-live/issues/694 3 months ago but I did not receive any reply. I think a workaround could be a good solution for the moment. Thank you Paolo

marcheschi avatar Dec 01 '20 17:12 marcheschi

Ok. Could you pls attach cca last two screens of failed fs-joyent logs? You can use svclog filesystem/smartdc. Thanks.

YanChii avatar Dec 01 '20 17:12 YanChii

Yes. This is the log grabbed from maintenance mode.

svclog.txt

alcir avatar Dec 02 '20 07:12 alcir