D&C GLug - Home Page

[ Date Index ] [ Thread Index ] [ <= Previous by date / thread ] [ Next by date / thread => ]

Re: [LUG] Debian Wheezy odd behaviour with USB devices

 

On 11/01/13 15:13, Simon Waters wrote:
> USB drive is /dev/sdc, and mounted using the UUID as /Elements.
>
> Inserted USB caddy which I use to use a few months back with a new disk
> (unformatted) - the old disk took a jolt too much.
>
> At this point /Elements is unusable (IO errors).
>
> On investigation I find that the disk that was sdc is now sdd.
>
> Disconnect the new drive, wait a bit, insert again, and my /Elements
> data is now on /dev/sde. (umount /Elements ; mount /Elements and working
> again).
>
> So I assume it is inserting the new drive with the lowest free label
> (sdc?), and shifting the others up one, breaking mounted filesystems in
> the process. (I killed of GNOME and it does the same, I killed of udev
> and it does the same).
>
> Now given I just switched to mounting this drive with UUID, I don't much
> care what it is called, but I do care that it doesn't break a mounted
> file system simply because I plugged another USB drive in.
>
> Obvious unclear if this is some history of my server, as I can't believe
> it is the default behaviour. Someone have a clean install of Wheezy and
> a couple of USB drives to try it on?
>
> I see a load of questions on related topics in the forums, but nothing
> quite the same as I am seeing. I mean I know (well think I know) how to
> write a udev rule to fix them to whatever I want, but if this is the
> default behaviour after upgrading to Wheezy the nice folks at Debian
> will probably want to know. Possibly there is a package (usbmount or
> similar) to address this which isn't installed by default on upgrade.
>
> That said not had similar issues before, so it is possible there is some
> legacy reference in the system to the USB caddy - if so any idea where
> will it be, nothing in /etc/udev looked plausible?
>
>  Simon
>

I ran into a weird issue the other day involving Debian (Sid in that
case) and USB drive mounting - I was installing via a USB thumbdrive and
the installer decided that the USB device would be /dev/sda and the hard
drive target would be /dev/sdb, which was fine until the installer tried
to write out Grub to /dev/sda... which obviously did not end well. I
worked around it no problem, but it would be a game stopper for someone
less familiar with Grub and rescue booting (admittedly, such a person
probably shouldn't be using Sid in the first place).

What's your Udev version? I think there may be an outstanding bug here,
perhaps related to this:
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=687378 (plenty more
information at this link).

I must say I haven't noticed this on any of my other Debian boxes, but
then I haven't been hotplugging USB drives much, if at all recently that
I can remember. What about the rest of your /etc/fstab entries - is
everything being mounted by UUID?

Cheers

-- 
The Mailing List for the Devon & Cornwall LUG
http://mailman.dclug.org.uk/listinfo/list
FAQ: http://www.dcglug.org.uk/listfaq