ovirt-site icon indicating copy to clipboard operation
ovirt-site copied to clipboard

[docs] Manual test for nfs "definitively test" under permission is not working

Open abhisheksahnii opened this issue 6 years ago • 3 comments

Description of the problem

I am having issues while adding NFS export from EMC VNX device to ovirt-engine as it is showing permission issue. So referring to troubleshoot doc i.e.

  • https://www.ovirt.org/documentation/how-to/troubleshooting/troubleshooting-nfs-storage-issues/

The easiest way to definitively test that an NFS export is ready for use by oVirt is to:

-Create the vdsm user with uid 36 on the ovirt-engine host if it does not already exist. -Change to the vdsm user using su - vdsm -s /bin/bash -Attempt to mount the export on a temporary directory (for example, /tmpmnt) using the following command form: /usr/bin/sudo -n /bin/mount -t nfs -o soft,nosharecache,timeo=600,retrans=6,nfsvers=3 servername:/path/of/export /tmpmnt -If the mount succeeds, then try to create a file in it via the touch command, i.e. touch /tmpmnt/tempfile

I am getting below error:

sudo: a password is required

Steps to reproduce

su - vdsm -s /bin/bash

Last login: Mon Jul 2 10:33:48 IST 2018 on pts/0 nodectl must be run as root! nodectl must be run as root!

-bash-4.2$ mkdir test -bash-4.2$ /usr/bin/sudo -n /bin/mount -t nfs -o soft,nosharecache,timeo=600,retrans=6,nfsvers=3 192.168.1.10:/nfstest test/ sudo: a password is required

abhisheksahnii avatar Jul 06 '18 10:07 abhisheksahnii

this documentation hasn't been updated in years and is probably unreliable

gregsheremeta avatar Jul 06 '18 13:07 gregsheremeta

Hey Greg,

I used the below steps as a workaround.

WORKAROUND:

visudo

vdsm ALL=(ALL) NOPASSWD: ALL <--- Append and save.

Then below started working,

/usr/bin/sudo -n /bin/mount -t nfs -o soft,nosharecache,timeo=600,retrans=6,nfsvers=3 servername:/path/of/export /tmpmnt

Later on, I removed that temporary entry from sudoers.

abhisheksahnii avatar Jul 09 '18 09:07 abhisheksahnii

Page moved to https://www.ovirt.org/develop/troubleshooting-nfs-storage-issues.html

The content reported not working is still there.

@nirs , @shenitzky , @vjuranek , @tnisan can you please handle?

sandrobonazzola avatar Oct 12 '20 09:10 sandrobonazzola