On Mon, Feb 22, 2021 at 09:27:58PM -0500, Ashton Fagg wrote: > >Synopsis: Mouting iSCSI disk at boot time causes machine to enter single > >user mode. > >Category: Bug. > >Environment: > System : OpenBSD 6.9 > Details : OpenBSD 6.9-beta (GENERIC.MP) #346: Fri Feb 19 23:56:21 > MST 2021 > > [email protected]:/usr/src/sys/arch/amd64/compile/GENERIC.MP > > Architecture: OpenBSD.amd64 > Machine : amd64 > >Description: > > Cross posting this from misc@, because the more I mess around with it > the more suspicious I get that a bug is present... > > I have a configured iSCSI drive that I am trying to mount at boot. If > I mount the drive manually, it works as expected. > > Trying to mount at boot, however, causes the machine to go into single > user mode. > > When the machine comes up, it does indeed pass mounting all of the > local partitions before trying to mount the iSCSI target. > > However, it still blows up and enters single user mode. Upon entering > single user mode, the additional NIC that connects to the SAN does > appear to be configured and happy (I can ping the iSCSI host). You can > see pictures of the screen before [1] and after [2] entering and > exiting single user mode. In [3], you can see the machine does > eventually hit a login prompt. > > Upon exiting single user mode, it then gives an error message that > "SIOCSIFGATTR" is an invalid argument to ifconfig, before continuing > to boot. It then says iscsid failed to start. This is visible in [2] > and [3]. > > Once actually logged in, it appears as though iscsid is dead in the > water. However, if I remove the /etc/fstab entry, it boots as normal > and then I can mount manually as expected. Very strange. > > Checking /var/log/daemon, this is what I see: > > Feb 20 18:59:28 elara iscsid[52173]: startup > Feb 20 18:59:28 elara iscsid[52173]: fatal in iscsid: vscsi_open: Device busy > > iscsid won't reload, restart etc without removing the /etc/fstab entry and > rebooting. > > [1] https://thalassa.fagg.id.au/IMG_6318.jpg > [2] https://thalassa.fagg.id.au/IMG_6321.jpg > [3] https://thalassa.fagg.id.au/IMG_6322.jpg >
Looking at the screenshot it seems there is a timing issue. The fsck -N tries to run before the disk was actually attached. I guess the iscsid startup script should wait to ensure the disks are ready. You could probably add a 'sleep 5' to rc_start() in /etc/rc.d/iscsid and see if that helps. Ideally iscsictl should actually do the wait or fail. -- :wq Claudio
