標籤: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模組