Module for managing block devices
New in version 2014.7.0.
Deprecated since version Carbon: Merged to disk module
salt.modules.blockdev.
dump
(device, args=None)¶Return all contents of dumpe2fs for a specified device
Deprecated since version Carbon: Use disk.dump
CLI Example:
salt '*' blockdev.dump /dev/sdX1
salt.modules.blockdev.
format
(device, fs_type='ext4', inode_size=None, lazy_itable_init=None, force=False)¶Format a filesystem onto a block device
New in version 2015.8.2.
Size of the inodes
This option is only enabled for ext and xfs filesystems
If enabled and the uninit_bg feature is enabled, the inode table will not be fully initialized by mke2fs. This speeds up filesystem initialization noticeably, but it requires the kernel to finish initializing the filesystem in the background when the filesystem is first mounted. If the option value is omitted, it defaults to 1 to enable lazy inode table zeroing.
This option is only enabled for ext filesystems
Force mke2fs to create a filesystem, even if the specified device is not a partition on a block special device. This option is only enabled for ext and xfs filesystems
This option is dangerous, use it with caution.
New in version Carbon.
CLI Example:
salt '*' blockdev.format /dev/sdX1
salt.modules.blockdev.
fstype
(device)¶Return the filesystem name of a block device
New in version 2015.8.2.
CLI Example:
salt '*' blockdev.fstype /dev/sdX1
salt.modules.blockdev.
resize2fs
(device)¶Resizes the filesystem.
Deprecated since version Carbon: Use disk.resize2fs
CLI Example: .. code-block:: bash
salt '*' blockdev.resize2fs /dev/sdX1
salt.modules.blockdev.
tune
(device, **kwargs)¶Set attributes for the specified device
Deprecated since version Carbon: Use disk.tune
CLI Example:
salt '*' blockdev.tune /dev/sdX1 read-ahead=1024 read-write=True
Valid options are: read-ahead
, filesystem-read-ahead
,
read-only
, read-write
.
See the blockdev(8)
manpage for a more complete description of these
options.
salt.modules.blockdev.
wipe
(device)¶Remove the filesystem information
Deprecated since version Carbon: Use disk.tune
CLI Example:
salt '*' blockdev.wipe /dev/sdX1