Crate block_utils

source ·

Modules

Structs

Device information that is gathered with udev
A raid array enclosure

Enums

This allows you to tweak some settings when you’re formatting the filesystem
What type of filesystem
What type of media has been detected.
This is used for formatting btrfs filesystems and setting the metadata profile
What raid card if any the system is using to serve disks

Functions

Synchronous utility to format a block device with a given filesystem. Note: ZFS creation can be slow because there’s potentially several commands that need to be run. async_format_block_device will be faster if you have many block devices to format
Returns device info on every device it can find in the devices slice The device info may not be in the same order as the slice so be aware. This function is more efficient because it only call udev list once
Scan a system and return all block devices that udev knows about This function will skip udev devices identified as partition. If it can’t discover this it will error on the side of caution and return the device
Returns device information that is gathered with udev.
Parse mtab and return the device which is mounted at a given directory
Parse mtab and return all mounted block devices not including LVM
Parse mtab and return the mountpoint the device is mounted at. This is the opposite of get_mount_device
Gathers all available scsi information
Checks to see if the subsystem this device is using is block
Checks and returns if a particular directory is a mountpoint
Utility function to mount a device at a mount point NOTE: This assumes the device is formatted at this point. The mount will fail if the device isn’t formatted.
Examine the ScsiInfo devices and associate a host ScsiInfo device if it exists

Type Definitions