Module blockdev

Module blockdev 

Source

Structs§

Disk
Mount
PartTableKernel
Device nodes for partitionable kernel devices, managed by the kernel.
PartTableKpartx
Device nodes for non-partitionable kernel devices, managed by running kpartx to parse the partition table and create device-mapper devices for each partition.
Partition
SavedPartitions

Traits§

PartTable
A handle to the set of device nodes for individual partitions of a device. Must be held as long as the device nodes are needed; they might be removed upon drop.

Functions§

blkid_single
detect_formatted_sector_size
Inspect a buffer from the start of a disk image and return its formatted sector size, if any can be determined.
find_colocated_esps
Find ESP partitions which sit at the same hierarchy level as device.
find_efi_vendor_dir
This is basically a Rust version of: https://github.com/coreos/coreos-assembler/blob/d3c7ec094a02/src/cmd-buildextend-live#L492-L495
find_parent_devices
This is a bit fuzzy, but… this function will return every block device in the parent hierarchy of device capable of containing other partitions. So e.g. parent devices of type “part” doesn’t match, but “disk” and “mpath” does.
get_blkdev_deps
get_blkdev_deps_recursing
get_block_device_size
Get the size of a block device.
get_filesystems_with_label
Returns filesystems with given label. If multiple filesystems with the label have the same UUID, we only return one of them.
get_gpt_size
Get the size of the GPT metadata at the start of the disk.
get_sector_size
Get the logical sector size of a block device.
get_sector_size_for_path
Get the sector size of the block device at a given path.
have_udev
is_dasd
Checks if underlying device is IBM DASD disk
lsblk
lsblk_single
udev_settle