Mount any type of mountable filesystem with the mounted function:
/mnt/sdb:
mount.mounted:
- device: /dev/sdb1
- fstype: ext4
- mkmnt: True
- opts:
- defaults
/srv/bigdata:
mount.mounted:
- device: UUID=066e0200-2867-4ebe-b9e6-f30026ca2314
- fstype: xfs
- opts: nobootwait,noatime,nodiratime,nobarrier,logbufs=8
- dump: 0
- pass_num: 2
- persist: True
- mkmnt: True
salt.states.mount.mod_watch(name, user=None, **kwargs)¶The mounted watcher, called to invoke the watch command.
salt.states.mount.mounted(name, device, fstype, mkmnt=False, opts='defaults', dump=0, pass_num=0, config='/etc/fstab', persist=True, mount=True, user=None, match_on='auto', hidden_opts=None)¶Verify that a device is mounted
/dev/sdb1
or UUID=066e0200-2867-4ebe-b9e6-f30026ca2314 or LABEL=DATAxfs, ext2/3/4 in the case of classic
filesystems, and fuse in the case of fuse mountsmkmnt: True
to create the mount point if it is otherwise not present00/etc/fstabTrueTrueauto, a special value indicating to guess based on fstype.
In general, auto matches on name for recognized special devices and
device otherwise.A list of mount options that will be ignored when considering a remount as part of the state application
New in version 2015.8.2.
salt.states.mount.swap(name, persist=True, config='/etc/fstab')¶Activates a swap device
/root/swapfile:
mount.swap
Note
swap does not currently support LABEL
salt.states.mount.unmounted(name, device=None, config='/etc/fstab', persist=False, user=None)¶New in version 0.17.0.
Verify that a device is not mounted
The device to be unmounted. This is optional because the device could be mounted in multiple places.
New in version 2015.5.0.
/etc/fstabFalseDocs for previous releases are available on readthedocs.org.
Latest Salt release: 2015.8.7