Skip to content

M #-: Create NFS mount point#231

Open
ArnauGabrielAtienza wants to merge 1 commit into
OpenNebula:masterfrom
ArnauGabrielAtienza:nfs_path_fix
Open

M #-: Create NFS mount point#231
ArnauGabrielAtienza wants to merge 1 commit into
OpenNebula:masterfrom
ArnauGabrielAtienza:nfs_path_fix

Conversation

@ArnauGabrielAtienza

Copy link
Copy Markdown
Contributor

Create the target directory for NFS if it doesn't exist

Signed-off-by: ArnauGabrielAtienza <agabriel@opennebula.io>

@sk4zuzu sk4zuzu left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this really required ? I think mount module creates destination directories https://github.com/ansible-collections/ansible.posix/blob/main/plugins/modules/mount.py#L913-L936, no? 🤔

Also normally datastores dir is owned by oneadmin and not root, I'm not sure what are the implications.

$ stat /var/lib/one/datastores/
  File: /var/lib/one/datastores/
  Size: 4096      	Blocks: 8          IO Block: 4096   directory
Device: 253,1	Inode: 280749      Links: 4
Access: (0750/drwxr-x---)  Uid: ( 9869/oneadmin)   Gid: ( 9869/oneadmin)

@ArnauGabrielAtienza

ArnauGabrielAtienza commented Jun 16, 2026

Copy link
Copy Markdown
Contributor Author

We recently faced an issue with an inventory like the following where we needed to create the path manually before running the playbook:

fstab:
      - src: "192.168.115.100:/home/aux_tmp"
        path: /mnt/datastore_shared_nfs
        fstype: nfs
        opts: _netdev,async,rw,soft,intr,vers=4.1,nconnect=8,rsize=1048576,wsize=1048576,timeo=600,retrans=2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants