OpenVZ Forum


Home » Mailing lists » Users » NFS inside VE
NFS inside VE [message #9485] Sat, 06 January 2007 10:55 Go to next message
Alex Prinsier is currently offline  Alex Prinsier
Messages: 16
Registered: January 2007
Junior Member
I'm having trouble getting nfs to work inside a VE.

I think I've set it up correctly... Does anyone see a big mistake in my
configuration here?

# cat /etc/exports
/data 10.1.1.0/24(rw,no_root_squash)

# ps aux (only copied the relevant daemons)
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
daemon 24471 0.0 0.0 3040 452 ? Ss Jan05 0:00 /sbin/portmap
root 7673 0.0 0.0 3640 544 ? Ss Jan05 0:00
/usr/sbin/rpc.nfsd -r
root 7675 0.0 0.0 3096 680 ? S Jan05 0:00
/usr/sbin/rpc.mountd -r

The ip of that machine is 10.1.1.2 (and I'm executing the mount on the
same machine).
# mount 10.1.1.2:/data /mnt
mount: 10.1.1.2:/data failed, reason given by server: Permission denied

I get these lines in syslog:
Jan 6 10:49:03 fs mountd[7675]: NFS mount of /data attempted from 10.1.1.2
Jan 6 10:49:03 fs mountd[7675]: Unauthorized access by NFS client
10.1.1.2.
Jan 6 10:49:03 fs mountd[7675]: Blocked attempt of 10.1.1.2 to mount /data

# rpcinfo -p 10.1.1.2
program vers proto port
100000 2 tcp 111 portmapper
100000 2 udp 111 portmapper
100003 2 udp 2049 nfs
100003 2 tcp 2049 nfs
100005 1 udp 644 mountd
100005 2 udp 644 mountd
100005 1 tcp 647 mountd
100005 2 tcp 647 mountd

Here is an strace of the mount:
# strace mount 10.1.1.2:/data /mnt
execve("/bin/mount", ["mount", "10.1.1.2:/data", "/mnt"], [/* 11 vars
*/]) = 0
uname({sys="Linux", node="fs.internal.ejibe.net", ...}) = 0
brk(0) = 0x856d000
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS,
-1, 0) = 0xb7fed000
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or
directory)
open("/etc/ld.so.preload", O_RDONLY) = -1 ENOENT (No such file or
directory)
open("/etc/ld.so.cache", O_RDONLY) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=7889, ...}) = 0
old_mmap(NULL, 7889, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb7feb000
close(3) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or
directory)
open("/lib/libblkid.so.1", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0P\35\0\000"...,
512) = 512
fstat64(3, {st_mode=S_IFREG|0644, st_size=27548, ...}) = 0
old_mmap(NULL, 26520, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0xcef000
old_mmap(0xcf5000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3,
0x6000) = 0xcf5000
close(3) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or
directory)
open("/lib/libuuid.so.1", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\240\f\0"...,
512) = 512
fstat64(3, {st_mode=S_IFREG|0644, st_size=9232, ...}) = 0
old_mmap(NULL, 12260, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x217000
old_mmap(0x219000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3,
0x1000) = 0x219000
close(3) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or
directory)
open("/lib/tls/libc.so.6", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0`Z\1\000"...,
512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=1254660, ...}) = 0
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS,
-1, 0) = 0xb7fea000
old_mmap(NULL, 1264972, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x21a000
old_mmap(0x344000, 36864, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED,
3, 0x129000) = 0x344000
old_mmap(0x34d000, 7500, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x34d000
close(3) = 0
set_thread_area({entry_number:-1 -> 6, base_addr:0xb7fea860,
limit:1048575, seg_32bit:1, contents:0, read_exec_only:0,
limit_in_pages:1, seg_not_present:0, useable:1}) = 0
munmap(0xb7feb000, 7889) = 0
brk(0) = 0x856d000
brk(0x858e000) = 0x858e000
brk(0) = 0x858e000
umask(022) = 022
open("/dev/null", O_RDWR|O_LARGEFILE) = 3
close(3) = 0
getuid32() = 0
geteuid32() = 0
getgid32() = 0
getgid32() = 0
prctl(0x3, 0x20, 0x856d030, 0xcf5658, 0xcf5658) = 1
open("/etc/blkid.tab", O_RDONLY) = -1 ENOENT (No such file or
directory)
getuid32() = 0
geteuid32() = 0
lstat64("/etc/mtab", {st_mode=S_IFLNK|0777, st_size=12, ...}) = 0
stat64("10.1.1.2:/data", 0xbffa0df0) = -1 ENOENT (No such file or
directory)
stat64("/sbin/mount.nfs", 0xbffa0c60) = -1 ENOENT (No such file or
directory)
uname({sys="Linux", node="fs.internal.ejibe.net", ...}) = 0
time(NULL) = 1168080828
socket(PF_INET, SOCK_STREAM, IPPROTO_TCP) = 3
getpid() = 14303
bind(3, {sa_family=AF_INET, sin_port=htons(911),
sin_addr=inet_addr("0.0.0.0")}, 16) = 0
connect(3, {sa_family=AF_INET, sin_port=htons(111),
sin_addr=inet_addr("10.1.1.2")}, 16) = 0
gettimeofday({1168080828, 691188}, NULL) = 0
write(3, "\200\0\0(\0236\212\302\0\0\0\0\0\0\0\2\0\1\206\240\0\0"...,
44) = 44
poll([{fd=3, events=POLLIN, revents=POLLIN}], 1, 60000) = 1
read(3, "\200\0\0\274\0236\212\302\0\0\0\1\0\0\0\0\0\0\0\0\0\0\0"...,
500) = 192
close(3) = 0
socket(PF_INET, SOCK_DGRAM, IPPROTO_UDP) = 3
bind(3, {sa_family=AF_INET, sin_port=htons(912),
sin_addr=inet_addr("0.0.0.0")}, 16) = 0
ioctl(3, FIONBIO, [1]) = 0
setsockopt(3, SOL_IP, IP_RECVERR, [1], 4) = 0
uname({sys="Linux", node="fs.internal.ejibe.net", ...}) = 0
geteuid32() = 0
getegid32() = 0
getgroups32(32, [0]) = 1
gettimeofday({1168080828, 693409}, NULL) = 0
sendto(3, "1\202\312\204\0\0\0\0\0\0\0\2\0\1\206\245\0\0\0\2\0\0\0"...,
100, 0, {sa_family=AF_INET, sin_port=htons(644),
sin_addr=inet_addr("10.1.1.2")}, 16) = 100
poll([{fd=3, events=POLLIN, revents=POLLIN}], 1, 3000) = 1
recvfrom(3,
"1\202\312\204\0\0\0\1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 8800, 0,
{sa_family=AF_INET, sin_port=htons(644),
sin_addr=inet_addr("10.1.1.2")}, [16]) = 28
write(2, "mount: 10.1.1.2:/data failed, re"..., 72mount: 10.1.1.2:/data
failed, reason given by server: Permission denied
) = 72
close(3) = 0
close(3) = -1 EBADF (Bad file descriptor)
exit_group(32) = ?
Re: NFS inside VE [message #9559 is a reply to message #9485] Tue, 09 January 2007 23:22 Go to previous messageGo to next message
efball is currently offline  efball
Messages: 41
Registered: September 2006
Location: Santa Rosa, California
Member
I'm having NFS problems also. I'm trying to import, not export.
I don't need NFS exports.

portmap starts OK, but netfs does not:

# /etc/init.d/netfs start
Mounting other filesystems: mount: none already mounted or /dev/pts busy
mount: according to mtab, devpts is already mounted on /dev/pts
[FAILED]

Do NFS mounts work?
I have not touched the /etc/fstab file:

# cat /etc/fstab
none /dev/pts devpts rw 0 0


------------------------------------------------------------ --------

Alex: Are you running nfslock?


On Sat, Jan 06, 2007 at 11:55:21AM +0100, Alex Prinsier wrote:
> I'm having trouble getting nfs to work inside a VE.
>
> I think I've set it up correctly... Does anyone see a big mistake in my
> configuration here?
>
> # cat /etc/exports
> /data 10.1.1.0/24(rw,no_root_squash)
>
> # ps aux (only copied the relevant daemons)
> USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
> daemon 24471 0.0 0.0 3040 452 ? Ss Jan05 0:00 /sbin/portmap
> root 7673 0.0 0.0 3640 544 ? Ss Jan05 0:00
> /usr/sbin/rpc.nfsd -r
> root 7675 0.0 0.0 3096 680 ? S Jan05 0:00
> /usr/sbin/rpc.mountd -r
>
> The ip of that machine is 10.1.1.2 (and I'm executing the mount on the
> same machine).
> # mount 10.1.1.2:/data /mnt
> mount: 10.1.1.2:/data failed, reason given by server: Permission denied
>
> I get these lines in syslog:
> Jan 6 10:49:03 fs mountd[7675]: NFS mount of /data attempted from 10.1.1.2
> Jan 6 10:49:03 fs mountd[7675]: Unauthorized access by NFS client
> 10.1.1.2.
> Jan 6 10:49:03 fs mountd[7675]: Blocked attempt of 10.1.1.2 to mount /data
>
> # rpcinfo -p 10.1.1.2
> program vers proto port
> 100000 2 tcp 111 portmapper
> 100000 2 udp 111 portmapper
> 100003 2 udp 2049 nfs
> 100003 2 tcp 2049 nfs
> 100005 1 udp 644 mountd
> 100005 2 udp 644 mountd
> 100005 1 tcp 647 mountd
> 100005 2 tcp 647 mountd

--

E Frank Ball efball@efball.com
Re: NFS inside VE [message #9560 is a reply to message #9559] Tue, 09 January 2007 23:27 Go to previous message
Alex Prinsier is currently offline  Alex Prinsier
Messages: 16
Registered: January 2007
Junior Member
No i wasn't running any locking daemon, simply because the user space
nfs server doesn't support it.

Actually my issue has been resolved, the wiki sais that I need kernel
028test006 or higher (and I have a somewhat older kernel).

I suggest you try what the wiki says: http://wiki.openvz.org/NFS

Alex

E Frank Ball wrote:
> I'm having NFS problems also. I'm trying to import, not export.
> I don't need NFS exports.
>
> portmap starts OK, but netfs does not:
>
> # /etc/init.d/netfs start
> Mounting other filesystems: mount: none already mounted or /dev/pts busy
> mount: according to mtab, devpts is already mounted on /dev/pts
> [FAILED]
>
> Do NFS mounts work?
> I have not touched the /etc/fstab file:
>
> # cat /etc/fstab
> none /dev/pts devpts rw 0 0
>
>
> ------------------------------------------------------------ --------
>
> Alex: Are you running nfslock?
>
>
> On Sat, Jan 06, 2007 at 11:55:21AM +0100, Alex Prinsier wrote:
> > I'm having trouble getting nfs to work inside a VE.
> >
> > I think I've set it up correctly... Does anyone see a big mistake in my
> > configuration here?
> >
> > # cat /etc/exports
> > /data 10.1.1.0/24(rw,no_root_squash)
> >
> > # ps aux (only copied the relevant daemons)
> > USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
> > daemon 24471 0.0 0.0 3040 452 ? Ss Jan05 0:00 /sbin/portmap
> > root 7673 0.0 0.0 3640 544 ? Ss Jan05 0:00
> > /usr/sbin/rpc.nfsd -r
> > root 7675 0.0 0.0 3096 680 ? S Jan05 0:00
> > /usr/sbin/rpc.mountd -r
> >
> > The ip of that machine is 10.1.1.2 (and I'm executing the mount on the
> > same machine).
> > # mount 10.1.1.2:/data /mnt
> > mount: 10.1.1.2:/data failed, reason given by server: Permission denied
> >
> > I get these lines in syslog:
> > Jan 6 10:49:03 fs mountd[7675]: NFS mount of /data attempted from 10.1.1.2
> > Jan 6 10:49:03 fs mountd[7675]: Unauthorized access by NFS client
> > 10.1.1.2.
> > Jan 6 10:49:03 fs mountd[7675]: Blocked attempt of 10.1.1.2 to mount /data
> >
> > # rpcinfo -p 10.1.1.2
> > program vers proto port
> > 100000 2 tcp 111 portmapper
> > 100000 2 udp 111 portmapper
> > 100003 2 udp 2049 nfs
> > 100003 2 tcp 2049 nfs
> > 100005 1 udp 644 mountd
> > 100005 2 udp 644 mountd
> > 100005 1 tcp 647 mountd
> > 100005 2 tcp 647 mountd
>
Previous Topic: Warning about resource shortage
Next Topic: OpenVZ hosting RedHat Enterprise Linux, up2date.
Goto Forum:
  


Current Time: Tue Mar 19 11:14:53 GMT 2024

Total time taken to generate the page: 0.02592 seconds