Code Monkey home page Code Monkey logo

ansible-disk's Introduction

Disk

This role allows you to format extra disks and attach them to different mount points.

You can use it to move the data of different services to another disk.

Configuration

Inventory

Because the configuration for additional disks must be stored using the YAML syntax, you have to write it in a group_vars directory.

# inventory/group_vars/GROUP_NAME
disk_additional_disks:
- disk: /dev/sdb
  fstype: ext4
  mount_options: defaults
  mount: /data
  • disk is the device, you want to mount.
  • fstype allows you to choose the filesystem to use with the new disk.
  • mount_options allows you to specify custom mount options.
  • mount is the directory where the new disk should be mounted.

You can add:

  • disk_user sets owner of the mount directory (default: root)
  • disk_group sets group of the mount directory (default: root)

The following filesystems are currently supported:

How it works

It uses sfdisk to partition the disk with a single primary partition spanning the entire disk. The specified filesystem will then be created with mkfs. Finally the new partition will be mounted to the specified mount path.

ansible-disk's People

Contributors

kvij avatar milk avatar sirkubax avatar tokyowizard avatar ypid avatar

Watchers

 avatar

Forkers

safetyculture

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.