Beforeyou remove right click on device should give you options to unmount, safely remove device or fomat does it show you these options?
Sent from the Samsung Galaxy S4 smartphone of Taylor Woods
after fresh reboot :Here are the rules:SD card is been pulled out of the SD reader - no rules are been executed. SD is still been mounted.SD card is been plugged into the internal SD reader. Rules fire up, create a subdir per partition and mount the card.- Life is goodHere are the details:Hello,i'm trying to understand why i'm not getting action="remove" and how to make it work.
---start copy/paste---cat /etc/udev/rules.d/50-card.rules--- end of copy/paste----
# SD reader
KERNEL=="sd[a-z][0-9]",SUBSYSTEM=="block",BUS=="scsi",SYSFS{rev}=="1.00",SYSFS{model}=="USB SD Reader ",SYSFS{vendor}=="Generic ",NAME{all_partitions}="%k",SYMLINK+="cardreader/SD%n"
ACTION=="add",KERNEL=="sd[a-z][0-9]",SUBSYSTEM=="block",BUS=="scsi",SYSFS{rev}=="1.00",SYSFS{model}=="USB SD Reader ",SYSFS{vendor}=="Generic ",NAME{all_partitions}="%k",RUN+="/bin/mkdir /media/SD/sd%n",RUN+="/bin/mount -t auto -o users,rw /dev/cardreader/SD%n /media/SD/sd%n"
ACTION=="remove",KERNEL=="sd[a-z][0-9]",SUBSYSTEM=="block",BUS=="scsi",SYSFS{rev}=="1.00",SYSFS{model}=="USB SD Reader ",SYSFS{vendor}=="Generic ",NAME{all_partitions}="%k",RUN+="/bin/umount /dev/cardreader/SD%n",RUN+="/bin/rmdir /media/SD/sd%n"
<---start copy/paste-->udevadm monitor --udev<--- plugging the SD in --->
monitor will print the received events for:
UDEV - the event which udev sends out after rule processing
UDEV [1383321790.616432] change /devices/pci0000:00/0000:00:02.0/usb2/2-6/2-6:1.0/host6/target6:0:0/6:0:0:0/block/sdc (block)
UDEV [1383321792.625084] add /module/fat (module)
UDEV [1383321792.638649] add /module/vfat (module)
UDEV [1383321792.886526] add /devices/pci0000:00/0000:00:02.0/usb2/2-6/2-6:1.0/host6/target6:0:0/6:0:0:0/block/sdc/sdc1 (block)
UDEV [1383321792.887997] change /devices/pci0000:00/0000:00:02.0/usb2/2-6/2-6:1.0/host6/target6:0:0/6:0:0:0 (scsi)
UDEV [1383321794.141120] change /devices/pci0000:00/0000:00:02.0/usb2/2-6/2-6:1.0/host6/target6:0:0/6:0:0:0/block/sdc (block)<---pulling it out --->UDEV [1383321807.046784] change /devices/pci0000:00/0000:00:02.0/usb2/2-6/2-6:1.0/host6/target6:0:0/6:0:0:0 (scsi)
UDEV [1383321807.311459] change /devices/pci0000:00/0000:00:02.0/usb2/2-6/2-6:1.0/host6/target6:0:0/6:0:0:0/block/sdc (block)<---end copy/paste-->it is my understanding that there is no "remove" event occurs? But that' doesn't sound right.
Please advise.Thank you
AZ