SCIENTIFIC-LINUX-USERS Archives

November 2013

SCIENTIFIC-LINUX-USERS@LISTSERV.FNAL.GOV

Options: Use Monospaced Font
Show HTML Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Taylor Woods <[log in to unmask]>
Reply To:
Taylor Woods <[log in to unmask]>
Date:
Fri, 1 Nov 2013 12:19:54 -0400
Content-Type:
multipart/alternative
Parts/Attachments:
text/plain (2727 bytes) , text/html (3904 bytes)
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
On Nov 1, 2013 12:07 PM, "Andrew Z" <[log in to unmask]> wrote:

> Hello,
>  i'm trying to understand why i'm not getting action="remove" and how to
> make it work.
>
> Here are the details:
>  SD card is been plugged into the internal SD reader. Rules fire up,
> create a subdir per partition and mount the card.- Life is good
>
> SD card is been pulled out of the SD reader - no rules are been executed.
> SD is still been mounted.
>
> Here are the rules:
> ---start copy/paste---
> cat /etc/udev/rules.d/50-card.rules
>
> # 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"
>
> --- end of copy/paste----
>
> after fresh reboot :
> <---start copy/paste-->
> udevadm monitor --udev
> monitor will print the received events for:
> UDEV - the event which udev sends out after rule processing
>
> <--- plugging the SD in --->
> 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
>
>
>


ATOM RSS1 RSS2