Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have just installed a Plex Media Server to my Linux box and am happy with the idea of the server. My problem is the fact that Plex is not discovering ANY of the files on my external hard drive. The drive in question is a Western Digital My Passport (500GB) formatted to NTFS and already has about 200+ gigs of movies on it.

After searching the Plex forums, I discovered I do not have the correct file permissions for the Plex server to access the drive. In my search for answers, I have gotten far enough to figure out that a udev rule is my best option (using fstab is OUT of the question, after all the drive is REMOVABLE. :) ). I even got so far as to get most of the rule written; it just isn't automounting (as in, I plug the drive in, it mounts to normal Ubuntu mount point /media/$USERNAME/My Passport/). :(

Here is what I have so far in my rule:

/etc/udev/rules.d/71-my-passport.rules

KERNEL=="sd?[0-9]", ATTRS{manufacturer}=="Western Digital", ATTRS{product}=="My Passport 0748", ACTION=="add", RUN+="mount -o dmask=007,fmask=117,gid=1001,uid=1000 /dev/%k /media/My Passport/"

Other random stuff:

blkid

/dev/sda1: UUID="d3ebc281-e885-4770-9ef9-f69651f54a12" TYPE="ext4" 
/dev/sda5: UUID="3569aee9-c16a-49ad-ba03-199180c59f60" TYPE="swap" 
/dev/sdb1: LABEL="My Passport" UUID="948251618251493E" TYPE="ntfs"

udevadm info -a -n /dev/sdb1

Udevadm info starts with the device specified by the devpath and then

walks up the chain of parent devices. It prints for every device found, all possible attributes in the udev rules key format. A rule to match, can be composed by the attributes of the device and the attributes from one single parent device.

looking at device '/devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.1/1-1.1:1.0/host14/target14:0:0/14:0:0:0/block/sdb/sdb1':
KERNEL=="sdb1"
SUBSYSTEM=="block"
DRIVER==""
ATTR{ro}=="0"
ATTR{size}=="976705536"
ATTR{stat}=="     389    30494    32584     3040        0        0        0        0        0     1180     3040"
ATTR{partition}=="1"
ATTR{start}=="2048"
ATTR{discard_alignment}=="0"
ATTR{alignment_offset}=="0"
ATTR{inflight}=="       0        0"

looking at parent device '/devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.1/1-1.1:1.0/host14/target14:0:0/14:0:0:0/block/sdb':
KERNELS=="sdb"
SUBSYSTEMS=="block"
DRIVERS==""
ATTRS{ro}=="0"
ATTRS{size}=="976707584"
ATTRS{stat}=="     467    30494    33208     3084        0        0        0        0        0     1224     3084"
ATTRS{range}=="16"
ATTRS{discard_alignment}=="0"
ATTRS{events}==""
ATTRS{ext_range}=="256"
ATTRS{events_poll_msecs}=="-1"
ATTRS{alignment_offset}=="0"
ATTRS{inflight}=="       0        0"
ATTRS{removable}=="0"
ATTRS{capability}=="50"
ATTRS{events_async}==""

looking at parent device '/devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.1/1-1.1:1.0/host14/target14:0:0/14:0:0:0':
KERNELS=="14:0:0:0"
SUBSYSTEMS=="scsi"
DRIVERS=="sd"
ATTRS{rev}=="1019"
ATTRS{type}=="0"
ATTRS{scsi_level}=="7"
ATTRS{model}=="My Passport 0748"
ATTRS{state}=="running"
ATTRS{queue_type}=="none"
ATTRS{iodone_cnt}=="0x1fb"
ATTRS{iorequest_cnt}=="0x1fb"
ATTRS{timeout}=="30"
ATTRS{evt_media_change}=="0"
ATTRS{max_sectors}=="240"
ATTRS{ioerr_cnt}=="0x1"
ATTRS{queue_depth}=="1"
ATTRS{vendor}=="WD      "
ATTRS{device_blocked}=="0"
ATTRS{dh_state}=="detached"
ATTRS{iocounterbits}=="32"

looking at parent device '/devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.1/1-1.1:1.0/host14/target14:0:0':
KERNELS=="target14:0:0"
SUBSYSTEMS=="scsi"
DRIVERS==""

