Gentoo Archives: gentoo-user

From: Josh Helmer <joshhelmer@×××.net>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] mount nfs thru mount system call
Date: Wed, 08 Mar 2006 22:42:46
Message-Id: 200603081537.14744.joshhelmer@cox.net
In Reply to: Re: [gentoo-user] mount nfs thru mount system call by Darryl Wagoner
1 On Wednesday 08 March 2006 22:04, Darryl Wagoner wrote:
2 > On 3/8/06, Josh Helmer <joshhelmer@×××.net> wrote:
3 > > man 2 mount is not going to help. If you had looked closer you would
4 > > realize
5 > > that the "data" argument is the last argument not the filesystem
6 > > type. The
7 > > man page only says that the data argument is "typically" a comma
8 > > separated string. I don't believe that is the case with NFS.
9 >
10 > Why not? I would try something like for data:
11 >
12 > rsize=8192,wsize=8192,soft. Check nfs(5) for details.
13
14 OK... I did some googling...
15
16 Source: http://www.die.net/doc/linux/man/man8/mount.8.html
17
18 """
19 Instead of a textual option string, parsed by the kernel, the nfs file system
20 expects a binary argument of type struct nfs_mount_data. The program mount
21 itself parses the following options of the form `tag=value', and puts them in
22 the structure mentioned: rsize=n, wsize=n, timeo=n, retrans=n, acregmin=n,
23 acregmax=n, acdirmin=n, acdirmax=n, actimeo=n, retry=n, port=n, mountport=n,
24 mounthost=name, mountprog=n, mountvers=n, nfsprog=n, nfsvers=n, namlen=n. The
25 option addr=n is accepted but ignored. Also the following Boolean options,
26 possibly preceded by no are recognized: bg, fg, soft, hard, intr, posix, cto,
27 ac, tcp, udp, lock. For details, see nfs(5).
28 """
29
30 I would still recommend looking into the mount source code. If I remember
31 correctly, there is more to it than just creating a struct and populating it.
32 I seem to recall that I also had to do something to register the remote
33 export with the local machine. I vaguely remember fighting to have to get
34 something to show up in /proc before I could successfully mount a filesystem.
35
36 Josh
37 --
38 gentoo-user@g.o mailing list