Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
need help debugging udev events
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
Rhiakath
Guru
Guru


Joined: 10 Feb 2006
Posts: 572
Location: Hell...

PostPosted: Mon Apr 19, 2010 9:32 pm    Post subject: need help debugging udev events Reply with quote

Hi there. I want to create a path on media with the label of the external disks i may plug in (i know, its a rather common thing to want).

i've been playing with udev, and so far, i only managed to change the name of the device. it does not create the folder i tell it to.

Code:

tarsonis block # udevadm test /class/block/sde1
run_command: calling: test
udevadm_test: version 149
parse_file: reading '/etc/udev/rules.d/10-myrules.rules' as rules file
parse_file: reading '/dev/.udev/rules.d/10-root-link.rules' as rules file
parse_file: reading '/etc/udev/rules.d/11-automount.rules' as rules file
parse_file: reading '/lib64/udev/rules.d/30-kernel-compat.rules' as rules file
parse_file: reading '/lib64/udev/rules.d/40-gentoo.rules' as rules file
parse_file: reading '/lib64/udev/rules.d/40-isdn.rules' as rules file
parse_file: reading '/lib64/udev/rules.d/50-firmware.rules' as rules file
parse_file: reading '/lib64/udev/rules.d/50-udev-default.rules' as rules file
parse_file: reading '/lib64/udev/rules.d/60-cdrom_id.rules' as rules file
parse_file: reading '/lib64/udev/rules.d/60-persistent-alsa.rules' as rules file
parse_file: reading '/lib64/udev/rules.d/60-persistent-input.rules' as rules file
parse_file: reading '/lib64/udev/rules.d/60-persistent-serial.rules' as rules file
parse_file: reading '/lib64/udev/rules.d/60-persistent-storage-tape.rules' as rules file
parse_file: reading '/lib64/udev/rules.d/60-persistent-storage.rules' as rules file
parse_file: reading '/lib64/udev/rules.d/60-persistent-v4l.rules' as rules file
parse_file: reading '/lib64/udev/rules.d/61-mobile-action.rules' as rules file
parse_file: reading '/lib64/udev/rules.d/61-option-modem-modeswitch.rules' as rules file
parse_file: reading '/lib64/udev/rules.d/61-persistent-storage-edd.rules' as rules file
parse_file: reading '/lib64/udev/rules.d/70-acl.rules' as rules file
parse_file: reading '/etc/udev/rules.d/70-bluetooth-pcmcia.rules' as rules file
parse_file: reading '/etc/udev/rules.d/70-bluetooth.rules' as rules file
parse_file: reading '/lib64/udev/rules.d/70-hid2hci.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 '/lib64/udev/rules.d/75-cd-aliases-generator.rules' as rules file
parse_file: reading '/lib64/udev/rules.d/75-net-description.rules' as rules file
parse_file: reading '/lib64/udev/rules.d/75-persistent-net-generator.rules' as rules file
parse_file: reading '/lib64/udev/rules.d/75-tty-description.rules' as rules file
parse_file: reading '/etc/udev/rules.d/77-nm-probe-modem-capabilities.rules' as rules file
parse_file: reading '/lib64/udev/rules.d/78-sound-card.rules' as rules file
parse_file: reading '/lib64/udev/rules.d/79-fstab_import.rules' as rules file
parse_file: reading '/lib64/udev/rules.d/80-drivers.rules' as rules file
parse_file: reading '/etc/udev/rules.d/90-hal.rules' as rules file
parse_file: reading '/lib64/udev/rules.d/90-network.rules' as rules file
parse_file: reading '/lib64/udev/rules.d/90-pulseaudio.rules' as rules file
parse_file: reading '/lib64/udev/rules.d/95-keymap.rules' as rules file
parse_file: reading '/lib64/udev/rules.d/95-udev-late.rules' as rules file
parse_file: reading '/etc/udev/rules.d/99-fuse.rules' as rules file
udev_rules_new: rules use 24204 bytes tokens (2017 * 12 bytes), 14886 bytes buffer
udev_rules_new: temporary index used 15920 bytes (796 * 20 bytes)
udev_device_new_from_syspath: device 0xaa7220 has devpath '/devices/pci0000:00/0000:00:1d.7/usb1/1-5/1-5:1.0/host12/target12:0:0/12:0:0:0/block/sde/sde1'
udev_device_new_from_syspath: device 0xab0a80 has devpath '/devices/pci0000:00/0000:00:1d.7/usb1/1-5/1-5:1.0/host12/target12:0:0/12:0:0:0/block/sde/sde1'
udev_device_read_db: device 0xab0a80 filled with db file data
udev_device_new_from_syspath: device 0xab2de0 has devpath '/devices/pci0000:00/0000:00:1d.7/usb1/1-5/1-5:1.0/host12/target12:0:0/12:0:0:0/block/sde'
udev_device_new_from_syspath: device 0xab38d0 has devpath '/devices/pci0000:00/0000:00:1d.7/usb1/1-5/1-5:1.0/host12/target12:0:0/12:0:0:0'
udev_device_new_from_syspath: device 0xab3be0 has devpath '/devices/pci0000:00/0000:00:1d.7/usb1/1-5/1-5:1.0/host12/target12:0:0'
udev_device_new_from_syspath: device 0xab3ee0 has devpath '/devices/pci0000:00/0000:00:1d.7/usb1/1-5/1-5:1.0/host12'
udev_device_new_from_syspath: device 0xab41d0 has devpath '/devices/pci0000:00/0000:00:1d.7/usb1/1-5/1-5:1.0'
udev_device_new_from_syspath: device 0xab44a0 has devpath '/devices/pci0000:00/0000:00:1d.7/usb1/1-5'
udev_rules_apply_to_event: NAME 'WD_Passport_1' /etc/udev/rules.d/10-myrules.rules:2
udev_rules_apply_to_event: RUN 'mkdir /media/wd_%n' /etc/udev/rules.d/10-myrules.rules:2
udev_device_new_from_syspath: device 0xab48f0 has devpath '/devices/pci0000:00/0000:00:1d.7/usb1'
udev_device_new_from_syspath: device 0xab4b80 has devpath '/devices/pci0000:00/0000:00:1d.7'
udev_device_new_from_syspath: device 0xab4dd0 has devpath '/devices/pci0000:00'
udev_rules_apply_to_event: LINK 'block/8:65' /lib64/udev/rules.d/50-udev-default.rules:3
udev_rules_apply_to_event: GROUP 6 /lib64/udev/rules.d/50-udev-default.rules:73
udev_device_read_db: device 0xab2de0 filled with db file data
udev_rules_apply_to_event: LINK 'disk/by-id/usb-WD_2500BEV_External_5758455A3037543130333635-0:0-part1' /lib64/udev/rules.d/60-persistent-storage.rules:40
udev_rules_apply_to_event: LINK 'disk/by-path/pci-0000:00:1d.7-usb-0:5:1.0-scsi-0:0:0:0-part1' /lib64/udev/rules.d/60-persistent-storage.rules:58
udev_rules_apply_to_event: IMPORT '/sbin/blkid -o udev -p /dev/block/8:65' /lib64/udev/rules.d/60-persistent-storage.rules:69
util_run_program: '/sbin/blkid -o udev -p /dev/block/8:65' started
util_run_program: '/sbin/blkid' (stdout) 'ID_FS_UUID=42BC0080BC007129'
util_run_program: '/sbin/blkid' (stdout) 'ID_FS_UUID_ENC=42BC0080BC007129'
util_run_program: '/sbin/blkid' (stdout) 'ID_FS_LABEL=rhiakath'
util_run_program: '/sbin/blkid' (stdout) 'ID_FS_LABEL_ENC=rhiakath'
util_run_program: '/sbin/blkid' (stdout) 'ID_FS_TYPE=ntfs'
util_run_program: '/sbin/blkid' (stdout) 'ID_FS_USAGE=filesystem'
util_run_program: '/sbin/blkid -o udev -p /dev/block/8:65' returned with exitcode 0
udev_rules_apply_to_event: LINK 'disk/by-uuid/42BC0080BC007129' /lib64/udev/rules.d/60-persistent-storage.rules:75
udev_rules_apply_to_event: LINK 'disk/by-label/rhiakath' /lib64/udev/rules.d/60-persistent-storage.rules:76
udev_rules_apply_to_event: IMPORT 'fstab_import WD_Passport_1 block/8:65 disk/by-id/usb-WD_2500BEV_External_5758455A3037543130333635-0:0-part1 disk/by-path/pci-0000:00:1d.7-usb-0:5:1.0-scsi-0:0:0:0-part1 disk/by-uuid/42BC0080BC007129 disk/by-label/rhiakath mapper/' /lib64/udev/rules.d/79-fstab_import.rules:1
util_run_program: 'fstab_import WD_Passport_1 block/8:65 disk/by-id/usb-WD_2500BEV_External_5758455A3037543130333635-0:0-part1 disk/by-path/pci-0000:00:1d.7-usb-0:5:1.0-scsi-0:0:0:0-part1 disk/by-uuid/42BC0080BC007129 disk/by-label/rhiakath mapper/' started
util_run_program: '/lib64/udev/fstab_import' (stdout) 'FSTAB_NAME=/dev/WD_Passport_1'
util_run_program: '/lib64/udev/fstab_import' (stdout) 'FSTAB_DIR=/mnt/external'
util_run_program: '/lib64/udev/fstab_import' (stdout) 'FSTAB_TYPE=ntfs-3g'
util_run_program: '/lib64/udev/fstab_import' (stdout) 'FSTAB_OPTS=noauto,noexec,users'
util_run_program: '/lib64/udev/fstab_import' (stdout) 'FSTAB_FREQ=0'
util_run_program: '/lib64/udev/fstab_import' (stdout) 'FSTAB_PASSNO=0'
util_run_program: 'fstab_import WD_Passport_1 block/8:65 disk/by-id/usb-WD_2500BEV_External_5758455A3037543130333635-0:0-part1 disk/by-path/pci-0000:00:1d.7-usb-0:5:1.0-scsi-0:0:0:0-part1 disk/by-uuid/42BC0080BC007129 disk/by-label/rhiakath mapper/' returned with exitcode 0
udev_rules_apply_to_event: RUN 'socket:@/org/freedesktop/hal/udev_event' /etc/udev/rules.d/90-hal.rules:2
udev_device_update_db: created db file for '/devices/pci0000:00/0000:00:1d.7/usb1/1-5/1-5:1.0/host12/target12:0:0/12:0:0:0/block/sde/sde1' in '/dev/.udev/db/block:sde1'
udev_node_add: creating device node '/dev/WD_Passport_1', devnum=8:65, mode=0660, uid=0, gid=6
udev_node_mknod: preserve file '/dev/WD_Passport_1', because it has correct dev_t
node_symlink: preserve already existing symlink '/dev/block/8:65' to '../WD_Passport_1'
link_find_prioritized: found '/sys/devices/pci0000:00/0000:00:1d.7/usb1/1-5/1-5:1.0/host12/target12:0:0/12:0:0:0/block/sde/sde1' claiming '/dev/.udev/links/disk\x2fby-id\x2fusb-WD_2500BEV_External_5758455A3037543130333635-0:0-part1'
link_update: creating link '/dev/disk/by-id/usb-WD_2500BEV_External_5758455A3037543130333635-0:0-part1' to '/dev/WD_Passport_1'
node_symlink: preserve already existing symlink '/dev/disk/by-id/usb-WD_2500BEV_External_5758455A3037543130333635-0:0-part1' to '../../WD_Passport_1'
link_find_prioritized: found '/sys/devices/pci0000:00/0000:00:1d.7/usb1/1-5/1-5:1.0/host12/target12:0:0/12:0:0:0/block/sde/sde1' claiming '/dev/.udev/links/disk\x2fby-path\x2fpci-0000:00:1d.7-usb-0:5:1.0-scsi-0:0:0:0-part1'
link_update: creating link '/dev/disk/by-path/pci-0000:00:1d.7-usb-0:5:1.0-scsi-0:0:0:0-part1' to '/dev/WD_Passport_1'
node_symlink: preserve already existing symlink '/dev/disk/by-path/pci-0000:00:1d.7-usb-0:5:1.0-scsi-0:0:0:0-part1' to '../../WD_Passport_1'
link_find_prioritized: found '/sys/devices/pci0000:00/0000:00:1d.7/usb1/1-5/1-5:1.0/host12/target12:0:0/12:0:0:0/block/sde/sde1' claiming '/dev/.udev/links/disk\x2fby-uuid\x2f42BC0080BC007129'
link_update: creating link '/dev/disk/by-uuid/42BC0080BC007129' to '/dev/WD_Passport_1'
node_symlink: preserve already existing symlink '/dev/disk/by-uuid/42BC0080BC007129' to '../../WD_Passport_1'
link_find_prioritized: found '/sys/devices/pci0000:00/0000:00:1d.7/usb1/1-5/1-5:1.0/host12/target12:0:0/12:0:0:0/block/sde/sde1' claiming '/dev/.udev/links/disk\x2fby-label\x2frhiakath'
link_update: creating link '/dev/disk/by-label/rhiakath' to '/dev/WD_Passport_1'
node_symlink: preserve already existing symlink '/dev/disk/by-label/rhiakath' to '../../WD_Passport_1'
udevadm_test: UDEV_LOG=6
udevadm_test: DEVPATH=/devices/pci0000:00/0000:00:1d.7/usb1/1-5/1-5:1.0/host12/target12:0:0/12:0:0:0/block/sde/sde1
udevadm_test: MAJOR=8
udevadm_test: MINOR=65
udevadm_test: DEVNAME=/dev/WD_Passport_1
udevadm_test: DEVTYPE=partition
udevadm_test: ACTION=add
udevadm_test: SUBSYSTEM=block
udevadm_test: DEVLINKS=/dev/block/8:65 /dev/disk/by-id/usb-WD_2500BEV_External_5758455A3037543130333635-0:0-part1 /dev/disk/by-path/pci-0000:00:1d.7-usb-0:5:1.0-scsi-0:0:0:0-part1 /dev/disk/by-uuid/42BC0080BC007129 /dev/disk/by-label/rhiakath
udevadm_test: ID_VENDOR=WD
udevadm_test: ID_VENDOR_ENC=WD\x20\x20\x20\x20\x20\x20
udevadm_test: ID_VENDOR_ID=1058
udevadm_test: ID_MODEL=2500BEV_External
udevadm_test: ID_MODEL_ENC=2500BEV\x20External
udevadm_test: ID_MODEL_ID=0702
udevadm_test: ID_REVISION=1.04
udevadm_test: ID_SERIAL=WD_2500BEV_External_5758455A3037543130333635-0:0
udevadm_test: ID_SERIAL_SHORT=5758455A3037543130333635
udevadm_test: ID_TYPE=disk
udevadm_test: ID_INSTANCE=0:0
udevadm_test: ID_BUS=usb
udevadm_test: ID_USB_INTERFACES=:080650:
udevadm_test: ID_USB_INTERFACE_NUM=00
udevadm_test: ID_USB_DRIVER=usb-storage
udevadm_test: ID_PATH=pci-0000:00:1d.7-usb-0:5:1.0-scsi-0:0:0:0
udevadm_test: ID_FS_UUID=42BC0080BC007129
udevadm_test: ID_FS_UUID_ENC=42BC0080BC007129
udevadm_test: ID_FS_LABEL=rhiakath
udevadm_test: ID_FS_LABEL_ENC=rhiakath
udevadm_test: ID_FS_TYPE=ntfs
udevadm_test: ID_FS_USAGE=filesystem
udevadm_test: FSTAB_NAME=/dev/WD_Passport_1
udevadm_test: FSTAB_DIR=/mnt/external
udevadm_test: FSTAB_TYPE=ntfs-3g
udevadm_test: FSTAB_OPTS=noauto,noexec,users
udevadm_test: FSTAB_FREQ=0
udevadm_test: FSTAB_PASSNO=0
udevadm_test: run: 'mkdir /media/wd_1'
udevadm_test: run: 'socket:@/org/freedesktop/hal/udev_event'


This seems fine, but when i plug in the drive, the folder does not get created.
I know it would not use the label to name the folder, but i'm taking baby steps, here.

any ideas?
_________________
pc-rhiakath ~ $ emerge -s happiness
Searching..
[ Results for search key : happiness ]
[ Applications found : 0 ]

-------------------------------------------

I see dead pixels...
Back to top
View user's profile Send private message
yzg
Guru
Guru


Joined: 18 Jun 2005
Posts: 499

PostPosted: Mon Apr 19, 2010 11:11 pm    Post subject: Reply with quote

Did you set the label of the external disk filesystem?

UDEV and KDE device notifier will mount the disk at /media/<label>.
Back to top
View user's profile Send private message
Rhiakath
Guru
Guru


Joined: 10 Feb 2006
Posts: 572
Location: Hell...

PostPosted: Mon Apr 19, 2010 11:20 pm    Post subject: Reply with quote

no kde, here. just plain fluxbox.
im still not using the label. just trying small things first. for some reason, nothing gets mounted.
now i got it to create a folder, but it never mounts...
_________________
pc-rhiakath ~ $ emerge -s happiness
Searching..
[ Results for search key : happiness ]
[ Applications found : 0 ]

-------------------------------------------

I see dead pixels...
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum