Ansible's filesystem and Mount modules

Source: Internet
Author: User

Remotely format a hard disk on another host


Usage options

[[email protected] ~]# ansible-doc -s filesystemless 436copyright  (C)   1984-2009 mark nudelmanless comes with no warranty, to the extent  permitted by law. for information about the terms of redistribution,see the file  Named readme in the less distribution. Homepage: http://www.greenwoodsoftware.com/less- name: makes file system on  block device  action: filesystem      dev=                    #  target block device.      force                   # If yes, allows  To create new filesystem on devices that already has filesystem.       fstype=                #  file system type to be created.      opts                    #  list of options to be passed to mkfs command.       resizefs                # if yes, if the block device and filessytem size differ,  grow the filesystem into the space. Note,                                  xfs will only grow if mounted. 

Options:

Dev: target block device

Force: Forces the creation on a device that already has a file system

Fstype: type of File system

OPTs: Options passed to the MKFS command


To view the hard drive type on the remote host is/DEV/SDB

650) this.width=650; "src=" http://s2.51cto.com/wyfs02/M00/7F/A4/wKioL1cnXeSjwyQcAAOvf2tzqc8144.jpg "title=" 20.jpg "alt=" Wkiol1cnxesjwyqcaaovf2tzqc8144.jpg "/>



Format, Mount. and writes the Fstab file:

650) this.width=650; "src=" http://s2.51cto.com/wyfs02/M00/7F/A6/wKiom1cnYgvg-cBaAAMArzXu1nI867.jpg "title=" 21.jpg "alt=" Wkiom1cnygvg-cbaaamarzxu1ni867.jpg "/>


View Fstab File

650) this.width=650; "src=" http://s5.51cto.com/wyfs02/M01/7F/A4/wKioL1cnY1SBPDI2AAL4YAWVk2c112.jpg "title=" 22.jpg "alt=" Wkiol1cny1sbpdi2aal4yawvk2c112.jpg "/>

Mount usage options, use ansible-doc-s mount to see more methods. Let's do it first. Go to sleep.


This article is from the "Village Boys" blog, please make sure to keep this source http://noodle.blog.51cto.com/2925423/1769547

Ansible's filesystem and Mount modules

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.