filesystem - Makes file system on block device

Author:Alexander Bulimov

Synopsis

New in version 1.2.

This module creates file system.

Options

parameter required default choices comments
dev yes
    Target block device.
    force no no
    • yes
    • no
    If yes, allows to create new filesystem on devices that already has filesystem.
    fstype yes
      File System type to be created.
      opts no
        List of options to be passed to mkfs command.

        Examples


        # Create a ext2 filesystem on /dev/sdb1.
        - filesystem: fstype=ext2 dev=/dev/sdb1
        
        # Create a ext4 filesystem on /dev/sdb1 and check disk blocks.
        - filesystem: fstype=ext4 dev=/dev/sdb1 opts="-cc"

        Note

        uses mkfs command