2 udev_volume_id - partition, filesystem, disklabel reader
4 This program is normally called from a udev rule, to provide udev with the
5 name, uuid or the filesystem type of a partition to name a device node.
6 udev_volume_id opens the blockdevice specified by the environment variable
7 DEVPATH and searches for a filesystem superblock to read the label. The
8 following commandline switches are supported to specify what udev_volume_id
9 should print to stdout:
11 no option prints all values
13 -l prints the label of the partition
14 -u prints the uuid of the partition
15 -d read disk instead of partition
17 If -d is specified udev_volume_id tries to read the label from the main
18 block device where the partition belongs to. For now this is only useful
21 udev_volume_id will only return successful if the string asked for, is not
22 empty. All trailing whitespace will be removed, spaces replaced by underscore
25 The following rule will create a symlink named with the label string:
26 KERNEL="[hs]d*", PROGRAM="/sbin/udev_volume_id -l", SYMLINK="%c"
28 If no label is found udev_volume_id exits with nonzero and the rule will be
31 To give it a try, you may call it on the commandline:
33 [root@pim udev.kay]# DEVPATH=/block/hda/hda3 extras/volume_id/udev_volume_id
37 U:d2da42b5-bbd9-44eb-a72c-cc4542fcb71e
39 [root@pim udev.kay]# DEVPATH=/block/hda/hda3 extras/volume_id/udev_volume_id -l
42 [root@pim udev.kay]# DEVPATH=/block/hda/hda1 extras/volume_id/udev_volume_id -t
46 Please send any comment/questions/concerns to me or:
47 linux-hotplug-devel@lists.sourceforge.net
49 Kay Sievers <kay.sievers@vrfy.org>