1 |
Am Sonntag, 29. Juni 2014, 21:34:07 schrieb Alexander Puchmayr: |
2 |
> Hi there, |
3 |
> |
4 |
> After upgrading my server to latest stable release of gentoo, none of my |
5 |
> clients is able to mount any nfs share from the server anymore. |
6 |
> |
7 |
> Symptoms: |
8 |
> $ mount -v -t nfs poseidon:/datadisk/ /mnt/gentoo/ |
9 |
> mount.nfs: timeout set for Sun Jun 29 19:33:40 2014 |
10 |
> mount.nfs: trying text-based options |
11 |
> 'vers=4,addr=192.168.1.6,clientaddr=192.168.1.2' |
12 |
> mount.nfs: mount(2): Protocol not supported |
13 |
> mount.nfs: trying text-based options 'addr=192.168.1.6' |
14 |
> mount.nfs: prog 100003, trying vers=3, prot=6 |
15 |
> mount.nfs: trying 192.168.1.6 prog 100003 vers 3 prot TCP port 2049 |
16 |
> mount.nfs: prog 100005, trying vers=3, prot=17 |
17 |
> mount.nfs: trying 192.168.1.6 prog 100005 vers 3 prot UDP port 60058 |
18 |
> mount.nfs: mount(2): Stale NFS file handle |
19 |
> mount.nfs: trying text-based options |
20 |
> 'vers=4,addr=192.168.1.6,clientaddr=192.168.1.2' |
21 |
> mount.nfs: mount(2): Protocol not supported |
22 |
> mount.nfs: trying text-based options 'addr=192.168.1.6' |
23 |
> mount.nfs: prog 100003, trying vers=3, prot=6 |
24 |
> mount.nfs: trying 192.168.1.6 prog 100003 vers 3 prot TCP port 2049 |
25 |
> mount.nfs: prog 100005, trying vers=3, prot=17 |
26 |
> mount.nfs: trying 192.168.1.6 prog 100005 vers 3 prot UDP port 60058 |
27 |
> mount.nfs: mount(2): Stale NFS file handle |
28 |
> [...] |
29 |
> mount.nfs: Connection timed out |
30 |
> $ |
31 |
> |
32 |
[...] |
33 |
|
34 |
The important hint I finally found after searching for hours: |
35 |
> http://www.mmacleod.ca/blog/2014/02/nfs-exports-and-xfss-inode64-mount-option/ |
36 |
Thanks to the guy who wrote it! |
37 |
|
38 |
The key is that |
39 |
* I'm exporting more than one different (sub-)directories on the same filesystem |
40 |
* For some reason it gets confused with the uuid/fsid; Can't find the page |
41 |
where I found that anymore :-( |
42 |
* the actual device the exported filesystem resides on is /dev/md127 and not |
43 |
/dev/md0 as I originally wanted. Since I did not regard the number, I ignored |
44 |
this fact, but I also found hints that this might cause the problem of the |
45 |
previous point. |
46 |
|
47 |
The suggested solution was to add a *unique* fsid=xx entry to the exports file |
48 |
for each directory exported, so that it looks like: |
49 |
|
50 |
/etc/exports: |
51 |
/datadisk/music 192.168.1.0/24(rw,no_subtree_check,fsid=1) |
52 |
/datadisk/video 192.168.1.0/24(rw,no_subtree_check,fsid=2) |
53 |
/datadisk/backup 192.168.1.0/24(ro,no_subtree_check,fsid=3) |
54 |
... |
55 |
|
56 |
If the same fsid is used more than once then the first directory with this fsid |
57 |
will be mounted! So using *different* fsids for each exported directory is |
58 |
essential!!! |
59 |
|
60 |
So, my NFS works now as it should! |
61 |
|
62 |
Thanks to all who spent a thought on it! |
63 |
|
64 |
Alex |