[NCLUG] Help w/udev rules

Stephen Warren swarren at wwwdotorg.org
Tue Sep 24 00:30:54 MDT 2013


On 09/24/2013 12:21 AM, Maxwell Spangler wrote:
> On a backup server I have two external USB docks.  I'm writing scripts
> so a user can install new offsite backup drives and tell the computer to
> make them available to receive backups.  Another script will copy the
> appropriate backup files to the drives.  For the backup script to work
> consistently, I want to present the removable storage in a predictable
> manner.
> ...

This perhaps isn't an answer to your question, but I would instead
propose using partition or filesystem UUIDs to identify the block
devices, rather than attempting to make each device have a fixed name.

The advantage here is that your backup scripts can probe the devices to
find out which is which, and implement the probing code entirely
internally (or perhaps shell out to the well-define blkid program). This
will isolate your solution from different versions of udev, with
potentially different configuration file format, and also from whatever
replaces udev when people get bored with it and invent something else.


More information about the NCLUG mailing list