-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[RFE] create a shell interface mode for wnbd-client #120
Comments
Hi, Thanks for opening this issue.
Storport already detects IO timeouts and issues lun resets. When receiving a lun reset, we're simply emptying the IO queues. In this case, I think we should actually reset the NBD connection, which would probably fix the problem. I'll prepare a PR in the upcoming weeks. By the way, can you double check what happens when connecting to the same nbd server using a linux nbd client? In the meantime, we added an adapter reset command. It's more convenient than having to reinstall the driver.
|
I'll give that a try. I might need to update my wmbd driver
The problem with this webpage Is there a sure proof way for a user to determine if an updated wnbd driver is present. ? Extracted updated wnbd-driver as of 20230414
|
btw, recently, in qemu-project, a vhdx corruption bug was resolved. On my single laptop, I don't think i have a way to do a nbd-share from qemu-storage-daemon of a windows build on a windows machine, and nbd-connect to that from a nbd-client on a Linux machine. Involving a VM is perhaps not the right way to test this. But, as they are platform builds from the same code, they should mostly have same effects but for a little uncertainty in differences due to the file-access layer in windows. |
I learnt 2 things
oops, I forgot the I will log further details pertaining to this stuck situation in #63-comment-1508390090 |
We found out that the IO deadlock was caused by having Windows caching enabled on the WNBD disk side as well as the underlying local NBD server side. Disabling caching on the In the meantime, the nbd client functionality has been moved to |
Description:
It is desirable to have a shell interface mode for wnbd-client, just as qemu, guestfish, do.
It is desirable that the no-arg invocation starts the shell. Presently the no-arg invocation just prints the help.
Example output:
The shell mode is just a simple read eval-string-array print loop that
exit
is the only one that is newly introduced, which terminates the loop, exits the wnbd-shell process and returns to outside-shell.Reason:
The advantage of a shell interface mode is the executable is already loaded in memory, running as a process, waiting for user's stdin input.
This is unlike starting the application with arguments on the command prompt, wherein the binary has to be loaded from a drive, and a new process has to be created.
When drive lockup happens, OS might not be able to load and run a new command, an it prevents doing the following save from trouble strategy, which is to have a open terminal window with the wnbd shell running.
nb: IMHO #63 still happens, presently it is closed as it is hard to identify where the fault is. qemu on windows is a bit buggy, but I argue that even if nbd-server is buggy, wnbd should detect lockup situation, perhaps eject disk and bailout.
The following is an excerpt from #63-comment-997204171. Uninstalling and reinstalling the driver is the only way to unstuck the situation. At this point, all not-responding processes/apps come back alive. Until I discovered this, I was only force shutting down laptop. the following don't work ctrl-C or taskmgr-end-task on qemu-nbd or xcopy, attempt wnd-client unmap.
I think this was possible because the windows-OS was not so stuck that wnbd-client could not run. The drive lockups can be so bad that even thats not possible. When stuck happens, its possible to switch between open windows, that take user input. But the moment an application has to access the disk (such as how a browser always does, or when pressing ctrl-S in notepad) the gui becomes becomes stuck. Windows-taskbar becomes stuck quickly for the same reason. Its possible to start taskmgr via ctrl-alt-delete but, taskmgr can't really load any information in its gui.
Its really important, that when in shell mode, wnbd-client does not access any disk file/cause disk-access, not even configuration files etc. Otherwise it will also get stuck. This is unless the command it self require a file argument like
install-driver
. For this reason I don't recommend implementing history as history would require maintaining a history log on disk. Or maybe an option to skip reading and writing disk-state.There's no guarantee that shell mode will be able save the lockup situation. But its worth a try, and even if it doesn't its a feature addition that is harmless, small, simple and low maintenance.
The text was updated successfully, but these errors were encountered: