Comment 3 for bug 117225

Revision history for this message
Kees Cook (kees) wrote :

Ah-ha! dmsetup's rule was ignoring the final snapshot devices (once they were set up correctly), which meant that the final device state lacked a symlink, and udev prompted deleted it. On initial creation, it has a DM_TARGET_TYPES of "linear".

udev_event_run: seq 3143 forked, pid [24597], 'change' 'block', 0 seconds old
run_program: '/sbin/dmsetup export -j254 -m26'
run_program: '/sbin/dmsetup' (stdout) 'DM_NAME=systemvg-testsnap'
run_program: '/sbin/dmsetup' (stdout) 'DM_UUID=LVM-4R9E1MV0xLpEsR74zV3oOmJorMhb2Erw3tmXSDwEMd4nl2BxRjV429fgGeCPXKOB'
run_program: '/sbin/dmsetup' (stdout) 'DM_STATE=ACTIVE'
run_program: '/sbin/dmsetup' (stdout) 'DM_TABLE_STATE=LIVE'
run_program: '/sbin/dmsetup' (stdout) 'DM_OPENCOUNT=0'
run_program: '/sbin/dmsetup' (stdout) 'DM_LAST_EVENT_NR=0'
run_program: '/sbin/dmsetup' (stdout) 'DM_MAJOR=254'
run_program: '/sbin/dmsetup' (stdout) 'DM_MINOR=26'
run_program: '/sbin/dmsetup' (stdout) 'DM_TARGET_COUNT=1'
run_program: '/sbin/dmsetup' (stdout) 'DM_TARGET_TYPES=snapshot'
run_program: '/sbin/dmsetup' returned with status 0
udev_rules_get_name: no node name set, will use kernel name 'dm-26'
udev_device_event: device '/block/dm-26' already in database, cleanup
name_index: removing index: '/dev/.udev/names/dm-26/%2fblock%2fdm-26'
name_index: removing index: '/dev/.udev/names/mapper%2fsystemvg-testsnap/%2fblock%2fdm-26'
name_index: removing index: '/dev/.udev/names/disk%2fby-id%2fdm-name-systemvg-testsnap/%2fblock%2fdm-26'
name_index: removing index: '/dev/.udev/names/disk%2fby-id%2fdm-uuid-LVM-4R9E1MV0xLpEsR74zV3oOmJorMhb2Erw3tmXSDwEMd4nl2BxRjV429fgGeCPXKOB/%2fblock%2fdm-26'
udev_node_add: creating device node '/dev/dm-26', major = '254', minor = '26', mode = '0660', uid = '0', gid = '6'
udev_node_mknod: preserve file '/dev/dm-26', because it has correct dev_t
name_index: creating index: '/dev/.udev/names/dm-26/%2fblock%2fdm-26'
udev_node_update_symlinks: update old symlink 'mapper/systemvg-testsnap' no longer belonging to '/block/dm-26'
udev_db_get_devices_by_name: no index directory '/dev/.udev/names/mapper%2fsystemvg-testsnap': No such file or directory
update_link: found -1 devices with name 'mapper/systemvg-testsnap'
update_link: no reference left, remove 'mapper/systemvg-testsnap'
udev_node_update_symlinks: update old symlink 'disk/by-id/dm-name-systemvg-testsnap' no longer belonging to '/block/dm-26'

This would need to be fixed even after "udev-lvm-mdadm-evms-gutsy" is solved, since the "final" device will have the "snapshot" type, and will need device nodes created.