# Issues with ansible file system mount.

**URL:** <https://forum.ansible.com/t/issues-with-ansible-file-system-mount/31398>\
**Category:** Ansible Project\
**Created:** [September 30, 2019, 11:55pm UTC](https://forum.ansible.com/t/issues-with-ansible-file-system-mount/31398 "2019-09-30T23:55:39Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Karthick\_Thanigaiman](https://avatars.discourse-cdn.com/v4/letter/k/aca169/32.png) [@Karthick\_Thanigaiman](https://forum.ansible.com/u/Karthick_Thanigaiman)\
**Post date:** [September 30, 2019, 11:55pm UTC](https://forum.ansible.com/t/issues-with-ansible-file-system-mount/31398/1 "2019-09-30T23:55:39Z")

</div>

Hi,

We are having an issue with one of our components where in the file system says not available even though the device is available (via Ansible).

The instance is spinned up and via ansible we set the facts like

- set\_fact:  
device: /dev/nvme2n1  
when: nvmedev.stat.exists == True  
Then attach / mount the volumes as (e.g. vol-a) using

- name: Attach the existing cold summaries volume if it is found  
ec2\_vol:  
id: “{{ ec2\_vol\_data\_cold\_summaries.volumes[0].id }}”  
instance: “{{ ansible\_ec2\_instance\_identity\_document\_instanceid }}”  
device\_name: “/dev/xvdf”  
region: “{{ ansible\_ec2\_instance\_identity\_document\_region }}”  
when: ec2\_vol\_data\_cold\_summaries.volumes|length \> 0

mount:  
path: /var/cold\_summaries  
src: “{{ device }}”  
fstype: ext4  
state: mounted  
opts: noatime  
We get the error as below:

TASK [indexer : Mount the volume] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
fatal: [localhost]: FAILED! =\> {“changed”: false, “msg”: “Error mounting /var/cold\_summaries: mount: special device /dev/nvme2n1 does not exist\n”}

NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT  
nvme0n1 259:1 0 4G 0 disk  
└─nvme0n1p1 259:2 0 4G 0 part /  
nvme1n1 259:0 0 50G 0 disk /opt/  
nvme2n1 259:3 0 16T 0 disk

and when I manually mount using mount devicename filesystemname (as below) it works fine.

mount /dev/nvme2n1 /var/cold\_summaries

Ansible version details are as below:

ansible 2.8.5  
config file = None  
configured module search path = [u’/root/.ansible/plugins/modules’, u’/usr/share/ansible/plugins/modules’]  
ansible python module location = /usr/lib/python2.7/site-packages/ansible  
executable location = /bin/ansible

Could you please let us know if there are any recent changes that is causing this issue. Please note that this used to work fine before.

Thank you.

Regards  
Karthick
