Re: udev causing data loss?
On Sat, Nov 15, 2008 at 01:13:15PM -0600, Boyd Stephen Smith Jr. wrote:
> >Are you saying that there is no way to
> >tell which disk is which one from the device names?
> Depends. Stuff in /dev/disk/by-uuid has never lead me astray.
> However /dev/sd* nodes are named in the order the device is detected by
> the kernel. It's not like that label is written to the disk.
Well, that means there is no way of telling which disk is which other
than uuid maybe. But who says which uuid is to be which partition?
> I believe that disks on a single SCSI bus are always detected in order by
> increasing SCSI id.
It depends. I've seen it the other way round, depending on controller
settings: Priority is usually low to high, but when you switch it to
high to low (in the controller BIOS), the disks are the other way
round (very confusing). Since it depends on the controller, there is
no way to tell: Every controller can do its own thing (and have a
priority like "middle to low, then middle to high", or whatever).
> so the USB disk that you left in the system might be assigned a name
> before your SCSI bus. Any of your two SCSI buses and one SATA bus
> could be assigned name(s) first and this could vary from boot to
Hm. What's the priority of detecting USB devices? You could have
several disks on USB ...
> >If that is true, how does the user, how does the system know which
> >disk is which one?
> Well, the system assigns those names as it detects devices. It gets some
> input from the user via their udev configuration.
But I don't have an udev configuration, not one I made myself. I was
thinking udev is to make things working right automatically ...
> The system has no notion of "should be". The system uses the device name
> you list in /etc/fstab. It's the administrator's responsibility to make
> sure that's what should be referred to.
How can he do that without a way of telling which device is which,
under whatever circumstances? And if that is so, why does the
installer write an /etc/fstab with device names in it? That would
appear as a sure way to eventually brake things if someone plugs in an
USB drive or unplugs it after installing. It might work on the first
and second and fifth reboot and suddenly stop working, leaving him
with an unbootable system and no clue what might have gone wrong.