Crate block_utils [−] [src]
Structs
AsyncInit | |
Device |
Device information that is gathered with udev |
Enums
Filesystem |
This allows you to tweak some settings when you're formatting the filesystem |
FilesystemType |
What type of filesystem |
MediaType |
What type of media has been detected. |
MetadataProfile |
This is used for formatting btrfs filesystems and setting the metadata profile |
RaidType |
What raid card if any the system is using to serve disks |
Scheduler |
Functions
async_format_block_device | |
erase_block_device | |
format_block_device |
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 |
get_all_device_info |
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 |
get_block_devices |
Scan a system and return all block devices that udev knows about |
get_device_info |
Returns device information that is gathered with udev. |
get_mount_device |
Parse mtab and return the device which is mounted at a given directory |
get_mountpoint |
Parse mtab and return the mountpoint the device is mounted at. This is the opposite of get_mount_device |
get_raid_info |
Detects the RAID card in use |
is_block_device |
Checks to see if the subsystem this device is using is block |
is_mounted |
Checks and returns if a particular directory is a mountpoint |
mount_device |
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. |
set_elevator | |
unmount_device | |
weekly_defrag |