salt.states.mount

Mounting of filesystems.

Mount any type of mountable filesystem with the mounted function:

/mnt/sdb:
  mount.mounted:
    - device: /dev/sdb1
    - fstype: ext4
    - mkmnt: True
    - opts:
      - defaults
salt.states.mount.mounted(name, device, fstype, mkmnt=False, opts=None, dump=0, pass_num=0, config='/etc/fstab', persist=True)

Verify that a device is mounted

name
The path to the location where the device is to be mounted
device
The device name, typically the device node, such as /dev/sdb1
fstype
The filesystem type, this will be xfs, ext2/3/4 in the case of classic filesystems, and fuse in the case of fuse mounts
mkmnt
If the mount point is not present then the state will fail, set mkmnt to True to create the mount point if it is otherwise not present
opts
A list object of options or a comma delimited list
dump
The dump value to be passed into the fstab, default to 0
pass_num
The pass value to be passed into the fstab, default to 0
config
Set an alternative location for the fstab, default to /etc/fstab
remount
Set if the file system can be remounted with the remount option, default to True
persist
Set if the mount should be saved in the fstab, default to True

Table Of Contents

Previous topic

salt.states.mongodb_user

Next topic

salt.states.mysql_database