
Hi, Using Ubuntu 12.04: I have a strange situation where a usb drive was initially mounted as /dev/sdb1 to a directory /ut. For several days data read-write to the drive was going just fine. Then suddenly all read-write stopped, with a Input/Output error, and while mount showed that /dev/sd1 was still mounted on /ut. Investigating further I found using blkid that the usb drive was now showing as /dev/sdc1. How can this happen? I first thought, may be the pc rebooted itself after a power failure and the drive got reassigned, but uptime showed it has been on for 49 days since last reboot. The problem only appeared today or yesterday. I can mount /dev/sdc1 elsewhere and everything seem to be still there. So somehow the usb drive got reassigned by itself. Any ideas how/why this happened? Daniel. -- dan062 <dan062@yahoo.com.au>

On 12.03.16 16:26, Dan062 via luv-main wrote:
Hi,
Using Ubuntu 12.04:
I have a strange situation where a usb drive was initially mounted as /dev/sdb1 to a directory /ut. For several days data read-write to the drive was going just fine. Then suddenly all read-write stopped, with a Input/Output error, and while mount showed that /dev/sd1 was still mounted on /ut.
Investigating further I found using blkid that the usb drive was now showing as /dev/sdc1. How can this happen?
Isn't that why those crazy long UIDs were invented? Dunno how it happens, but it does - certainly on ubuntu, and probably on my current debian box, IIRC. Possibly more directly useful than speculating on why it faffs around unreliably, is how to avoid any negative effect. For plug-in usb drives, I label the stick with e2label (16 characters max.), e.g. ext3_backup_1 The auto-mounting facility then always mounts that on /media/ext3_backup_1 and Murphy doesn't get a look in. The device, just now, is /dev/sdb, without any digit, but I'm able to ignore that. Incidentally, has anyone else found that usb sticks from the supermarket are unreliable? I have a new one which has begun showing up to 6% byte corruption in maybe 0.1% of files. (That failure is obviously not detected by rsync's default "quick check" algorithm which only looks for files that have changed in size or in last-modified time.) It's intended replacement, formatted to ext3, won't take files at all. Much older drives from Harvey Norman are doing fine, after a pile of writes. Erik

On 12/03/16 16:26, Dan062 via luv-main wrote:
Then suddenly all read-write stopped, with a Input/Output error, and while mount showed that /dev/sd1 was still mounted on /ut. Investigating further I found using blkid that the usb drive was now showing as /dev/sdc1.
If a file/directory on the USB drive is open and the drive temporarily loses power, then it will get assigned a new dev name when it is detected again. Glenn -- sks-keyservers.net 0x6d656d65

