Hello, Kay. On Wed, 12 Nov 2008 21:31:54 +0100 "Kay Sievers" <kay.sievers@xxxxxxxx> wrote: > These rules seem to work fine here. I just replaced the serial number: > ls -l /dev/usbflash* > lrwxrwxrwx 1 root root 3 Nov 12 21:21 /dev/usbflash -> sdb > lrwxrwxrwx 1 root root 4 Nov 12 21:21 /dev/usbflash1 -> sdb1 > > What does (replace sdb with the correct name): > udevadm test /class/block/sdb > udevadm test /class/block/sdb1 > print? I get "unable to open device '/class/block/sd*'" for any '/class/block/sd*' name. The same for "/block/sd*[0-9]": # udevadm test /block/sdc1 run_command: calling: test udevadm_test: version 130 [...] parse_file: reading '/lib/udev/rules.d/50-udev-default.rules' as rules file [...] parse_file: reading '/etc/udev/rules.d/99-local.rules' as rules file unable to open device '/block/sdc1' udev_unref: context 0x8064008 released Only names like '/block/sdX' seems to go beyond the parse_file part: with udev 130: # udevadm test /block/sdc run_command: calling: test udevadm_test: version 130 parse_file: reading '/lib/udev/rules.d/50-udev-default.rules' as rules file parse_file: reading '/lib/udev/rules.d/55-lfs.rules' as rules file parse_file: reading '/lib/udev/rules.d/60-cdrom_id.rules' as rules file parse_file: reading '/lib/udev/rules.d/60-persistent-input.rules' as rules file parse_file: reading '/lib/udev/rules.d/60-persistent-storage-tape.rules' as rules file parse_file: reading '/lib/udev/rules.d/60-persistent-storage.rules' as rules file parse_file: reading '/lib/udev/rules.d/60-persistent-v4l.rules' as rules file parse_file: reading '/etc/udev/rules.d/60-vboxdrv.rules' as rules file parse_file: reading '/lib/udev/rules.d/61-cdrom.rules' as rules file parse_file: reading '/lib/udev/rules.d/61-persistent-storage-edd.rules' as rules file parse_file: reading '/etc/udev/rules.d/65-pcmcia.rules' as rules file parse_file: reading '/etc/udev/rules.d/70-persistent-cd.rules' as rules file parse_file: reading '/etc/udev/rules.d/70-persistent-net.rules' as rules file parse_file: reading '/lib/udev/rules.d/75-cd-aliases-generator.rules' as rules file parse_file: reading '/lib/udev/rules.d/75-persistent-net-generator.rules' as rules file parse_file: reading '/lib/udev/rules.d/79-fstab_import.rules' as rules file parse_file: reading '/lib/udev/rules.d/80-drivers.rules' as rules file parse_file: reading '/lib/udev/rules.d/81-firmware.rules' as rules file parse_file: reading '/etc/udev/rules.d/90-hal.rules' as rules file parse_file: reading '/lib/udev/rules.d/95-udev-late.rules' as rules file parse_file: reading '/etc/udev/rules.d/99-fuse.rules' as rules file parse_file: reading '/etc/udev/rules.d/99-local.rules' as rules file import_uevent_var: import into environment: 'MAJOR=8' import_uevent_var: import into environment: 'MINOR=32' import_uevent_var: import into environment: 'DEVTYPE=disk' import_uevent_var: import into environment: 'PHYSDEVPATH=/devices/pci0000:00/0000:00:1d.7/usb1/1-4/1-4:1.0/host12/target12:0:0/12:0:0:0' import_uevent_var: import into environment: 'PHYSDEVBUS=scsi' import_uevent_var: import into environment: 'PHYSDEVDRIVER=sd' udevadm_test: looking at device '/block/sdc' from subsystem 'block' udev_rules_get_name: add symlink 'block/8:32' match_rule: '/sys/block/sdc/whole_disk' does not exist run_program: 'usb_id --export /block/sdc' run_program: '/lib/udev/usb_id' (stdout) 'ID_VENDOR=Corsair' run_program: '/lib/udev/usb_id' (stdout) 'ID_MODEL=Flash_Voyager' run_program: '/lib/udev/usb_id' (stdout) 'ID_REVISION=1100' run_program: '/lib/udev/usb_id' (stdout) 'ID_SERIAL=Corsair_Flash_Voyager_A500000000025423-0:0' run_program: '/lib/udev/usb_id' (stdout) 'ID_SERIAL_SHORT=A500000000025423' run_program: '/lib/udev/usb_id' (stdout) 'ID_TYPE=disk' run_program: '/lib/udev/usb_id' (stdout) 'ID_INSTANCE=0:0' run_program: '/lib/udev/usb_id' (stdout) 'ID_BUS=usb' run_program: '/lib/udev/usb_id' (stderr) 'libudev: udev_new: context 0x8050008 created' run_program: '/lib/udev/usb_id' (stderr) 'libudev: udev_new: log_priority=6' run_program: '/lib/udev/usb_id' (stderr) 'libudev: udev_new: config_file='/etc/udev/udev.conf'' run_program: '/lib/udev/usb_id' (stderr) 'libudev: udev_new: dev_path='/dev'' run_program: '/lib/udev/usb_id' (stderr) 'libudev: udev_new: sys_path='/sys'' run_program: '/lib/udev/usb_id' returned with status 0 udev_rules_get_name: add symlink 'disk/by-id/usb-Corsair_Flash_Voyager_A500000000025423-0:0' run_program: 'path_id /block/sdc' run_program: '/lib/udev/path_id' (stdout) 'ID_PATH=pci-0000:00:1d.7-usb-0:4:1.0-scsi-0:0:0:0' run_program: '/lib/udev/path_id' returned with status 0 udev_rules_get_name: add symlink 'disk/by-path/pci-0000:00:1d.7-usb-0:4:1.0-scsi-0:0:0:0' udev_node_mknod: mknod(/dev/.tmp-8-32, 060600, (8,32)) udev_node_mknod: chmod(/dev/.tmp-8-32, 060600) udev_node_mknod: chown(/dev/.tmp-8-32, 0, 0) run_program: 'vol_id --export /dev/.tmp-8-32' run_program: '/lib/udev/vol_id' (stderr) 'libudev: udev_new: context 0x804d008 created' run_program: '/lib/udev/vol_id' (stderr) 'libudev: udev_new: log_priority=6' run_program: '/lib/udev/vol_id' (stderr) 'libudev: udev_new: config_file='/etc/udev/udev.conf'' run_program: '/lib/udev/vol_id' (stderr) 'libudev: udev_new: dev_path='/dev'' run_program: '/lib/udev/vol_id' (stderr) 'libudev: udev_new: sys_path='/sys'' run_program: '/lib/udev/vol_id' (stderr) '/dev/.tmp-8-32: unknown volume type' run_program: '/lib/udev/vol_id' returned with status 4 run_program: 'edd_id --export /dev/.tmp-8-32' run_program: '/lib/udev/edd_id' (stderr) 'libudev: udev_new: context 0x804c008 created' run_program: '/lib/udev/edd_id' (stderr) 'libudev: udev_new: log_priority=6' run_program: '/lib/udev/edd_id' (stderr) 'libudev: udev_new: config_file='/etc/udev/udev.conf'' run_program: '/lib/udev/edd_id' (stderr) 'libudev: udev_new: dev_path='/dev'' run_program: '/lib/udev/edd_id' (stderr) 'libudev: udev_new: sys_path='/sys'' run_program: '/lib/udev/edd_id' (stderr) 'no kernel EDD support' run_program: '/lib/udev/edd_id' returned with status 2 udev_rules_get_name: add symlink 'usbflash' udev_rules_get_name: rule applied, 'sdc' becomes 'sdc' udev_device_event: device '/block/sdc' already in database, cleanup udev_node_add: creating device node '/dev/sdc', major=8, minor=32, mode=0660, uid=0, gid=104 udev_node_update_symlinks: update symlink 'block/8:32' of '/block/sdc' udev_db_get_devices_by_name: found index directory '/dev/.udev/names/block\x2f8:32' update_link: found 1 devices with name 'block/8:32' update_link: found '/block/sdc' for 'block/8:32' update_link: compare (our own) priority of '/block/sdc' 0 >= 0 update_link: 'block/8:32' with target 'sdc' has the highest priority 0, create it udev_node_update_symlinks: update symlink 'disk/by-id/usb-Corsair_Flash_Voyager_A500000000025423-0:0' of '/block/sdc' udev_db_get_devices_by_name: found index directory '/dev/.udev/names/disk\x2fby-id\x2fusb-Corsair_Flash_Voyager_A500000000025423-0:0' update_link: found 1 devices with name 'disk/by-id/usb-Corsair_Flash_Voyager_A500000000025423-0:0' update_link: found '/block/sdc' for 'disk/by-id/usb-Corsair_Flash_Voyager_A500000000025423-0:0' update_link: compare (our own) priority of '/block/sdc' 0 >= 0 update_link: 'disk/by-id/usb-Corsair_Flash_Voyager_A500000000025423-0:0' with target 'sdc' has the highest priority 0, create it udev_node_update_symlinks: update symlink 'disk/by-path/pci-0000:00:1d.7-usb-0:4:1.0-scsi-0:0:0:0' of '/block/sdc' udev_db_get_devices_by_name: found index directory '/dev/.udev/names/disk\x2fby-path\x2fpci-0000:00:1d.7-usb-0:4:1.0-scsi-0:0:0:0' update_link: found 1 devices with name 'disk/by-path/pci-0000:00:1d.7-usb-0:4:1.0-scsi-0:0:0:0' update_link: found '/block/sdc' for 'disk/by-path/pci-0000:00:1d.7-usb-0:4:1.0-scsi-0:0:0:0' update_link: compare (our own) priority of '/block/sdc' 0 >= 0 update_link: 'disk/by-path/pci-0000:00:1d.7-usb-0:4:1.0-scsi-0:0:0:0' with target 'sdc' has the highest priority 0, create it udev_node_update_symlinks: update symlink 'usbflash' of '/block/sdc' udev_db_get_devices_by_name: found index directory '/dev/.udev/names/usbflash' update_link: found 1 devices with name 'usbflash' update_link: found '/block/sdc' for 'usbflash' update_link: compare (our own) priority of '/block/sdc' 0 >= 0 update_link: 'usbflash' with target 'sdc' has the highest priority 0, create it udevadm_test: run: 'socket:/org/freedesktop/hal/udev_event' udevadm_test: run: 'socket:@/org/kernel/udev/monitor' udev_unref: context 0x8064008 released with udev 131: # udevadm test /block/sdc run_command: calling: test udevadm_test: version 131 parse_file: reading '/lib/udev/rules.d/50-udev-default.rules' as rules file parse_file: reading '/lib/udev/rules.d/55-lfs.rules' as rules file parse_file: reading '/lib/udev/rules.d/60-cdrom_id.rules' as rules file parse_file: reading '/lib/udev/rules.d/60-persistent-input.rules' as rules file parse_file: reading '/lib/udev/rules.d/60-persistent-storage-tape.rules' as rules file parse_file: reading '/lib/udev/rules.d/60-persistent-storage.rules' as rules file parse_file: reading '/lib/udev/rules.d/60-persistent-v4l.rules' as rules file parse_file: reading '/etc/udev/rules.d/60-vboxdrv.rules' as rules file parse_file: reading '/lib/udev/rules.d/61-cdrom.rules' as rules file parse_file: reading '/lib/udev/rules.d/61-persistent-storage-edd.rules' as rules file parse_file: reading '/etc/udev/rules.d/65-pcmcia.rules' as rules file parse_file: reading '/etc/udev/rules.d/70-persistent-cd.rules' as rules file parse_file: reading '/etc/udev/rules.d/70-persistent-net.rules' as rules file parse_file: reading '/lib/udev/rules.d/75-cd-aliases-generator.rules' as rules file parse_file: reading '/lib/udev/rules.d/75-persistent-net-generator.rules' as rules file parse_file: reading '/lib/udev/rules.d/79-fstab_import.rules' as rules file parse_file: reading '/lib/udev/rules.d/80-drivers.rules' as rules file parse_file: reading '/lib/udev/rules.d/81-firmware.rules' as rules file parse_file: reading '/etc/udev/rules.d/90-hal.rules' as rules file parse_file: reading '/lib/udev/rules.d/95-udev-late.rules' as rules file parse_file: reading '/etc/udev/rules.d/99-fuse.rules' as rules file parse_file: reading '/etc/udev/rules.d/99-local.rules' as rules file udev_rules_new: shrunk to 12540 bytes tokens (1045 * 12 bytes), 10421 bytes buffer udev_device_new_from_syspath: device 0x806f448 has devpath '/block/sdc' udev_rules_apply_to_event: LINK 'block/8:32' /lib/udev/rules.d/50-udev-default.rules:3 udev_rules_apply_to_event: GROUP 6 /lib/udev/rules.d/50-udev-default.rules:64 udev_rules_apply_to_event: MODE 0660 /lib/udev/rules.d/55-lfs.rules:86 udev_device_new_from_syspath: device 0x806ff60 has devpath '/devices/pci0000:00/0000:00:1d.7/usb1/1-4/1-4:1.0/host12/target12:0:0/12:0:0:0' udev_device_new_from_syspath: device 0x8070100 has devpath '/devices/pci0000:00/0000:00:1d.7/usb1/1-4/1-4:1.0/host12/target12:0:0' udev_device_new_from_syspath: device 0x8064318 has devpath '/devices/pci0000:00/0000:00:1d.7/usb1/1-4/1-4:1.0/host12' udev_device_new_from_syspath: device 0x8064408 has devpath '/devices/pci0000:00/0000:00:1d.7/usb1/1-4/1-4:1.0' udev_rules_apply_to_event: IMPORT 'usb_id --export /block/sdc' /lib/udev/rules.d/60-persistent-storage.rules:34 util_run_program: 'usb_id --export /block/sdc' util_run_program: '/lib/udev/usb_id' (stdout) 'ID_VENDOR=Corsair' util_run_program: '/lib/udev/usb_id' (stdout) 'ID_MODEL=Flash_Voyager' util_run_program: '/lib/udev/usb_id' (stdout) 'ID_REVISION=1100' util_run_program: '/lib/udev/usb_id' (stdout) 'ID_SERIAL=Corsair_Flash_Voyager_A500000000025423-0:0' util_run_program: '/lib/udev/usb_id' (stdout) 'ID_SERIAL_SHORT=A500000000025423' util_run_program: '/lib/udev/usb_id' (stdout) 'ID_TYPE=disk' util_run_program: '/lib/udev/usb_id' (stdout) 'ID_INSTANCE=0:0' util_run_program: '/lib/udev/usb_id' (stdout) 'ID_BUS=usb' util_run_program: '/lib/udev/usb_id' returned with status 0 udev_rules_apply_to_event: LINK 'disk/by-id/usb-Corsair_Flash_Voyager_A500000000025423-0:0' /lib/udev/rules.d/60-persistent-storage.rules:37 udev_device_new_from_syspath: device 0x8065748 has devpath '/devices/pci0000:00/0000:00:1d.7/usb1/1-4' udev_device_new_from_syspath: device 0x80658e0 has devpath '/devices/pci0000:00/0000:00:1d.7/usb1' udev_device_new_from_syspath: device 0x8065a70 has devpath '/devices/pci0000:00/0000:00:1d.7' udev_device_new_from_syspath: device 0x8065be8 has devpath '/devices/pci0000:00' udev_rules_apply_to_event: IMPORT 'path_id /block/sdc' /lib/udev/rules.d/60-persistent-storage.rules:52 util_run_program: 'path_id /block/sdc' util_run_program: '/lib/udev/path_id' (stdout) 'ID_PATH=pci-0000:00:1d.7-usb-0:4:1.0-scsi-0:0:0:0' util_run_program: '/lib/udev/path_id' returned with status 0 udev_rules_apply_to_event: LINK 'disk/by-path/pci-0000:00:1d.7-usb-0:4:1.0-scsi-0:0:0:0' /lib/udev/rules.d/60-persistent-storage.rules:53 udev_rules_apply_to_event: IMPORT 'vol_id --export /dev/block/8:32' /lib/udev/rules.d/60-persistent-storage.rules:63 util_run_program: 'vol_id --export /dev/block/8:32' util_run_program: '/lib/udev/vol_id' (stderr) '/dev/block/8:32: unknown volume type' util_run_program: '/lib/udev/vol_id' returned with status 4 udev_rules_apply_to_event: IMPORT 'edd_id --export /dev/block/8:32' /lib/udev/rules.d/61-persistent-storage-edd.rules:8 util_run_program: 'edd_id --export /dev/block/8:32' util_run_program: '/lib/udev/edd_id' (stderr) 'no kernel EDD support' util_run_program: '/lib/udev/edd_id' returned with status 2 udev_rules_apply_to_event: RUN 'socket:/org/freedesktop/hal/udev_event' /etc/udev/rules.d/90-hal.rules:2 udev_rules_apply_to_event: RUN 'socket:@/org/kernel/udev/monitor' /lib/udev/rules.d/95-udev-late.rules:7 udev_rules_apply_to_event: GROUP 104 /etc/udev/rules.d/99-local.rules:8 udev_rules_apply_to_event: NAME 'sdc' /etc/udev/rules.d/99-local.rules:8 udev_rules_apply_to_event: LINK 'usbflash' /etc/udev/rules.d/99-local.rules:8 udev_device_new_from_syspath: device 0x8066220 has devpath '/block/sdc' udev_device_read_db: device 0x8066220 filled with db file data udev_device_update_db: created db file for '/block/sdc' in '/dev/.udev/db/\x2fblock\x2fsdc' udev_node_add: creating device node '/dev/sdc', devnum=8:32, mode=0660, uid=0, gid=104 update_link: '/dev/block/8:32' with target '/dev/sdc' has the highest priority 0, create it update_link: '/dev/disk/by-id/usb-Corsair_Flash_Voyager_A500000000025423-0:0' with target '/dev/sdc' has the highest priority 0, create it update_link: '/dev/disk/by-path/pci-0000:00:1d.7-usb-0:4:1.0-scsi-0:0:0:0' with target '/dev/sdc' has the highest priority 0, create it update_link: '/dev/usbflash' with target '/dev/sdc' has the highest priority 0, create it udevadm_test: run: 'socket:/org/freedesktop/hal/udev_event' udevadm_test: run: 'socket:@/org/kernel/udev/monitor' -- To unsubscribe from this list: send the line "unsubscribe linux-hotplug" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html