LSBLK(8)

NAME
lsblk - list block devices and their device trees

SYNOPSIS
lsblk [disk]
lsblk -d
lsblk --disks
lsblk --version
lsblk --help

DESCRIPTION
The lsblk(8) tool prints tree oriented view of block/character devices. Output is intended to provide compact summary of whole disks, partition schemes, partitions with related information about them like encryption layers or size and basic identification.

If the optional disk option is specified - only device tree rooted at that device is displayed.

The default output format is columnar - the columns include:
DEVICE
    Device or provider name.
MAJ:MIN
    Major/minor numbers formatted as major:minor when available.
SIZE
    Size of the device/provider.
TYPE
    Provider/partition type (for example, GPT, MBR, freebsd-ufs, freebsd-zfs).
LABEL
    Label associated with provider when available.
MOUNT
    Mount point when available. Certain filesystem types may display sentinel such as ‘<ZFS>’ to indicate managed mounts.

OPTIONS

-d | --disks
    Display only whole disks (no partition/provider tree expansion). This mode is commonly used to summarize inventory and model information.

--help
    Display brief usage message and exit.

--version
    Display version information and exit.

EXAMPLES
List all block devices in the system:

    # lsblk
    DEVICE         MAJ:MIN SIZE TYPE                      LABEL MOUNT
    ada0             0:92  932G GPT                           - -
      ada0p1         0:100 200M efi                    efiboot0 -
      ada0p2         0:101 512K freebsd-boot           gptboot0 -
      <FREE>         -:-   492K -                             - -
      ada0p3         0:102 931G freebsd-zfs                zfs0 <ZFS>
      ada0p3.eli     0:106 931G freebsd-zfs                   - <ZFS>

List only the da1 device tree:

    # lsblk da1
    DEVICE         MAJ:MIN SIZE TYPE                      LABEL MOUNT
    da1              0:80  2.0G MBR                           - -
      da1s1          0:80  2.0G freebsd                       - -
        da1s1a       0:81  1.0G freebsd-ufs                root /
        da1s1b       0:82  1.0G freebsd-swap               swap SWAP

List whole disks only:

    # lsblk -d
    DEVICE SIZE MODEL
    ada0   1.8T Samsung SSD 860 QVO 2TB
    ada1   119G SAMSUNG SSD PM830 mSATA 128GB
    -        2T TOTAL SYSTEM STORAGE

Display version information:

    # lsblk --version

Enumerate physical disks as seen by the kernel (useful for establishing the set of disk roots prior to invoking lsblk(8) tool:

    # sysctl kern.disks
    kern.disks: ada0 da0 da1

SEE ALSO
sysctl(8), mdconfig(8), gpart(8), diskinfo(8), geom(8), geli(8), zfs(8), zpool(8)

HISTORY
The FreeBSD implementation of lsblk(8) tool first appeared in 2020.

AUTHORS
Author and maintainer of FreeBSD version of lsblk(8) is:

Slawomir Wojciech Wojtczak (vermaden) <vermaden@interia.pl>