ansible之filesystem和mount模組

來源:互聯網
上載者:User

標籤:ansible filesystem和mount模組用法

遠程格式化其他主機上硬碟


用法選項

[[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.

選項:

 dev:目標塊裝置

 force:在一個已有檔案系統的裝置上強制建立

 fstype:檔案系統的類型

 opts:傳遞給mkfs命令的選項


查看遠程主機上硬碟類型是/dev/sdb

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



格式化,掛載。並會寫入fstab檔案。。

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


查看fstab檔案

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

mount用法選項,使用ansible-doc -s mount來查看更多的方法。先這樣吧。睡覺覺去了。


本文出自 “村裡的男孩” 部落格,請務必保留此出處http://noodle.blog.51cto.com/2925423/1769547

ansible之filesystem和mount模組

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

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.