On Tue, Apr 21, 2009 at 8:13 PM, Gus Wirth <gwirt...@gmail.com> wrote: > Carl Lowenstein wrote: >> On Tue, Apr 21, 2009 at 5:23 PM, Gus Wirth <gwirt...@gmail.com> wrote: >>> Carl Lowenstein wrote: >>>> I have two SATA hard drives, they are assigned names /dev/sda and /dev/sdb. >>>> When USB removable devices are mounted, the system assigns them a >>>> name, such as /dev/sdc, /dev/sdd, and so on. These names seem not to >>>> be recycled, even after a system reboot. So my system is currently up >>>> to /dev/sdg and /dev/sdh. >>>> >>>> Is there an easy way to reset this name assignment? Some Google >>>> browsing suggests unload and reload the usb-storage module. This >>>> seems rather violent. >>> You didn't say what distribution you are using. I don't have this >>> problem with Fedora 8 or Ubuntu 8.04. >>> >>> Since the behavior is exhibited after a reboot, which I'm assuming means >>> it picks up where it left off in the naming scheme, the problem is with >>> the udev rules persistence mechanism. Check in /etc/udev/rules.d/ or >>> wherever your system keeps its udev rules. Usually there is some rule >>> with the word "persistent" in its name that will lead you to the cause. >> >> System is CentOS 5.3 > > I am unable to reproduce your problem. I have a clean install of CentOS > 5.3 upgraded to the latest packages as of 2000 04/21/2009, udev version > udev-095-14.20.el5_3 > > This is my list of udev rules: > > [...@gwgw ~]$ ls -l /etc/udev/rules.d/ > total 252 > -rw-r--r-- 1 root root 515 Apr 17 16:52 05-udev-early.rules > -rw-r--r-- 1 root root 920 Apr 17 16:50 40-multipath.rules > -rw-r--r-- 1 root root 15647 Apr 17 16:52 50-udev.rules > -rw-r--r-- 1 root root 471 Apr 17 16:52 51-hotplug.rules > -rw-r--r-- 1 root root 20771 Apr 16 12:59 60-libmtp.rules > -rw-r--r-- 1 root root 58016 Apr 3 2007 60-libsane.rules > -rw-r--r-- 1 root root 143 Nov 13 07:48 60-net.rules > -rw-r--r-- 1 root root 1088 Jan 6 2007 60-pcmcia.rules > -rw-r--r-- 1 root root 452 Jan 20 22:24 60-raw.rules > -rw-r--r-- 1 root root 8209 Jan 21 01:11 60-wacom.rules > -rw-r--r-- 1 root root 129 Feb 26 02:20 61-uinput-stddev.rules > -rw-r--r-- 1 root root 214 Feb 26 02:20 61-uinput-wacom.rules > -rw-r--r-- 1 root root 1823 Jan 21 00:01 85-pcscd_ccid.rules > -rw-r--r-- 1 root root 114 Jan 20 23:45 90-alsa.rules > -rw-r--r-- 1 root root 61 Apr 17 16:52 90-dm.rules > -rw-r--r-- 1 root root 82 Jan 20 20:37 90-hal.rules > -rw-r--r-- 1 root root 107 Apr 17 16:52 95-pam-console.rules > -rw-r--r-- 1 root root 292 Jan 21 03:13 98-kexec.rules > -rw-r--r-- 1 root root 2319 Jul 14 2008 bluetooth.rules > [...@gwgw ~]$ > > You might try changing the /etc/udev/udev.conf file to have udev logging > go from "err" to "debug". You can change it at runtime with udevcontrol. > Hints are in the file.
I think this has drifted out of newbie context. But here is some more information. I have looked at "How can static names be assigned for SCSI devices using udev in Red Hat Enterprise Linux 5?" <http://kbase.redhat.com/faq/docs/DOC-7319> It suggests creating a new set of rules "/etc/udev/rules.d/20-names.rules". Somewhere along this path I got the clue to look in /dev/disk, where I find 4 directories: by-id by-label by-path by-uuid $ ls -l -g -G by-id total 0 lrwxrwxrwx 1 9 Apr 21 12:25 ata-HP_DVD_Writer_640_CNLJ05708C -> ../../hdc lrwxrwxrwx 1 9 Apr 21 12:25 scsi-SATA_ST3300631AS_5NF1BVLA -> ../../sda lrwxrwxrwx 1 10 Apr 21 12:25 scsi-SATA_ST3300631AS_5NF1BVLA-part1 -> ../../sda1 lrwxrwxrwx 1 10 Apr 21 12:25 scsi-SATA_ST3300631AS_5NF1BVLA-part2 -> ../../sda2 lrwxrwxrwx 1 9 Apr 21 14:32 usb-Maxtor_7_H500F0_Maxtor_7H5H81CMMLH -> ../../sdh lrwxrwxrwx 1 10 Apr 21 14:32 usb-Maxtor_7_H500F0_Maxtor_7H5H81CMMLH-part1 -> ../../sdh1 lrwxrwxrwx 1 10 Apr 21 14:32 usb-Maxtor_7_H500F0_Maxtor_7H5H81CMMLH-part2 -> ../../sdh2 lrwxrwxrwx 1 9 Apr 21 12:34 usb-ST375064_0AS_ST3750640A_5QD08J5K -> ../../sdg lrwxrwxrwx 1 10 Apr 21 12:34 usb-ST375064_0AS_ST3750640A_5QD08J5K-part1 -> ../../sdg1 lrwxrwxrwx 1 9 Apr 21 12:25 usb-VIA-P_VT6205-DevA_000000000001 -> ../../sdb lrwxrwxrwx 1 9 Apr 21 12:25 usb-VIA-P_VT6205-DevB_000000000001 -> ../../sdc lrwxrwxrwx 1 9 Apr 21 12:25 usb-VIA-P_VT6205-DevD_000000000001 -> ../../sdd lrwxrwxrwx 1 9 Apr 21 12:25 usb-VIA-P_VT6205-DevH_000000000001 -> ../../sde Note hard-wired disks hdc and sda, USB-connected disks sdh and sdg, and once present but now gone disks sdb, sdc, sdd, sde $ ls -l -g -G by-label total 0 lrwxrwxrwx 1 10 Apr 21 14:32 Data1 -> ../../sdh1 lrwxrwxrwx 1 10 Apr 21 12:25 boot -> ../../sda1 lrwxrwxrwx 1 10 Apr 21 12:34 sea-750 -> ../../sdg1 Note that these disks are labeled, and that's all there really is. I also get the corresponding three in "ls -l -g -G by-uuid" except that they have the extra-long UUID codes attached. So I suppose that except for esthetics I can leave things the way they are now, and fix /etc/fstab to mount by name or UUID. Still leaves the mystery about what disk name I will get the next time I connect a USB flash drive. I am reluctant to do any experimenting at this moment, because I am 407GB/488GB along in rescuing my saved ISO images from a drive that stopped going around last night. After an overnight rest and a transplant from internal SATA to an external USB box, it spun up early this afternoon, and rsync is chugging along about 1GB/minute. That's 8 hours. carl -- carl lowenstein marine physical lab u.c. san diego clowenst...@ucsd.edu -- KPLUG-Newbie@kernel-panic.org http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-newbie