looking at parent device '/devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.1/1-1.1:1.0/host14':
KERNELS=="host14"
SUBSYSTEMS=="scsi"
DRIVERS==""

looking at parent device '/devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.1/1-1.1:1.0':
KERNELS=="1-1.1:1.0"
SUBSYSTEMS=="usb"
DRIVERS=="usb-storage"
ATTRS{bInterfaceClass}=="08"
ATTRS{bInterfaceSubClass}=="06"
ATTRS{bInterfaceProtocol}=="50"
ATTRS{bNumEndpoints}=="02"
ATTRS{supports_autosuspend}=="1"
ATTRS{bAlternateSetting}==" 0"
ATTRS{bInterfaceNumber}=="00"
ATTRS{interface}=="MSC Bulk-Only Transport"

looking at parent device '/devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.1':
KERNELS=="1-1.1"
SUBSYSTEMS=="usb"
DRIVERS=="usb"
ATTRS{bDeviceSubClass}=="00"
ATTRS{bDeviceProtocol}=="00"
ATTRS{devpath}=="1.1"
ATTRS{idVendor}=="1058"
ATTRS{speed}=="480"
ATTRS{bNumInterfaces}==" 1"
ATTRS{bConfigurationValue}=="1"
ATTRS{bMaxPacketSize0}=="64"
ATTRS{busnum}=="1"
ATTRS{devnum}=="12"
ATTRS{configuration}=="USB Mass Storage"
ATTRS{bMaxPower}=="500mA"
ATTRS{authorized}=="1"
ATTRS{bmAttributes}=="80"
ATTRS{bNumConfigurations}=="1"
ATTRS{maxchild}=="0"
ATTRS{bcdDevice}=="1019"
ATTRS{avoid_reset_quirk}=="0"
ATTRS{quirks}=="0x0"
ATTRS{serial}=="575832314336324C38343535"
ATTRS{version}==" 2.10"
ATTRS{urbnum}=="1578"
ATTRS{ltm_capable}=="no"
ATTRS{manufacturer}=="Western Digital"
ATTRS{removable}=="removable"
ATTRS{idProduct}=="0748"
ATTRS{bDeviceClass}=="00"
ATTRS{product}=="My Passport 0748"

looking at parent device '/devices/pci0000:00/0000:00:1a.0/usb1/1-1':
KERNELS=="1-1"
SUBSYSTEMS=="usb"
DRIVERS=="usb"
ATTRS{bDeviceSubClass}=="00"
ATTRS{bDeviceProtocol}=="01"
ATTRS{devpath}=="1"
ATTRS{idVendor}=="8087"
ATTRS{speed}=="480"
ATTRS{bNumInterfaces}==" 1"
ATTRS{bConfigurationValue}=="1"
ATTRS{bMaxPacketSize0}=="64"
ATTRS{busnum}=="1"
ATTRS{devnum}=="2"
ATTRS{configuration}==""
ATTRS{bMaxPower}=="0mA"
ATTRS{authorized}=="1"
ATTRS{bmAttributes}=="e0"
ATTRS{bNumConfigurations}=="1"
ATTRS{maxchild}=="6"
ATTRS{bcdDevice}=="0000"
ATTRS{avoid_reset_quirk}=="0"
ATTRS{quirks}=="0x0"
ATTRS{version}==" 2.00"
ATTRS{urbnum}=="310"
ATTRS{ltm_capable}=="no"
ATTRS{removable}=="fixed"
ATTRS{idProduct}=="0024"
ATTRS{bDeviceClass}=="09"

