[lug] Kernel reorders SCSI drives.

Collins Richey crichey at gmail.com
Mon Oct 30 20:21:04 MST 2006


On 10/30/06, David L. Anselmi <anselmi at anselmi.us> wrote:
> Zan Lynx wrote:
> [...]
> > My udev (udev-103 but it has done this for a while) automatically
> > creates some entries like this:
> > /dev/disk/by-id
> > /dev/disk/by-label
> > /dev/disk/by-path
> > /dev/disk/by-uuid
> [...]
> > Out of all that I am sure there's something useful.
>
> Sadly, no.  Everything under there is a link to what the kernel
> originally named the device.  So if the renaming loses (the original
> sdc) and renames sda to sdc, links to sda* dangle and the ones to sdc
> are misleading.
>

I don't have the environment to prove the situation, but the Ubuntu
developers maintain that their solution fixes the problem. The udev
rules look similar to Zan's solution minus the uuid's, and then they
put the uuid's in the fstab, example:

...

 # <file system> <mount point>   <type>  <options>       <dump>  <pass>
proc            /proc           proc    defaults        0       0
# /dev/hda6
UUID=6effdcab-146c-495b-ac42-89dca10211c3 /               ext3
noatime,errors=remount-ro 0       1
# /dev/hda7
UUID=f5b19b5b-fb97-4463-acc8-765b3525608b none            swap    sw
           0       0
# /dev/hda5
UUID=c75758f6-defb-4990-8e97-f72975131ea5 /home/common     ext3
defaults        0       2

...

According to the developers, the correct device will be mounted even
if the kernel reorders the /dev/[hd|sd]x names. if you link only to
the mount points, then linked devices should also be transparent.

HTH,

-- 
Collins Richey
     If you fill your heart with regrets of yesterday and the worries
     of tomorrow, you have no today to be thankful for.



More information about the LUG mailing list