Mount with nfs4 in openSuse 11.2

I’m currently running a product which requires remote drive to be mounted (both are linux machines and openSuse 11.2).

I’m using the command: mount IP:/DRIVE /DRIVE -t nfs -o intr,hard to mount my remote drive and it is working succesfully.

But there is some functionality which can be run only using nfs4 and not nfs (as given in the mount command above).

I’m not able to mount using the command above, giving an option of nfs4. i.e.,
mount IP:/DRIVE /DRIVE -t nfs4 -o intr,hard (is not working for me)

I issued modprobe nfs4 on my machines and it is available for use.

What can be the command in openSuse 11.2 to mount a drive using nfs4? I also need to use HARD,INTERRUPTIBLE mount (i.e., i need to use intr and hard in the mount commandas well… this is a requirement for my product to work).

I appreciate your quick replies to resolve my issue.

Many thanks in advance…

I tried to help you two days ago on the thread Hard Interruptible Mount on openSuse 11.2 - openSUSE Forums

It now seems that you use the parameters I suggested in your mount. Does this mean that what I told you was of any help? When no, why did you not report in the thread that you still had problems/questions?. When yes, why did you not report in the thread that my answer was of some use?

On both cases other people having the same sort of problem and stumbling into this thread later, would have a more complete story before their very eyes.

You also seem to think that I am not interested if my answers are of any use. But I am. I try to help people like you and I want to know if my answers are usefull, so I can help others in the future.

It would be nice if you tried to comunicate in these Forums, and not only get something, but also give something.

Sir, I do appreciate your helping attitude and I don’t mean any disrespect for not posting the reply for the previous post you are mentioning.

I did replied to that earlier post you were mentioning with an answer.

Sorry for any inconvenience caused.

The earlier post which you were mentioning was for hard, interruptible mount for which I had posted an answer.

Now I still have problems in configuring the NFS server for nfsv4 and getting it to work.

I’ve got 2 Client machines and 1 server machine (all 2 machines being openSuse 11.2) and I want to configure access the remote directory in the server accessible to both the client machines.

What is the procedure to do that? I do appreciate your reply. Thanks in advance…

Ok, I did give a last answer to you other post with some extra information. I thought it might help, when you already understood this correctly, forget about it.

Back to the nfs4 problem. The *-t nfs4 *option should work (also my theory). When you say that

mount -t nfs4 -o intr,hard server-ip:/exported-dir /mount-point

is not working, do you get any error message when you mount or is there no error message and do you nevertheless have no access to the data, or is just some functionality missing, and what is missing then?

Please be more descriptive in what you see. Our lack of crystal balls makes that we can not look over your shoulder.

The mount command with nfsv4 command works but when I display the mounted directory, it is empty.

I saw some posts on it and it looks like some server/client configuration is required to make NFSv4 work.

The steps which I saw in some posts are too confusing for me to act upon (since I’m a developer and got into Linux Admin recently because I required this skill).

Can you suggest some easy steps to make NFSv4 work? Appreciate your reply…

You say you found information you do not quite understand. How am I supposed to help you here when you do not even point me to that information so I can read and try to interprete?

In any case I did some searching for nfs4 on this forums myself. I have an idea, but for this you must stop playing hide and seek and give the mount statement exactly as you use it, no DRIVE, etc substitutes. And put it between CODE tags (slect and use the # button above), so we can see real computer text with real white space.

Second question, You are not managing the server, are you? so we all hope that the server is configured correct, because we can not look/change anyhing there. Is that correct?

Alright… So the case here is that I had to manage the server and client both myself. I had to configure everything from scratch for my POC (proof of concept which I am working on currently)

On the Client side, I used YaST configuration tool and chose Network Services -> NFS Client and chose the server (IP addr), remote drive and also the local mount point where it needs to get mounted. I also have checked the NFSv4 box to be used.

Then when I go to the command prompt in the Client side and enter mount /MQHA, it mounts but the directory is empty.

I also tried the command:
mount -t nfs4 -o intr,hard,rw 192.168.32.130:/ /MQHA (I used only slash for the server and not the complete folder path as this is suggested by many forums).

This command also mounts the remote directory, but it is basically empty.

On the Server side, I started the NFS server with the command, /etc/init.d/nfsserver start
NOTE:- /etc/exports has an entry as follows:
/MQHA *(rw)

When you used YaST to configure, YaST does make an entry in /etc/fstab, it should do the mount also. No need to do that yourself. In fact when you do that yourself a new mount is done over the old one.

Until now you only told about the mount you did by hand and you told nothing about YaST and the /etc/fstab entry. Indeed your interpretation of the nfs4 export-root (or how it is called) is same as mine. Use 192.168.32.130:/ and not 192.168.32.130:/MQHA. Again a new fact you did not mention before (you only talked about DRIVE). Please in the future keep to the truth, the truth and nothing but the truth. And copy/past computer code her AND put that between CODE tags like:

mount -t nfs4 -o intr,hard,rw 192.168.32.130:/ /MQHA

Now post (by copy/paste and between CODE tags) the contents of /etc/fstab:

cat /etc/fstab

and do

umount /MQHA

and repeat that until it says that there is not such a thing mounted. I hope that by doing this we reach a defined situation.
Then do

mount

and post the output (in the now well known manner) here.

I was now able to mount the drive with nfs4 and access it from the client. But i’ve got another issue, which is discussed below:

What I exactly require:-

On the NFS server side there is a shared drive called /MQHA (which has 2 sub-directories called logs and qmgrs). Permissions are mqm:mqm (mqm user and mqm group)

I have 2 Client machines and got /MQHA drive in both of the machines (with same UID and GID as the server and permissions mqm:mqm)

Now, real data is stored in the server side /MQHA and is exported to the clients using NFSv4 to be able to write to it (using locks so that only one client can write to the drive at any one time and the other will be in standby state)

My Configuration:

On the Server side:-
Yast Configuration tool:
Directories to export:- I have the following
/exports *(fsid=0,crossmnt,rw,no_root_squash,sync,no_subtree_check)

/exports/logs *(rw,no_root_squash,sync,no_subtree_check,bind=/MQHA/logs)

/exports/qmgrs *(rw,no_root_squash,sync,no_subtree_check,bind=/MQHA/qmgrs)

and clicked Finish.

On the Client side:

I did:-
mount -t nfs4 192.168.32.130:/ /MQHA

And this is mounting the drive but i am able to write to it because of permissions error.

When I displayed ls -lhs on /MQHA (client side) I do not have mqm:mqm but instead
drwxr-xr-x 4 4294967294 4294967294 4096 2010-01-21 09:00 MQHA

What can I do to have the permissions set to mqm:mqm even after exporting my data from the server side?

Thank you and I appreciate your reply…