looking at parent device '/devices/pci0000:00/0000:00:1a.0/usb1':
KERNELS=="usb1"
SUBSYSTEMS=="usb"
DRIVERS=="usb"
ATTRS{bDeviceSubClass}=="00"
ATTRS{bDeviceProtocol}=="00"
ATTRS{devpath}=="0"
ATTRS{idVendor}=="1d6b"
ATTRS{speed}=="480"
ATTRS{bNumInterfaces}==" 1"
ATTRS{bConfigurationValue}=="1"
ATTRS{bMaxPacketSize0}=="64"
ATTRS{authorized_default}=="1"
ATTRS{busnum}=="1"
ATTRS{devnum}=="1"
ATTRS{configuration}==""
ATTRS{bMaxPower}=="0mA"
ATTRS{authorized}=="1"
ATTRS{bmAttributes}=="e0"
ATTRS{bNumConfigurations}=="1"
ATTRS{maxchild}=="3"
ATTRS{bcdDevice}=="0308"
ATTRS{avoid_reset_quirk}=="0"
ATTRS{quirks}=="0x0"
ATTRS{serial}=="0000:00:1a.0"
ATTRS{version}==" 2.00"
ATTRS{urbnum}=="53"
ATTRS{ltm_capable}=="no"
ATTRS{manufacturer}=="Linux 3.8.0-30-generic ehci_hcd"
ATTRS{removable}=="unknown"
ATTRS{idProduct}=="0002"
ATTRS{bDeviceClass}=="09"
ATTRS{product}=="EHCI Host Controller"

looking at parent device '/devices/pci0000:00/0000:00:1a.0':
KERNELS=="0000:00:1a.0"
SUBSYSTEMS=="pci"
DRIVERS=="ehci-pci"
ATTRS{irq}=="16"
ATTRS{subsystem_vendor}=="0x17aa"
ATTRS{broken_parity_status}=="0"
ATTRS{class}=="0x0c0320"
ATTRS{companion}==""
ATTRS{consistent_dma_mask_bits}=="32"
ATTRS{dma_mask_bits}=="32"
ATTRS{local_cpus}=="00000000,00000000,00000000,00000000,00000000,00000000,00000000,0000000f"
ATTRS{device}=="0x1e2d"
ATTRS{uframe_periodic_max}=="100"
ATTRS{msi_bus}==""
ATTRS{local_cpulist}=="0-3"
ATTRS{vendor}=="0x8086"
ATTRS{subsystem_device}=="0x3977"
ATTRS{numa_node}=="-1"
ATTRS{d3cold_allowed}=="1"

looking at parent device '/devices/pci0000:00':
KERNELS=="pci0000:00"
SUBSYSTEMS==""
DRIVERS==""

udevadm test $(udevadm info -q path -n /dev/sdb1) 2>&1

run_command: calling: test
adm_test: version 175
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.