On Sat, 12 Mar 2016 06:49:25 PM Glenn McIntosh via luv-main wrote:
If a file/directory on the USB drive is open and the drive temporarily loses power, then it will get assigned a new dev name when it is detected again.
Yes, this is the expected behavior of USB. A server at one of my client sites has /dev/sdf as the first available device name for USB mass storage. In the past they have got up to about /dev/sdl in use due to this issue. Before anyone says anything about umounting and being careful about such things, I sometimes have to accept that clients won't do the things I prefer and I just have to deal with it. On Sat, 12 Mar 2016 05:20:18 PM Erik Christiansen via luv-main wrote:
Incidentally, has anyone else found that usb sticks from the supermarket are unreliable? I have a new one which has begun showing up to 6% byte corruption in maybe 0.1% of files. (That failure is obviously not detected by rsync's default "quick check" algorithm which only looks for files that have changed in size or in last-modified time.)
It's always been the case that USB flash drives are somewhat unreliable at the best of times and often very unreliable. One thing that's worth doing is asking the more alert staff at the store whether they have many returns of the device you are considering buying. If you buy the device that most customers don't return then it will probably keep your data for a while. -- My Main Blog http://etbe.coker.com.au/ My Documents Blog http://doc.coker.com.au/

Glenn McIntosh via luv-main <luv-main@luv.asn.au> writes:
If a file/directory on the USB drive is open and the drive temporarily loses power, then it will get assigned a new dev name when it is detected again.
Doesn't have to be a power failure, could just be a random failure to communicate properly, which causes Linux to mark it as offline and online again. Don't trust USB in general, e.g. have a Microsoft USB camera device that caused random boot failures (while booting Linux kernel and at BIOS screen system would hang); on my laptop computer one of my USB ports seems completely dead - no power or anything (probably should try to chase up the warranty for this...) -- Brian May <brian@linuxpenguins.xyz> https://linuxpenguins.xyz/brian/

Dan062 via luv-main wrote:
Hi,
Using Ubuntu 12.04:
I have a strange situation where a usb drive was initially mounted as /dev/sdb1 to a directory /ut. For several days data read-write to the drive was going just fine. Then suddenly all read-write stopped, with a Input/Output error, and while mount showed that /dev/sd1 was still mounted on /ut.
Investigating further I found using blkid that the usb drive was now showing as /dev/sdc1. How can this happen? I first thought, may be the pc rebooted itself after a power failure and the drive got reassigned, but uptime showed it has been on for 49 days since last reboot. The problem only appeared today or yesterday.
I can mount /dev/sdc1 elsewhere and everything seem to be still there.
So somehow the usb drive got reassigned by itself. Any ideas how/why this happened?
Daniel.
I have never been too impressed with the stability of USB networks; they seem OK providing nothing changes but plug/unplug a device, and device numbers may stay the same; but often they don't. Which can be really annoying given USB devices 'hot-swap'capability; is often why they are used ! Is it possible some change occurred in the USB network ? Did " /dev/sdb1" have the same USB device-number as" /dev/sdc1" ? Whilst trying to understand USB device number 'transitions' I came across the following; which is not quite the same problem but seems simillar; http://askubuntu.com/questions/333561/why-does-an-external-usb-hub-show-up-u... regards Rohan McLeod

On 12/03/16 16:26, Dan062 via luv-main wrote:
Hi,
Using Ubuntu 12.04:
I have a strange situation where a usb drive was initially mounted as /dev/sdb1 to a directory /ut. For several days data read-write to the drive was going just fine. Then suddenly all read-write stopped, with a Input/Output error, and while mount showed that /dev/sd1 was still mounted on /ut.
Investigating further I found using blkid that the usb drive was now showing as /dev/sdc1. How can this happen? I first thought, may be the pc rebooted itself after a power failure and the drive got reassigned, but uptime showed it has been on for 49 days since last reboot. The problem only appeared today or yesterday.
I can mount /dev/sdc1 elsewhere and everything seem to be still there.
So somehow the usb drive got reassigned by itself. Any ideas how/why this happened?
Daniel.
this is in UDEV it is doing this on my desktop Mar 14 18:34:29 keflavik kernel: r8169 0000:01:00.0 enp1s0: renamed from eth0 Mar 14 18:34:29 keflavik kernel: r8169 0000:03:01.0 enp3s1: renamed from eth1

On Mon, 14 Mar 2016 06:44:29 PM Steve Roylance via luv-main wrote:
this is in UDEV it is doing this on my desktop
Mar 14 18:34:29 keflavik kernel: r8169 0000:01:00.0 enp1s0: renamed from eth0 Mar 14 18:34:29 keflavik kernel: r8169 0000:03:01.0 enp3s1: renamed from eth1
In Debian/Unstable the systemd version of udev will take the device names from the /etc/udev/rules.d/70-persistent-net.rules files if it's available, otherwise it will rename devices to new persistent names. https://etbe.coker.com.au/2016/02/25/ethernet-naming-systemd/ The above blog post has a script to convert the 70-persistent-net.rules file to files under /etc/systemd/network/ . I wrote this when I had systemd in Unstable not use the persistent-net.rules file for some reason I never managed to discover. That's different from the policy with block devices which is to assign them as sda, sdb, etc. -- My Main Blog http://etbe.coker.com.au/ My Documents Blog http://doc.coker.com.au/
participants (7)
-
Brian May
-
Dan062
-
Erik Christiansen
-
Glenn McIntosh
-
Rohan McLeod
-
Russell Coker
-
Steve Roylance