For the last fourteen years I have been running Linux from USB pen drives, using an install of Debian Live running in persistent mode. I am irrationally in love with running Linux this way.
I recently purchased a 64GB HP pen drive and set it up the way I normally have been setting up such systems. Here are the details of the system and the kernel, as reported by uname -a
:
Linux debian 6.3.0-1-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.3.7-1 (2023-06-12) x86_64 GNU/Linux
The problem is that everything will be chugging along just fine - often for hours - and then suddenly my home directory and storage will change to "read only." Checking with dmesg
reveals a string of errors just before the failure, of which the most relevant seems to be repeated errors saying tag#0 device offline or changed
.
I don't understand why this is happening. Most of the similar posts on kernel mailing lists and elsewhere haven't received a reply - such as this - but the few that have, such as this indicate this may be a hardware error. It is unlikely to be an error in the laptop's USB reader, since the same system has been running with a Sandisk pen drive for over a year, and I never experienced these problems. Before I just go out and buy a new pen drive, though, I wanted to ask if this might be a kernel related error, or some other error I am not aware of?
Edit: I have added some logs of error messages in these two Pastebins: here - about twenty minutes before the file system is reset - and then here. The tag#0
messages actually seem to be about twenty minutes before the failure, apologies if they are not actually relevant.
Rebooting restores everything to normal.
Edit 2: Adding the output of lsusb -tv
, which is confusing, as my drive is a 64GB one, not a 5000 MB one...
/: Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/4p, 10000M ID 1d6b:0003 Linux Foundation 3.0 root hub |__ Port 2: Dev 2, If 0, Class=Mass Storage, Driver=usb-storage, 5000M ID 03f0:2003 HP, Inc /: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/6p, 480M ID 1d6b:0002 Linux Foundation 2.0 root hub |__ Port 5: Dev 2, If 0, Class=Video, Driver=uvcvideo, 480M ID 5986:9102 Bison Electronics Inc. |__ Port 5: Dev 2, If 1, Class=Video, Driver=uvcvideo, 480M ID 5986:9102 Bison Electronics Inc. |__ Port 6: Dev 3, If 0, Class=Wireless, Driver=btusb, 12M ID 0bda:c824 Realtek Semiconductor Corp. |__ Port 6: Dev 3, If 1, Class=Wireless, Driver=btusb, 12M ID 0bda:c824 Realtek Semiconductor Corp.
lsusb -tv
? ("1-3" corresponds to "Bus 01 Port 3", and so on.) It looks almost like the entire USB host controller is resetting and the USB pendrive is reporting its own failures, although it's not clear which one really failed first.