* usb disk drive disconnect making readonly @ 2022-05-04 20:16 James Dutton 2022-05-05 14:16 ` Alan Stern 0 siblings, 1 reply; 5+ messages in thread From: James Dutton @ 2022-05-04 20:16 UTC (permalink / raw) To: linux-usb@vger.kernel.org Hi, Use case: Boot from a USB disk and run for a day. Sometimes the USB link disconnects and reconnects. When it reconnects, Linux cannot use it, and the Linux kernel has set the device mount to read only. Is there any way to allow a USB disk to disconnect and then reconnect it, and Linux carry on using it, and not set it to a read-only mount, provided of course, that it knows that the same disk was reconnected without being changed. For example, I have a usb disk device that goes into power save mode if not accessed for more than 15 mins. When I come back to unlock the screensaver, it does not wake up the disk, but instead places it in read-only mode. This necessitates me to reboot the PC to get it working again. Any ideas? Kind Regards James ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: usb disk drive disconnect making readonly 2022-05-04 20:16 usb disk drive disconnect making readonly James Dutton @ 2022-05-05 14:16 ` Alan Stern [not found] ` <CAAMvbhHsUL6gQ365wZW4J8RCbnhwEt0RDUc5NA4=RSS2bjnK_A@mail.gmail.com> 0 siblings, 1 reply; 5+ messages in thread From: Alan Stern @ 2022-05-05 14:16 UTC (permalink / raw) To: James Dutton; +Cc: linux-usb@vger.kernel.org On Wed, May 04, 2022 at 09:16:55PM +0100, James Dutton wrote: > Hi, > > Use case: > Boot from a USB disk and run for a day. > Sometimes the USB link disconnects and reconnects. > When it reconnects, Linux cannot use it, and the Linux kernel has set > the device mount to read only. > Is there any way to allow a USB disk to disconnect and then reconnect > it, and Linux carry on using it, and not set it to a read-only mount, > provided of course, that it knows that the same disk was reconnected > without being changed. > For example, I have a usb disk device that goes into power save mode > if not accessed for more than 15 mins. When I come back to unlock the > screensaver, it does not wake up the disk, but instead places it in > read-only mode. This necessitates me to reboot the PC to get it > working again. > > Any ideas? There is no way to know what is going on unless you provide a lot more information. The dmesg log showing what happens during one of these disconnect/reconnect events would be a good start (although it probably won't be enough). Alan Stern ^ permalink raw reply [flat|nested] 5+ messages in thread
[parent not found: <CAAMvbhHsUL6gQ365wZW4J8RCbnhwEt0RDUc5NA4=RSS2bjnK_A@mail.gmail.com>]
* Re: usb disk drive disconnect making readonly [not found] ` <CAAMvbhHsUL6gQ365wZW4J8RCbnhwEt0RDUc5NA4=RSS2bjnK_A@mail.gmail.com> @ 2022-05-06 14:35 ` Alan Stern 2022-05-06 20:48 ` James Dutton 0 siblings, 1 reply; 5+ messages in thread From: Alan Stern @ 2022-05-06 14:35 UTC (permalink / raw) To: James Dutton; +Cc: USB mailing list Please use Reply-To-All so that your messages get sent to the mailing list as well as to me. On Thu, May 05, 2022 at 11:32:14PM +0100, James Dutton wrote: > On Thu, 5 May 2022 at 15:16, Alan Stern <stern@rowland.harvard.edu> wrote: > > > > > There is no way to know what is going on unless you provide a lot more > > information. The dmesg log showing what happens during one of these > > disconnect/reconnect events would be a good start (although it probably > > won't be enough). > > > > Alan Stern > > Hi Alan, > > Here are some log messages. I suspect the storage device is going into > some sort of sleep mode, and the kernel does not seem to be able to > wake it up again. > The device is a USB to NVME adapter. Using the chip: Realtek RTL9210 > The log is perfectly normal up until the 2nd line below onwards: ... That log isn't sufficient. It would be a big help if instead of sending your kernel log file, you send the output of the "dmesg" program. And don't send just the part starting where the problem begins; we need to see what happened before that as well. In addition, it would help if you enable USB debugging before the problem occurs: echo 'module usbcore =p' >/sys/kernel/debug/dynamic_debug/control Alan Stern ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: usb disk drive disconnect making readonly 2022-05-06 14:35 ` Alan Stern @ 2022-05-06 20:48 ` James Dutton 2022-05-07 15:39 ` Alan Stern 0 siblings, 1 reply; 5+ messages in thread From: James Dutton @ 2022-05-06 20:48 UTC (permalink / raw) To: Alan Stern; +Cc: USB mailing list On Fri, 6 May 2022 at 15:35, Alan Stern <stern@rowland.harvard.edu> wrote: > > > > Hi Alan, > > > > Here are some log messages. I suspect the storage device is going into > > some sort of sleep mode, and the kernel does not seem to be able to > > wake it up again. > > The device is a USB to NVME adapter. Using the chip: Realtek RTL9210 > > The log is perfectly normal up until the 2nd line below onwards: > ... > > That log isn't sufficient. > > It would be a big help if instead of sending your kernel log file, you send > the output of the "dmesg" program. And don't send just the part > starting where the problem begins; we need to see what happened before > that as well. > > In addition, it would help if you enable USB debugging before the > problem occurs: > > echo 'module usbcore =p' >/sys/kernel/debug/dynamic_debug/control > Hi, I will try to get some more logs the next time it happens. dmesg is not available. As the disk has essentially failed at that point, nothing works (no keyboard input), so the only way I have got any useful output has been with rsyslog over the network, and then show the syslog output on that remote machine. Kind Regards James ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: usb disk drive disconnect making readonly 2022-05-06 20:48 ` James Dutton @ 2022-05-07 15:39 ` Alan Stern 0 siblings, 0 replies; 5+ messages in thread From: Alan Stern @ 2022-05-07 15:39 UTC (permalink / raw) To: James Dutton; +Cc: USB mailing list On Fri, May 06, 2022 at 09:48:58PM +0100, James Dutton wrote: > On Fri, 6 May 2022 at 15:35, Alan Stern <stern@rowland.harvard.edu> wrote: > > > > > > Hi Alan, > > > > > > Here are some log messages. I suspect the storage device is going into > > > some sort of sleep mode, and the kernel does not seem to be able to > > > wake it up again. > > > The device is a USB to NVME adapter. Using the chip: Realtek RTL9210 > > > The log is perfectly normal up until the 2nd line below onwards: > > ... > > > > That log isn't sufficient. > > > > It would be a big help if instead of sending your kernel log file, you send > > the output of the "dmesg" program. And don't send just the part > > starting where the problem begins; we need to see what happened before > > that as well. > > > > In addition, it would help if you enable USB debugging before the > > problem occurs: > > > > echo 'module usbcore =p' >/sys/kernel/debug/dynamic_debug/control > > > > Hi, > > I will try to get some more logs the next time it happens. > dmesg is not available. As the disk has essentially failed at that > point, nothing works (no keyboard input), so the only way I have got > any useful output has been with rsyslog over the network, and then > show the syslog output on that remote machine. You can try booting with a network console and increasing the log level (so that debug messages are sent to the console). Alan Stern ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2022-05-07 15:39 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-05-04 20:16 usb disk drive disconnect making readonly James Dutton
2022-05-05 14:16 ` Alan Stern
[not found] ` <CAAMvbhHsUL6gQ365wZW4J8RCbnhwEt0RDUc5NA4=RSS2bjnK_A@mail.gmail.com>
2022-05-06 14:35 ` Alan Stern
2022-05-06 20:48 ` James Dutton
2022-05-07 15:39 ` Alan Stern
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox