]> git.ipfire.org Git - thirdparty/systemd.git/blame - extras/volume_id/README
[PATCH] cleanup udevd/udevstart
[thirdparty/systemd.git] / extras / volume_id / README
CommitLineData
cde5a756
KS
1
2udev_volume_id - partition, filesystem, disklabel reader
3
4This program is normally called from a udev rule, to provide udev with the
5name, uuid or the filesystem type of a partition to name a device node.
6udev_volume_id opens the blockdevice specified by the environment variable
7DEVPATH and searches for a filesystem superblock to read the label. The
8following commandline switches are supported to specify what udev_volume_id
9should print to stdout:
10
11 no option prints all values
12 -h prints help text
13 -l prints the label of the partition
14 -u prints the uuid of the partition
15 -d read disk instead of partition
16
17If -d is specified udev_volume_id tries to read the label from the main
18block device where the partition belongs to. For now this is only useful
19for s390 dasd labels.
20
21udev_volume_id will only return successful if the string asked for, is not
22empty. All trailing whitespace will be removed, spaces replaced by underscore
23and slashes ignored.
24
25The following rule will create a symlink named with the label string:
26 KERNEL="[hs]d*", PROGRAM="/sbin/udev_volume_id -l", SYMLINK="%c"
27
28If no label is found udev_volume_id exits with nonzero and the rule will be
29ignored.
30
31To give it a try, you may call it on the commandline:
32
33 [root@pim udev.kay]# DEVPATH=/block/hda/hda3 extras/volume_id/udev_volume_id
34 T:ext3
35 L:Music Store
36 N:Music_Store
37 U:d2da42b5-bbd9-44eb-a72c-cc4542fcb71e
38
39 [root@pim udev.kay]# DEVPATH=/block/hda/hda3 extras/volume_id/udev_volume_id -l
40 Music_Store
41
42 [root@pim udev.kay]# DEVPATH=/block/hda/hda1 extras/volume_id/udev_volume_id -t
43 swap
44
45
46Please send any comment/questions/concerns to me or:
47 linux-hotplug-devel@lists.sourceforge.net
48
49Kay Sievers <kay.sievers@vrfy.org>