# Problems mounting nfs share

## Rachmannn

I have two Linux machines GentooPC and RedHatPC. The RedHatPC has mounted a nfs share on an Alpha Server running OpenVMS using nfs version 2. I dont want to make changes on this machine.

I want to mount this share on GentooPC but get an error: 

```
mount -t nfs pldnt1:/pldnt1/telegram /mnt/telegram -o ro

mount: cannot mount block device pldnt1:/pldnt1/telegram read-only
```

The /etc/fstab on RedHatPC contains: 

```
pldnt1:/pldnt1/telegram /mnt/telegram           nfs     hard,rw,nfsvers=2       0 0
```

and I have no problems mounting the share here.

I added the same line to the GentooPC but mount -a fails with the message:

```
mount -a

mount: block device pldnt1:/pldnt1/telegram is write-protected, mounting read-only

mount: cannot mount block device pldnt1:/pldnt1/telegram read-only
```

The share is NOT write protected

starting portmap with the options -d and -v yields a lot of output:

```
portmap -d -v

server: about do a switch

portmap[23839]: connect from 127.0.0.1 to unset(nlockmgr)

server: about do a switch

portmap[23840]: connect from 127.0.0.1 to unset(nlockmgr)

server: about do a switch

portmap[23841]: connect from 127.0.0.1 to unset(nlockmgr)

server: about do a switch

portmap[23842]: connect from 127.0.0.1 to set(nlockmgr)

server: about do a switch

portmap[23843]: connect from 127.0.0.1 to set(nlockmgr)

server: about do a switch

portmap[23844]: connect from 127.0.0.1 to set(nlockmgr)

server: about do a switch

portmap[23845]: connect from 127.0.0.1 to set(nlockmgr)

server: about do a switch

portmap[23846]: connect from 127.0.0.1 to set(nlockmgr)

server: about do a switch

portmap[23847]: connect from 127.0.0.1 to set(nlockmgr)

server: about do a switch

portmap[23849]: connect from 127.0.0.1 to unset(nlockmgr)

server: about do a switch

...

...  and more

...

server: about do a switch

portmap[23885]: connect from 127.0.0.1 to set(nlockmgr)

server: about do a switch

portmap[23886]: connect from 127.0.0.1 to set(nlockmgr)

server: about do a switch

portmap[23888]: connect from 127.0.0.1 to unset(nlockmgr)

server: about do a switch

portmap[23889]: connect from 127.0.0.1 to unset(nlockmgr)

server: about do a switch

portmap[23890]: connect from 127.0.0.1 to unset(nlockmgr)
```

Here is the nfsstat-output.

```
Client rpc stats:

calls      retrans    authrefrsh

46         0          0

Client nfs v2:

null       getattr    setattr    root       lookup     readlink

0       0% 14     100% 0       0% 0       0% 0       0% 0       0%

read       wrcache    write      create     remove     rename

0       0% 0       0% 0       0% 0       0% 0       0% 0       0%

link       symlink    mkdir      rmdir      readdir    fsstat

0       0% 0       0% 0       0% 0       0% 0       0% 0       0%

Client nfs v3:

null       getattr    setattr    lookup     access     readlink

0       0% 6      50% 0       0% 0       0% 0       0% 0       0%

read       write      create     mkdir      symlink    mknod

0       0% 0       0% 0       0% 0       0% 0       0% 0       0%

remove     rmdir      rename     link       readdir    readdirplus

0       0% 0       0% 0       0% 0       0% 0       0% 0       0%

fsstat     fsinfo     pathconf   commit

0       0% 6      50% 0       0% 0       0%
```

The kernel versions are different:

RedHatPC - 2.4 - 

GentooPC - linux-2.6.16-gentoo-r7

and there might be other differencies as well.

----------

## quinn_jones

The share might not be read-only to the account,  but in your first example you're mounting it read-only: "-o ro".  Is that what your fstab reads as well?  What happens if you try to mount it without the "-o ro"?

----------

## mtascii

why don't you just put the read only in the /etc/exports from the server.

thats the easier way i would say

like i did.

```
gentoobox ~ # cat /etc/exports

# /etc/exports: NFS file systems being exported.  See exports(5).

/home/ascii/bt/ascii/musik 192.168.0.5(async,no_subtree_check,ro)

/data 192.168.0.5(async,no_subtree_check,rw)

```

----------

