I'm wanting to trigger using udev under CoreOS a script on disk add/remove.

The purpose/goal is to automatically mount ceph data partitions to a specific directory in preparation for starting/stopping osd's in ceph-docker.

1) Firstly, CoreOS uses systemd. Should I be doing a systemd way, or do I just create my file under /etc/udev/rules.d ? (a directory which doesn't exist by default).

2) Lets say I do manage to detect a disk through udev and trigger a script with a device filename. How do I read /dev/sda and determine whether it is a ceph disk. i.e. I want to examine the typecode. It needs to be 4fbd7e29-9d25-41b8-afd0-062c0ceff05d

1 Answer 1


udev is very tightly integrated with systemd, so much so that you probably don't want to be creating rules with udev, but using systemd mount units:


All of these options (including checking filesystem type) are supported by systemd.

Your ceph.mount file would look something like this:

Description=CEPH Partition


In addition if that doesn't work for you there are also device units which configure udev: http://www.freedesktop.org/software/systemd/man/systemd.device.html

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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