2

See similar question from 3 years ago, Is there a Mac equivalent for UDEV folder on linux?, but I have different requirements. I'm hoping that this has become easier if not at least possible.

What I am looking for is very UDEV-like functionality. I have four USB-based DVD writers that I want to be assigned specific device names when they get connected:

  1. ASUS SDRW-08D1S-U (VendorID 0x13fd, ProductID 0x1640, SerialNumber 00101016400000005)
  2. LG GP60 (VendorID 0x0e8d, ProductID 0x1887, SerialNumber KX1Z85H3811)
  3. LG GP60 (VendorID 0x0e8d, ProductID 0x1887, SerialNumber KZ3Z8683700)
  4. Samsung (VendorID 0x0e8d, ProductID 0x1806, SerialNumber S1736YAF4001CP)

When the system starts it will (generally) assign these devices /dev/disk2,3,4,5, but the order is seemingly random. For various reasons I would like to have the device names persist been reboots. In Linux I would have setup UDEV rules to do this and "job done", e.g.:

SUBSYSTEM="usb", ATTRS{idVendor}="13fd", ATTRS{idProduct}="1640", ATTRS{serial}="00101016400000005", NAME="writer1"
SUBSYSTEM="usb", ATTRS{idVendor}="0e8d", ATTRS{idProduct}="1887", ATTRS{serial}="KX1Z85H3811", NAME="writer2"
SUBSYSTEM="usb", ATTRS{idVendor}="0e8d", ATTRS{idProduct}="1887", ATTRS{serial}="KZ3Z8683700", NAME="writer3"
SUBSYSTEM="usb", ATTRS{idVendor}="0e8d", ATTRS{idProduct}="1806", ATTRS{serial}="S1736YAF4001CP", NAME="writer4"

But I can't see any way to do something similar on OS X.

The diskutil activity method won't work for this as the logical device names have already been assigned. At this point in the chain Media/Volumes are getting mounted and it's the file system mount notifications that are getting broadcast by diskutil. What I'm looking for is some way to coerce IOKit, underneath the DiskArbitration framework, to assign specific device names before it starts detecting and mounting partitions and file systems.

Is there a simple way to do this (configuration file/s)? Or am I going to have to resort to writing a kext driver to set the BSDName (similar to the SampleUSBAudioOverrideDriver setting display names)?

You must log in to answer this question.

Browse other questions tagged .