parse_file: reading '/lib/udev/rules.d/40-crda.rules' as rules file
parse_file: reading '/lib/udev/rules.d/40-gnupg.rules' as rules file
parse_file: reading '/lib/udev/rules.d/40-hplip.rules' as rules file
parse_file: reading '/lib/udev/rules.d/40-ia64.rules' as rules file
parse_file: reading '/lib/udev/rules.d/40-inputattach.rules' as rules file
parse_file: reading '/lib/udev/rules.d/40-libgphoto2-2.rules' as rules file
parse_file: reading '/lib/udev/rules.d/40-libsane.rules' as rules file
parse_file: reading '/lib/udev/rules.d/40-ppc.rules' as rules file
parse_file: reading '/lib/udev/rules.d/40-usb-media-players.rules' as rules file
parse_file: reading '/lib/udev/rules.d/40-usb_modeswitch.rules' as rules file
parse_file: reading '/lib/udev/rules.d/40-virtualbox-dkms.rules' as rules file
parse_file: reading '/lib/udev/rules.d/40-virtualbox-guest-dkms.rules' as rules file
parse_file: reading '/lib/udev/rules.d/40-virtualbox.rules' as rules file
parse_file: reading '/lib/udev/rules.d/42-qemu-usb.rules' as rules file
parse_file: reading '/lib/udev/rules.d/50-firmware.rules' as rules file
parse_file: reading '/lib/udev/rules.d/50-udev-default.rules' as rules file
parse_file: reading '/lib/udev/rules.d/55-dm.rules' as rules file
parse_file: reading '/lib/udev/rules.d/56-hpmud_support.rules' as rules file
parse_file: reading '/lib/udev/rules.d/56-lvm.rules' as rules file
parse_file: reading '/lib/udev/rules.d/60-btrfs.rules' as rules file
parse_file: reading '/lib/udev/rules.d/60-cdrom_id.rules' as rules file
parse_file: reading '/lib/udev/rules.d/60-pcmcia.rules' as rules file
parse_file: reading '/lib/udev/rules.d/60-persistent-alsa.rules' as rules file
parse_file: reading '/lib/udev/rules.d/60-persistent-input.rules' as rules file
parse_file: reading '/lib/udev/rules.d/60-persistent-serial.rules' as rules file
parse_file: reading '/lib/udev/rules.d/60-persistent-storage-dm.rules' as rules file
parse_file: reading '/lib/udev/rules.d/60-persistent-storage-lvm.rules' as rules file
parse_file: reading '/lib/udev/rules.d/60-persistent-storage-tape.rules' as rules file
parse_file: reading '/lib/udev/rules.d/60-persistent-storage.rules' as rules file
parse_file: reading '/lib/udev/rules.d/60-persistent-v4l.rules' as rules file
parse_file: reading '/lib/udev/rules.d/61-accelerometer.rules' as rules file
parse_file: reading '/lib/udev/rules.d/61-gnome-bluetooth-rfkill.rules' as rules file
parse_file: reading '/lib/udev/rules.d/64-xorg-xkb.rules' as rules file
parse_file: reading '/lib/udev/rules.d/66-xorg-synaptics-quirks.rules' as rules file
parse_file: reading '/lib/udev/rules.d/69-cd-sensors.rules' as rules file
add_rule: IMPORT found builtin 'usb_id', replacing /lib/udev/rules.d/69-cd-sensors.rules:85
parse_file: reading '/lib/udev/rules.d/69-libmtp.rules' as rules file
parse_file: reading '/lib/udev/rules.d/69-xorg-vmmouse.rules' as rules file
parse_file: reading '/lib/udev/rules.d/69-xserver-xorg-input-wacom.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 '/lib/udev/rules.d/70-power-switch.rules' as rules file
parse_file: reading '/lib/udev/rules.d/70-printers.rules' as rules file
parse_file: reading '/lib/udev/rules.d/70-uaccess.rules' as rules file
parse_file: reading '/lib/udev/rules.d/70-udev-acl.rules' as rules file
parse_file: reading '/etc/udev/rules.d/71-my-passport.rules' as rules file
parse_file: reading '/lib/udev/rules.d/71-seat.rules' as rules file
parse_file: reading '/lib/udev/rules.d/73-seat-late.rules' as rules file
parse_file: reading '/lib/udev/rules.d/75-cd-aliases-generator.rules' as rules file
parse_file: reading '/lib/udev/rules.d/75-net-description.rules' as rules file
parse_file: reading '/lib/udev/rules.d/75-persistent-net-generator.rules' as rules file
parse_file: reading '/lib/udev/rules.d/75-probe_mtd.rules' as rules file
parse_file: reading '/lib/udev/rules.d/75-tty-description.rules' as rules file
parse_file: reading '/lib/udev/rules.d/77-mm-ericsson-mbm.rules' as rules file
parse_file: reading '/lib/udev/rules.d/77-mm-longcheer-port-types.rules' as rules file
parse_file: reading '/lib/udev/rules.d/77-mm-nokia-port-types.rules' as rules file
parse_file: reading '/lib/udev/rules.d/77-mm-pcmcia-device-blacklist.rules' as rules file
parse_file: reading '/lib/udev/rules.d/77-mm-platform-serial-whitelist.rules' as rules file
parse_file: reading '/lib/udev/rules.d/77-mm-qdl-device-blacklist.rules' as rules file
parse_file: reading '/lib/udev/rules.d/77-mm-simtech-port-types.rules' as rules file
parse_file: reading '/lib/udev/rules.d/77-mm-usb-device-blacklist.rules' as rules file
parse_file: reading '/lib/udev/rules.d/77-mm-x22x-port-types.rules' as rules file
parse_file: reading '/lib/udev/rules.d/77-mm-zte-port-types.rules' as rules file
parse_file: reading '/lib/udev/rules.d/77-nm-olpc-mesh.rules' as rules file
parse_file: reading '/lib/udev/rules.d/78-graphics-card.rules' as rules file
parse_file: reading '/lib/udev/rules.d/78-sound-card.rules' as rules file
parse_file: reading '/lib/udev/rules.d/80-btrfs-lvm.rules' as rules file
parse_file: reading '/lib/udev/rules.d/80-drivers.rules' as rules file
parse_file: reading '/lib/udev/rules.d/80-mm-candidate.rules' as rules file
parse_file: reading '/lib/udev/rules.d/80-udisks.rules' as rules file
parse_file: reading '/lib/udev/rules.d/80-udisks2.rules' as rules file
parse_file: reading '/lib/udev/rules.d/85-brltty.rules' as rules file
parse_file: reading '/lib/udev/rules.d/85-hdparm.rules' as rules file
parse_file: reading '/lib/udev/rules.d/85-hplj10xx.rules' as rules file
parse_file: reading '/lib/udev/rules.d/85-keyboard-configuration.rules' as rules file
parse_file: reading '/lib/udev/rules.d/85-lvm2.rules' as rules file
parse_file: reading '/lib/udev/rules.d/85-regulatory.rules' as rules file
parse_file: reading '/lib/udev/rules.d/85-usbmuxd.rules' as rules file
parse_file: reading '/lib/udev/rules.d/90-alsa-restore.rules' as rules file
parse_file: reading '/lib/udev/rules.d/90-alsa-ucm.rules' as rules file
parse_file: reading '/lib/udev/rules.d/90-libgpod.rules' as rules file
parse_file: reading '/lib/udev/rules.d/90-pulseaudio.rules' as rules file
parse_file: reading '/lib/udev/rules.d/95-cd-devices.rules' as rules file
parse_file: reading '/lib/udev/rules.d/95-keyboard-force-release.rules' as rules file
parse_file: reading '/lib/udev/rules.d/95-keymap.rules' as rules file
parse_file: reading '/lib/udev/rules.d/95-kpartx.rules' as rules file
parse_file: reading '/lib/udev/rules.d/95-udev-late.rules' as rules file
parse_file: reading '/lib/udev/rules.d/95-upower-battery-recall-dell.rules' as rules file
parse_file: reading '/lib/udev/rules.d/95-upower-battery-recall-fujitsu.rules' as rules file
parse_file: reading '/lib/udev/rules.d/95-upower-battery-recall-gateway.rules' as rules file
parse_file: reading '/lib/udev/rules.d/95-upower-battery-recall-ibm.rules' as rules file
parse_file: reading '/lib/udev/rules.d/95-upower-battery-recall-lenovo.rules' as rules file
parse_file: reading '/lib/udev/rules.d/95-upower-battery-recall-toshiba.rules' as rules file
parse_file: reading '/lib/udev/rules.d/95-upower-csr.rules' as rules file
parse_file: reading '/lib/udev/rules.d/95-upower-hid.rules' as rules file
parse_file: reading '/lib/udev/rules.d/95-upower-wup.rules' as rules file
parse_file: reading '/lib/udev/rules.d/97-bluetooth-hid2hci.rules' as rules file
parse_file: reading '/lib/udev/rules.d/97-dmraid.rules' as rules file
parse_file: reading '/lib/udev/rules.d/99-steam-controller-perms.rules' as rules file
udev_rules_new: rules use 304140 bytes tokens (25345 * 12 bytes), 48779 bytes buffer
udev_rules_new: temporary index used 83960 bytes (4198 * 20 bytes)
udev_device_new_from_syspath: device 0x7f5a65af2b70 has devpath '/devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.1/1-1.1:1.0/host14/target14:0:0/14:0:0:0/block/sdb/sdb1'
udev_device_new_from_syspath: device 0x7f5a65af58b0 has devpath '/devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.1/1-1.1:1.0/host14/target14:0:0/14:0:0:0/block/sdb/sdb1'
udev_device_read_db: device 0x7f5a65af58b0 filled with db file data
udev_device_new_from_syspath: device 0x7f5a65af7de0 has devpath '/devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.1/1-1.1:1.0/host14/target14:0:0/14:0:0:0/block/sdb'
udev_device_new_from_syspath: device 0x7f5a65af8610 has devpath '/devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.1/1-1.1:1.0/host14/target14:0:0/14:0:0:0'
udev_device_new_from_syspath: device 0x7f5a65af8e30 has devpath '/devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.1/1-1.1:1.0/host14/target14:0:0'
udev_device_new_from_syspath: device 0x7f5a65af9640 has devpath '/devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.1/1-1.1:1.0/host14'
udev_device_new_from_syspath: device 0x7f5a65af9e30 has devpath '/devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.1/1-1.1:1.0'
udev_device_new_from_syspath: device 0x7f5a65afa620 has devpath '/devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.1'
udev_device_new_from_syspath: device 0x7f5a65afae10 has devpath '/devices/pci0000:00/0000:00:1a.0/usb1/1-1'
udev_device_new_from_syspath: device 0x7f5a65afb600 has devpath '/devices/pci0000:00/0000:00:1a.0/usb1'
udev_device_new_from_syspath: device 0x7f5a65afbde0 has devpath '/devices/pci0000:00/0000:00:1a.0'
udev_device_new_from_syspath: device 0x7f5a65afc590 has devpath '/devices/pci0000:00'
udev_rules_apply_to_event: GROUP 6 /lib/udev/rules.d/50-udev-default.rules:67
udev_device_read_db: device 0x7f5a65af7de0 filled with db file data
udev_rules_apply_to_event: LINK 'disk/by-id/usb-WD_My_Passport_0748_575832314336324C38343535-0:0-part1' /lib/udev/rules.d/60-persistent-storage.rules:46
udev_rules_apply_to_event: LINK 'disk/by-path/pci-0000:00:1a.0-usb-0:1.1:1.0-scsi-0:0:0:0-part1' /lib/udev/rules.d/60-persistent-storage.rules:64
udev_rules_apply_to_event: IMPORT '/sbin/blkid -o udev -p /dev/sdb1' /lib/udev/rules.d/60-persistent-storage.rules:75
udev_event_spawn: starting '/sbin/blkid -o udev -p /dev/sdb1'
spawn_read: '/sbin/blkid -o udev -p /dev/sdb1'(err) 'error: /dev/sdb1: Permission denied'
spawn_wait: '/sbin/blkid -o udev -p /dev/sdb1' [28479] exit with return code 2
udev_rules_apply_to_event: RUN 'mount -o dmask=007,fmask=117,gid=1001,uid=1000 /dev/%k /media/My Passport/' /etc/udev/rules.d/71-my-passport.rules:1
udev_rules_apply_to_event: IMPORT 'udisks-part-id /dev/sdb1' /lib/udev/rules.d/80-udisks.rules:88
udev_event_spawn: starting 'udisks-part-id /dev/sdb1'
spawn_read: 'udisks-part-id /dev/sdb1'(err) 'using device_file=/dev/sdb syspath=/sys/devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.1/1-1.1:1.0/host14/target14:0:0/14:0:0:0/block/sdb, offset=1048576 ao=0 and number=1 for /dev/sdb1'
spawn_read: 'udisks-part-id /dev/sdb1'(err) 'Error opening /dev/sdb: Permission denied'
spawn_wait: 'udisks-part-id /dev/sdb1' [28480] exit with return code 0
udev_rules_apply_to_event: RUN '/sbin/modprobe -qba dm-multipath' /lib/udev/rules.d/95-kpartx.rules:10
udev_event_execute_rules: no node name set, will use kernel supplied name 'sdb1'
udev_node_update_old_links: update old name, '/dev/disk/by-label/My\x20Passport' no longer belonging to '/devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.1/1-1.1:1.0/host14/target14:0:0/14:0:0:0/block/sdb/sdb1'
link_find_prioritized: found 'b8:17' claiming '/run/udev/links/disk\x2fby-label\x2fMy\x5cx20Passport'
link_update: no reference left, remove '/dev/disk/by-label/My\x20Passport'
udev_node_update_old_links: update old name, '/dev/disk/by-uuid/948251618251493E' no longer belonging to '/devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.1/1-1.1:1.0/host14/target14:0:0/14:0:0:0/block/sdb/sdb1'
link_find_prioritized: found 'b8:17' claiming '/run/udev/links/disk\x2fby-uuid\x2f948251618251493E'
link_update: no reference left, remove '/dev/disk/by-uuid/948251618251493E'
udev_node_add: creating device node '/dev/sdb1', devnum=8:17, mode=0660, uid=0, gid=6
udev_node_mknod: preserve file '/dev/sdb1', because it has correct dev_t
udev_node_mknod: preserve permissions /dev/sdb1, 060660, uid=0, gid=6
node_symlink: preserve already existing symlink '/dev/block/8:17' to '../sdb1'
link_find_prioritized: found 'b8:17' claiming '/run/udev/links/disk\x2fby-id\x2fusb-WD_My_Passport_0748_575832314336324C38343535-0:0-part1'
link_update: creating link '/dev/disk/by-id/usb-WD_My_Passport_0748_575832314336324C38343535-0:0-part1' to '/dev/sdb1'
node_symlink: preserve already existing symlink '/dev/disk/by-id/usb-WD_My_Passport_0748_575832314336324C38343535-0:0-part1' to '../../sdb1'
link_find_prioritized: found 'b8:17' claiming '/run/udev/links/disk\x2fby-path\x2fpci-0000:00:1a.0-usb-0:1.1:1.0-scsi-0:0:0:0-part1'
link_update: creating link '/dev/disk/by-path/pci-0000:00:1a.0-usb-0:1.1:1.0-scsi-0:0:0:0-part1' to '/dev/sdb1'
node_symlink: preserve already existing symlink '/dev/disk/by-path/pci-0000:00:1a.0-usb-0:1.1:1.0-scsi-0:0:0:0-part1' to '../../sdb1'
udev_device_update_db: unable to create temporary db file '/run/udev/data/b8:17.tmp': Permission denied
ACTION=add
DEVLINKS=/dev/disk/by-id/usb-WD_My_Passport_0748_575832314336324C38343535-0:0-part1 /dev/disk/by-path/pci-0000:00:1a.0-usb-0:1.1:1.0-scsi-0:0:0:0-part1
DEVNAME=/dev/sdb1
DEVPATH=/devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.1/1-1.1:1.0/host14/target14:0:0/14:0:0:0/block/sdb/sdb1
DEVTYPE=partition
ID_BUS=usb
ID_INSTANCE=0:0
ID_MODEL=My_Passport_0748
ID_MODEL_ENC=My\x20Passport\x200748
ID_MODEL_ID=0748
ID_PART_TABLE_TYPE=dos
ID_PATH=pci-0000:00:1a.0-usb-0:1.1:1.0-scsi-0:0:0:0
ID_PATH_TAG=pci-0000_00_1a_0-usb-0_1_1_1_0-scsi-0_0_0_0
ID_REVISION=1019
ID_SERIAL=WD_My_Passport_0748_575832314336324C38343535-0:0
ID_SERIAL_SHORT=575832314336324C38343535
ID_TYPE=disk
ID_USB_DRIVER=usb-storage
ID_USB_INTERFACES=:080650:
ID_USB_INTERFACE_NUM=00
ID_VENDOR=WD
ID_VENDOR_ENC=WD\x20\x20\x20\x20\x20\x20
ID_VENDOR_ID=1058
MAJOR=8
MINOR=17
SUBSYSTEM=block
UDEV_LOG=6
UDISKS_PRESENTATION_NOPOLICY=0
USEC_INITIALIZED=19772580387
run: 'mount -o dmask=007,fmask=117,gid=1001,uid=1000 /dev/sdb1 /media/My Passport/'
run: '/sbin/modprobe -qba dm-multipath'
share|improve this question
add comment

2 Answers 2

up vote 1 down vote accepted

Maybe the directory where you're trying to mount your drive is not created (/media/MY PASSAPORT); try changing your udev rule like this:

..., RUN+="/bin/mkdir -p /media/My_Passport", RUN+="/bin/mount -o dmask=007,fmask=117,gid=1001,uid=1000 /dev/%k /media/My_Passport/"

the -p argument will not give you an error if the folder already exsits; I changed your "mount" to "/bin/mount" (this is how i've got it in my udev rules) I also changed the name of the directory where you want to mount your drive (no spaces; spaces need escaping); try it like this

share|improve this answer
    
Since this post a lot of things have changed with my server but removing the space fixed my problem. Thanks for drawing my attention to this question again. :) –  DaBungalow Dec 13 '13 at 23:44
add comment

This isn't a job for udev. Add an entry to /etc/fstab identifying the drive by label or uuid rather than device, and use the nofail option to prevent the system from complaining if it isn't there at boot time, and it will auto mount when connected.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.