Hi. I have come across a problem with missing symlinks when a SAS drive is removed and reinserted. I have a pair of SAS drives that run as RAID 1 pairs using MD. The drives are mounted in hot swap caddies for ease of maintenance. At boot time I get the correct by-path symlinks created as below: pci-0000:08:00.0-sas-0x500151768f91d000:1:0-0x5000c5000d776971:0 pci-0000:08:00.0-sas-0x500151768f91d000:1:0-0x5000c5000d776971:0-part1 pci-0000:08:00.0-sas-0x500151768f91d000:1:0-0x5000c5000d776971:0-part2 pci-0000:08:00.0-sas-0x500151768f91d000:1:0-0x5000c5000d776971:0-part3 pci-0000:08:00.0-sas-0x500151768f91d000:1:0-0x5000c5000d776971:0-part5 pci-0000:08:00.0-sas-0x500151768f91d000:1:0-0x5000c5000d776971:0-part6 pci-0000:08:00.0-sas-0x500151768f91d001:1:1-0x5000c5000d776972:1 pci-0000:08:00.0-sas-0x500151768f91d001:1:1-0x5000c5000d776972:1-part1 pci-0000:08:00.0-sas-0x500151768f91d001:1:1-0x5000c5000d776972:1-part2 pci-0000:08:00.0-sas-0x500151768f91d001:1:1-0x5000c5000d776972:1-part3 pci-0000:08:00.0-sas-0x500151768f91d001:1:1-0x5000c5000d776972:1-part5 pci-0000:08:00.0-sas-0x500151768f91d001:1:1-0x5000c5000d776972:1-part6 pci-0000:08:00.0-sas-0x500151768f91d002:1:2-0x5000c5000d74708d:2 pci-0000:08:00.0-sas-0x500151768f91d002:1:2-0x5000c5000d74708d:2-part1 pci-0000:08:00.0-sas-0x500151768f91d002:1:2-0x5000c5000d74708d:2-part2 pci-0000:08:00.0-sas-0x500151768f91d002:1:2-0x5000c5000d74708d:2-part3 pci-0000:08:00.0-sas-0x500151768f91d002:1:2-0x5000c5000d74708d:2-part5 pci-0000:08:00.0-sas-0x500151768f91d002:1:2-0x5000c5000d74708d:2-part6 pci-0000:08:00.0-sas-0x500151768f91d003:1:3-0x5000c5000d74708e:3 pci-0000:08:00.0-sas-0x500151768f91d003:1:3-0x5000c5000d74708e:3-part1 pci-0000:08:00.0-sas-0x500151768f91d003:1:3-0x5000c5000d74708e:3-part2 pci-0000:08:00.0-sas-0x500151768f91d003:1:3-0x5000c5000d74708e:3-part3 pci-0000:08:00.0-sas-0x500151768f91d003:1:3-0x5000c5000d74708e:3-part5 pci-0000:08:00.0-sas-0x500151768f91d003:1:3-0x5000c5000d74708e:3-part6 I remove one of the drives from the RAID and pull the drive and as expected the symlinks for the pulled drive are deleted. pci-0000:08:00.0-sas-0x500151768f91d000:1:0-0x5000c5000d776971:0 pci-0000:08:00.0-sas-0x500151768f91d000:1:0-0x5000c5000d776971:0-part1 pci-0000:08:00.0-sas-0x500151768f91d000:1:0-0x5000c5000d776971:0-part2 pci-0000:08:00.0-sas-0x500151768f91d000:1:0-0x5000c5000d776971:0-part3 pci-0000:08:00.0-sas-0x500151768f91d000:1:0-0x5000c5000d776971:0-part5 pci-0000:08:00.0-sas-0x500151768f91d000:1:0-0x5000c5000d776971:0-part6 pci-0000:08:00.0-sas-0x500151768f91d001:1:1-0x5000c5000d776972:1 pci-0000:08:00.0-sas-0x500151768f91d001:1:1-0x5000c5000d776972:1-part1 pci-0000:08:00.0-sas-0x500151768f91d001:1:1-0x5000c5000d776972:1-part2 pci-0000:08:00.0-sas-0x500151768f91d001:1:1-0x5000c5000d776972:1-part3 pci-0000:08:00.0-sas-0x500151768f91d001:1:1-0x5000c5000d776972:1-part5 pci-0000:08:00.0-sas-0x500151768f91d001:1:1-0x5000c5000d776972:1-part6 After replacing the drive the device files are recreated in /dev but not necessarily with the same name, but no by-path symlinks are created. I ran udevadm to see if I could understand why the symlink was not created and I see that /lib/udev/path_id returns with non zero status. Can anyone explain why this is happening. I have previously used SATA drives and the symlinks are always created. I use the by-path links in scripts as these always refere to a specific drive/partition. EVS00:~# udevadm test --action=add /sys/block/sdc This program is for debugging only, it does not run any program, specified by a RUN key. It may show incorrect results, because some values may be different, or not available at a simulation run. add_matching_files: unable to open '/lib/udev/rules.d': No such file or directory parse_file: reading '/etc/udev/rules.d/50-udev.rules' as rules file parse_file: reading '/etc/udev/rules.d/60-persistent-input.rules' as rules file parse_file: reading '/etc/udev/rules.d/60-persistent-storage-tape.rules' as rules file parse_file: reading '/etc/udev/rules.d/60-persistent-storage.rules' as rules file parse_file: reading '/etc/udev/rules.d/60-persistent-v4l.rules' as rules file parse_file: reading '/dev/.udev/rules.d/61-dev-root-link.rules' as rules file parse_file: reading '/etc/udev/rules.d/65_mdadm.vol_id.rules' as rules file parse_file: reading '/etc/udev/rules.d/70-persistent-net.rules' as rules file parse_file: reading '/etc/udev/rules.d/75-cd-aliases-generator.rules' as rules file parse_file: reading '/etc/udev/rules.d/75-persistent-net-generator.rules' as rules file parse_file: reading '/etc/udev/rules.d/80-drivers.rules' as rules file parse_file: reading '/etc/udev/rules.d/91-permissions.rules' as rules file parse_file: reading '/etc/udev/rules.d/95-late.rules' as rules file parse_file: reading '/etc/udev/rules.d/z60_hdparm.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:1c.0/0000:08:00.0/host0/port-0:4/end_device-0:4/target0:0:4/0:0:4:0' import_uevent_var: import into environment: 'PHYSDEVBUS=scsi' import_uevent_var: import into environment: 'PHYSDEVDRIVER=sd' udevtest: looking at device '/block/sdc' from subsystem 'block' match_rule: '/sys/block/sdc/whole_disk' does not exist 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: 'scsi_id --export --whitelisted --device=/dev/.tmp-8-32' run_program: '/lib/udev/scsi_id' (stdout) 'ID_VENDOR=SEAGATE' run_program: '/lib/udev/scsi_id' (stdout) 'ID_MODEL=ST9500430SS' run_program: '/lib/udev/scsi_id' (stdout) 'ID_REVISION=0002' run_program: '/lib/udev/scsi_id' (stdout) 'ID_SERIAL=35000c5000d74708f' run_program: '/lib/udev/scsi_id' (stdout) 'ID_SERIAL_SHORT=5000c5000d74708f' run_program: '/lib/udev/scsi_id' (stdout) 'ID_TYPE=disk' run_program: '/lib/udev/scsi_id' returned with status 0 match_rule: set ENV 'ID_BUS=scsi' run_program: 'edd_id --export /dev/.tmp-8-32' run_program: '/lib/udev/edd_id' (stderr) 'no kernel EDD support' run_program: '/lib/udev/edd_id' returned with status 2 run_program: 'path_id /block/sdc' run_program: '/lib/udev/path_id' returned with status 1 udev_rules_get_name: add symlink 'disk/by-id/scsi-35000c5000d74708f' run_program: 'vol_id --export /dev/.tmp-8-32' run_program: '/lib/udev/vol_id' (stderr) '/dev/.tmp-8-32: unknown volume type' run_program: '/lib/udev/vol_id' returned with status 4 udev_rules_get_name: no node name set, will use kernel name '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=6 udev_node_update_symlinks: update symlink 'disk/by-id/scsi-35000c5000d74708f' of '/block/sdc' udev_db_get_devices_by_name: found index directory '/dev/.udev/names/disk\x2fby-id\x2fscsi-35000c5000d74708f' update_link: found 2 devices with name 'disk/by-id/scsi-35000c5000d74708f' update_link: found '/block/sdd' for 'disk/by-id/scsi-35000c5000d74708f' update_link: compare priority of '/block/sdd' 0 > 0 update_link: found '/block/sdc' for 'disk/by-id/scsi-35000c5000d74708f' update_link: compare (our own) priority of '/block/sdc' 0 >= 0 update_link: 'disk/by-id/scsi-35000c5000d74708f' with target 'sdc' has the highest priority 0, create it Thanks simon. -- 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