Salt module to manage Unix mounts and the fstab file
List the active mounts.
CLI Example:
salt '*' mount.active
List the contents of the auto master
CLI Example:
salt '*' mount.automaster
New in version 2018.3.0.
Provide information if the path is mounted
CLI Example:
salt '*' mount.delete_mount_cache /mnt/share
New in version 2018.3.3.
List the contents of the filesystems
CLI Example:
salt '*' mount.filesystems
Changed in version 2016.3.2.
List the contents of the fstab
CLI Example:
salt '*' mount.fstab
Returns true if the command passed is a fuse mountable application.
CLI Example:
salt '*' mount.is_fuse_exec sshfs
New in version 2014.7.0.
Provide information if the path is mounted
CLI Example:
salt '*' mount.is_mounted /mnt/share
Mount a device
CLI Example:
salt '*' mount.mount /mnt/foo /dev/sdz1 True
New in version 2018.3.0.
Provide information if the path is mounted
CLI Example:
salt '*' mount.read_mount_cache /mnt/share
Attempt to remount a device, if the device is not already mounted, mount is called
CLI Example:
salt '*' mount.remount /mnt/foo /dev/sdz1 True
Remove the mount point from the auto_master
CLI Example:
salt '*' mount.rm_automaster /mnt/foo /dev/sdg
New in version 2018.3.3.
Remove the mount point from the filesystems
CLI Example:
salt '*' mount.rm_filesystems /mnt/foo /dev/sdg
Changed in version 2016.3.2.
Remove the mount point from the fstab
CLI Example:
salt '*' mount.rm_fstab /mnt/foo /dev/sdg
New in version 2016.3.2.
Remove the mount point from the vfstab
CLI Example:
salt '*' mount.rm_vfstab /mnt/foo /device/c0t0d0p0
Verify that this mount is represented in the auto_salt, change the mount to match the data passed, or add the mount if it is not present.
CLI Example:
salt '*' mount.set_automaster /mnt/foo /dev/sdz1 ext4
New in version 2018.3.3.
Verify that this mount is represented in the filesystems, change the mount to match the data passed, or add the mount if it is not present on AIX
Provide information if the path is mounted
Parameters: |
|
---|
CLI Example:
salt '*' mount.set_filesystems /mnt/foo /dev/sdz1 jfs2
Verify that this mount is represented in the fstab, change the mount to match the data passed, or add the mount if it is not present.
CLI Example:
salt '*' mount.set_fstab /mnt/foo /dev/sdz1 ext4
..verionadded:: 2016.3.2 Verify that this mount is represented in the fstab, change the mount to match the data passed, or add the mount if it is not present.
CLI Example:
salt '*' mount.set_vfstab /mnt/foo /device/c0t0d0p0 ufs
Deactivate a named swap mount
Changed in version 2016.3.2.
CLI Example:
salt '*' mount.swapoff /root/swapfile
Activate a swap disk
Changed in version 2016.3.2.
CLI Example:
salt '*' mount.swapon /root/swapfile
Return a dict containing information on active swap
Changed in version 2016.3.2.
CLI Example:
salt '*' mount.swaps
Attempt to unmount a device by specifying the directory it is mounted on
CLI Example:
salt '*' mount.umount /mnt/foo
New in version 2015.5.0.
salt '*' mount.umount /mnt/foo /dev/xvdc1
New in version 2016.3.2.
List the contents of the vfstab
CLI Example:
salt '*' mount.vfstab
New in version 2018.3.0.
Provide information if the path is mounted
Parameters: |
|
---|---|
Returns: |
Boolean if message was sent successfully. |
CLI Example:
salt '*' mount.write_mount_cache /mnt/share /dev/sda1 False ext4 defaults,nosuid
© 2019 SaltStack.
Licensed under the Apache License, Version 2.0.
https://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.mount.html