Module for managing block devices
New in version 2014.7.0.
salt.modules.blockdev.
dump
(device, args=None)¶Return all contents of dumpe2fs for a specified device
CLI Example:
salt '*' blockdev.dump /dev/sdX1
salt.modules.blockdev.
format
(device, fs_type='ext4', inode_size=None, lazy_itable_init=None)¶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
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.
CLI Example: .. code-block:: bash
salt '*' blockdev.resize2fs /dev/sdX1
salt.modules.blockdev.
tune
(device, **kwargs)¶Set attributes for the specified device
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
CLI Example:
salt '*' blockdev.wipe /dev/sdX1