]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
lsblk: (man) add hint about --merge
authorKarel Zak <kzak@redhat.com>
Fri, 17 Mar 2023 11:16:31 +0000 (12:16 +0100)
committerKarel Zak <kzak@redhat.com>
Fri, 17 Mar 2023 11:16:31 +0000 (12:16 +0100)
Signed-off-by: Karel Zak <kzak@redhat.com>
misc-utils/lsblk.8.adoc

index 87df92ff91ad92a91518bbead015eec4e47d8087..d4b13f2dea9bac5a97fe0af08397ef6ca756b9b1 100644 (file)
@@ -18,10 +18,12 @@ lsblk - list block devices
 
 *lsblk* lists information about all available or the specified block devices. The *lsblk* command reads the *sysfs* filesystem and *udev db* to gather information. If the udev db is not available or *lsblk* is compiled without udev support, then it tries to read LABELs, UUIDs and filesystem types from the block device. In this case root permissions are necessary.
 
-The command prints all block devices (except RAM disks) in a tree-like format by default. Use *lsblk --help* to get a list of all available columns.
+By default, the command prints all block devices (except RAM disks) in a tree-like format. The same device can be repeated in the tree if it relates to other devices. The *--merge* option is recommended for more complicated setups to gather groups of devices and describe complex N:M relationships.
 
 The default output, as well as the default output from options like *--fs* and *--topology*, is subject to change. So whenever possible, you should avoid using default outputs in your scripts. Always explicitly define expected columns by using *--output* _columns-list_ and *--list* in environments where a stable output is required.
 
+Use *lsblk --help* to get a list of all available columns.
+
 Note that *lsblk* might be executed in time when *udev* does not have all information about recently added or modified devices yet. In this case it is recommended to use *udevadm settle* before *lsblk* to synchronize with udev.
 
 The relationship between block devices and filesystems is not always one-to-one. The filesystem may use more block devices, or the same filesystem may be accessible by more paths. This is the reason why *lsblk* provides MOUNTPOINT and MOUNTPOINTS (pl.) columns. The column MOUNTPOINT displays only one mount point (usually the last mounted instance of the filesystem), and the column MOUNTPOINTS displays by multi-line cell all mount points associated with the device.