# Remount Partitions and making permanent

**URL:** <https://forum.ansible.com/t/remount-partitions-and-making-permanent/14101>\
**Category:** Ansible Project\
**Created:** [December 9, 2013, 5:09am UTC](https://forum.ansible.com/t/remount-partitions-and-making-permanent/14101 "2013-12-09T05:09:59Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![TextEditor1](https://avatars.discourse-cdn.com/v4/letter/t/a5b964/32.png) [@TextEditor1](https://forum.ansible.com/u/TextEditor1)\
**Post date:** [December 9, 2013, 5:09am UTC](https://forum.ansible.com/t/remount-partitions-and-making-permanent/14101/1 "2013-12-09T05:09:59Z")

</div>

How would I remount the root partition with the “noatime” option and afterwards make it permanent, without knowing the layout of the filesystems on the machine (so no template for /etc/fstab)?

If the “mounted” state is given to the mount module, will it remount the partition if it is already mounted?

```auto
mount: name=/ src=/dev/mapper/root fstype=xfs opts=ro state=mounted

How would I make the above permanent? With a "mount > /etc/fstab", or is there a nicer way?

```

---

<div class="post-metadata">

**Author:** ![Michael\_DeHaan2](https://avatars.discourse-cdn.com/v4/letter/m/da6949/32.png) [@Michael\_DeHaan2](https://forum.ansible.com/u/Michael_DeHaan2)\
**Post date:** [December 9, 2013, 2:36pm UTC](https://forum.ansible.com/t/remount-partitions-and-making-permanent/14101/2 "2013-12-09T14:36:38Z")

</div>

Yes, you can see the remount logic here:

[https://github.com/ansible/ansible/blob/devel/library/system/mount#L206](https://github.com/ansible/ansible/blob/devel/library/system/mount#L206)

---

<div class="post-metadata">

**Author:** ![Michael\_DeHaan2](https://avatars.discourse-cdn.com/v4/letter/m/da6949/32.png) [@Michael\_DeHaan2](https://forum.ansible.com/u/Michael_DeHaan2)\
**Post date:** [December 9, 2013, 2:37pm UTC](https://forum.ansible.com/t/remount-partitions-and-making-permanent/14101/3 "2013-12-09T14:37:21Z")

</div>

Also note the description of the module

" - This module controls active and configured mount points in C(/etc/fstab)."

So no manual editing of fstab.

---

<div class="post-metadata">

**Author:** ![TextEditor1](https://avatars.discourse-cdn.com/v4/letter/t/a5b964/32.png) [@TextEditor1](https://forum.ansible.com/u/TextEditor1)\
**Post date:** [December 10, 2013, 5:20am UTC](https://forum.ansible.com/t/remount-partitions-and-making-permanent/14101/4 "2013-12-10T05:20:19Z")

</div>

So when I do a remount of root (/) with new options it will be made permanent in fstab?

---

<div class="post-metadata">

**Author:** ![Michael\_DeHaan2](https://avatars.discourse-cdn.com/v4/letter/m/da6949/32.png) [@Michael\_DeHaan2](https://forum.ansible.com/u/Michael_DeHaan2)\
**Post date:** [December 10, 2013, 4:51pm UTC](https://forum.ansible.com/t/remount-partitions-and-making-permanent/14101/5 "2013-12-10T16:51:47Z")

</div>

Are you seeing otherwise?
