]> git.ipfire.org Git - thirdparty/util-linux.git/blame - libblkid/libblkid.3
docs: update ReleaseNotes: fix typo in v2.20-ReleaseNotes
[thirdparty/util-linux.git] / libblkid / libblkid.3
CommitLineData
a0948ffe
KZ
1.\" Copyright 2001 Andreas Dilger (adilger@turbolinux.com)
2.\"
3.\" This man page was created for libblkid.so.1.0 from e2fsprogs-1.24.
4.\"
5.\" This file may be copied under the terms of the GNU Public License.
6.\"
7.\" Created Wed Sep 14 12:02:12 2001, Andreas Dilger
601d12fb 8.TH LIBBLKID 3 "May 2009" "util-linux"
a0948ffe
KZ
9.SH NAME
10libblkid \- block device identification library
11.SH SYNOPSIS
8e368761 12.B #include <blkid.h>
a0948ffe
KZ
13.sp
14.B cc
15.I file.c
16.B \-lblkid
17.SH DESCRIPTION
18The
19.B libblkid
20library is used to identify block devices (disks) as to their content (e.g.
21filesystem type) as well as extracting additional information such as
c632883f 22filesystem labels/volume names, unique identifiers/serial numbers.
a0948ffe
KZ
23A common use is to allow use of LABEL= and UUID= tags instead of hard-coding
24specific block device names into configuration files.
25.P
c632883f
KZ
26The low-level part of the library also allows to extract infomation about
27partitions and block device topology.
28.P
29The high-level part of the library keeps information about block devices
30in a cache file
a0948ffe
KZ
31.I /etc/blkid.tab
32and is verified to still be valid before being returned to the user
33(if the user has read permission on the raw block device, otherwise not).
34The cache file also allows unprivileged users (normally anyone other
35than root, or those not in the "disk" group) to locate devices by label/id.
36The standard location of the cache file can be overridden by the
37environment variable BLKID_FILE.
38.P
c632883f
KZ
39In situations where one is getting information about a single known device, it
40does not impact performance whether the cache is used or not (unless you are
41not able to read the block device directly).
42.P
43The high-level part of the library supports two methods to evaluate LABEL/UUID.
44It reads information directly from a block device or read information from
45/dev/disk/by-* udev symlinks. The udev is preferred method by default.
46.P
47If you are dealing with
a0948ffe
KZ
48multiple devices, use of the cache is highly recommended (even if empty) as
49devices will be scanned at most one time and the on-disk cache will be
c632883f 50updated if possible.
a0948ffe
KZ
51.P
52In some cases (modular kernels), block devices are not even visible until
53after they are accessed the first time, so it is critical that there is
54some way to locate these devices without enumerating only visible devices,
55so the use of the cache file is
56.B required
57in this situation.
0eb0aff9
KZ
58.SH CONFIGURATION FILE
59The standard location of the
60.I /etc/blkid.conf
61config file can be overridden by the environment variable BLKID_CONF.
62The following options control the libblkid library:
63.TP
64.I SEND_UEVENT=<yes|not>
65Sends uevent when
66.I /dev/disk/by-{label,uuid}/
67symlink does not match with LABEL or UUID on the device. Default is "yes".
68.TP
69.I CACHE_FILE=<path>
70Overrides the standard location of the cache file. This setting can be
71overridden by the environment variable BLKID_FILE. Default is
72.I /etc/blkid.tab.
73.TP
74.I EVALUATE=<methods>
75Defines LABEL and UUID evaluation method(s). Currently, the libblkid library
76supports "udev" and "scan" methods. More than one methods may be specified in
77a comma separated list. Default is "udev,scan". The "udev" method uses udev
78.I /dev/disk/by-*
79symlinks and the "scan" method scans all block devices from the
80.I /proc/partitions
81file.
a0948ffe
KZ
82.SH AUTHOR
83.B libblkid
84was written by Andreas Dilger for the ext2 filesystem utilties, with input
85from Ted Ts'o. The library was subsequently heavily modified by Ted Ts'o.
0eb0aff9
KZ
86
87The low-level probing code was rewritten by Karel Zak.
a0948ffe 88.SH FILES
0eb0aff9 89.TP 18
a0948ffe 90.I /etc/blkid.tab
0eb0aff9
KZ
91caches data extracted from each recognized block device
92.TP
93.I /etc/blkid.conf
94configuration file
a0948ffe
KZ
95.SH AVAILABILITY
96.B libblkid
601d12fb
KZ
97is part of the util-linux package since version 2.15 and is available from
98ftp://ftp.kernel.org/pub/linux/utils/util-linux/.
a0948ffe
KZ
99.SH COPYING
100.B libblkid
101is available under the terms of the GNU Library General Public License (LGPL),
c632883f 102version 2 (or at your discretion any later version).
a0948ffe
KZ
103.SH "SEE ALSO"
104.BR blkid (8)
fc7a1669 105.BR findfs (8)