Networking Forums

Networking Forums > Computer Networking > Linux Networking > NFS problem with cloned hard disks

Reply
Thread Tools Display Modes

NFS problem with cloned hard disks

 
 
Mark Hobley
Guest
Posts: n/a

 
      09-30-2008, 04:29 AM
I have a computer that is attached to my network, and works just fine. I
cloned the hard disk, and installed this on a second computer, changing
the hostname and IP address. This to is on the network. I can telnet it,
and it can ping other stations, etc.

However, when I try to start the NFS client process using:

/etc/init.d/nfs start

I get an error as follows:

statd: Could not chdir: No such file or directory

I did a system trace, and have tracked this down to a difference in
behaviour between the first and second machine.

The system traces are identical up to a certain point.

Here is a section of the trace from the first (working) machine:

access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or
directory)
open("/etc/ld.so.cache", O_RDONLY) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=25907, ...}) = 0
mmap2(NULL, 25907, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb7fda000
close(3) = 0
open("/lib/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@a \1\0004\0\0\0"...,
512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=1192036, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
0) = 0xb7fd9000
mmap2(NULL, 1197520, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3,
0) = 0xb7eb4000
mmap2(0xb7fd3000, 12288, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x11f) = 0xb7fd3000
mmap2(0xb7fd6000, 9680, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xb7fd6000
close(3) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
0) = 0xb7eb3000
set_thread_area({entry_number:-1 -> 6, base_addr:0xb7eb36c0,
limit:1048575, seg_32bit:1, contents:0, read_exec_only:0,
limit_in_pages:1, seg_not_present:0, useable:1}) = 0
mprotect(0xb7fd3000, 8192, PROT_READ) = 0
mprotect(0x8050000, 4096, PROT_READ) = 0
mprotect(0xb7ffb000, 4096, PROT_READ) = 0
munmap(0xb7fda000, 25907) = 0
getrlimit(RLIMIT_NOFILE, {rlim_cur=1024, rlim_max=1024}) = 0
pipe([3, 4]) = 0
clone(child_stack=0,
flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGC HLD,
child_tidptr=0xb7eb3708) = 2953
close(4) = 0
read(3, "\0", 1) = 1
exit_group(0) = ?

On the second machine, I get:

open("/lib/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@a \1\0004\0\0\0"...,
512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=1192036, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
0) = 0xb7fc9000
mmap2(NULL, 1197520, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3,
0) = 0xb7ea4000
mmap2(0xb7fc3000, 12288, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x11f) = 0xb7fc3000
mmap2(0xb7fc6000, 9680, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xb7fc6000
close(3) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
0) = 0xb7ea3000
set_thread_area({entry_number:-1 -> 6, base_addr:0xb7ea36c0,
limit:1048575, seg_32bit:1, contents:0, read_exec_only:0,
limit_in_pages:1, seg_not_present:0, useable:1}) = 0
mprotect(0xb7fc3000, 8192, PROT_READ) = 0
mprotect(0x8050000, 4096, PROT_READ) = 0
mprotect(0xb7feb000, 4096, PROT_READ) = 0
munmap(0xb7fca000, 25907) = 0
getrlimit(RLIMIT_NOFILE, {rlim_cur=1024, rlim_max=1024}) = 0
pipe([3, 4]) = 0
clone(statd: Could not chdir: No such file or directory
child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGC HLD,
child_tidptr=0xb7ea3708) = 3250
--- SIGCHLD (Child exited) @ 0 (0) ---
close(4) = 0
read(3, "", 1) = 0
exit_group(1) = ?

Notice that the clone call gives an error on the second machine.

What directory is is trying to chdir to?

This is a Gentoo based system initially built from stage 1.

Mark.

--
Mark Hobley,
393 Quinton Road West,
Quinton, BIRMINGHAM.
B32 1QE.
 
Reply With Quote
 
 
 
 
Mark Hobley
Guest
Posts: n/a

 
      10-01-2008, 09:27 PM
Maxwell Lol <(E-Mail Removed)> wrote:

> copy the /etc and /usr/lib directories, and do a recursive diff.


The drives were cloned. I will try swapping the drives between the two
machines to see if the problem moves with the drive or stays with the
machine.

> Also - execute
> sh -xv /etc/init.d/nfs start
> (I'm not sure this will reveal anything. It's been a while since I used NFS.).


This tells me:

+ opts=reload
+ restarting=no
+ exportfs=/usr/sbin/exportfs
+ mountd=/usr/sbin/rpc.mountd
+ nfsd=/usr/sbin/rpc.nfsd
+ smnotify=/usr/sbin/sm-notify

However the services do not appear to startup if I use that method.

> Make sure your NFS client has a mount point directory created.


The mount point exists on this machine

> Are you using automount? Or explicit mount configurations?


I am using the mount command as follows:

mount neptune:/volumes/vol3a/ /volumes/vol3a/
statd: Could not chdir: No such file or directory
mount.nfs: rpc.statd is not running but is required for remote locking
Either use "-o nolocks" to keep locks local, or start statd.

Out of interest I tried the -o nolocks option as follows:

mount -o nolocks neptune:/volumes/vol3a/ /volumes/vol3a/
Unsupported nfs mount option: nolocks

> Do you get different results using the NFS client only, or server only?


This is a client machine trying to connect to the server. I have not
configured this machine to run as a server, but I will test this.

> Are you running the port mapper?


The portmapper is running:

rpcinfo -p localhost
program vers proto port
100000 2 tcp 111 portmapper
100000 2 udp 111 portmapper

On the working client:

rpcinfo -p localhost
program vers proto port
100000 2 tcp 111 portmapper
100000 2 udp 111 portmapper
100021 1 tcp 43408 nlockmgr
100021 3 tcp 43408 nlockmgr
100021 4 tcp 43408 nlockmgr
100024 1 udp 34971 status
100024 1 tcp 57430 status

Regards,

Mark.

--
Mark Hobley,
393 Quinton Road West,
Quinton, BIRMINGHAM.
B32 1QE.
 
Reply With Quote
 
Mark Hobley
Guest
Posts: n/a

 
      10-04-2008, 09:48 AM
Mark Hobley <(E-Mail Removed)> wrote:

> I get an error as follows:
>
> statd: Could not chdir: No such file or directory


By using strace -tfv, I managed to identify the cause of this error.
This error occurs because the /var/lib/nfs directory did not exist. I
simply created the directory, and nfs became operational.

Regards,

Mark.

--
Mark Hobley,
393 Quinton Road West,
Quinton, BIRMINGHAM.
B32 1QE.
 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
hide local disks nico Windows Networking 2 07-14-2009 02:21 PM
Boot Problem booting while second hard drive is attached! teflontoad Wireless Internet 1 01-27-2008 12:34 AM
Virgin Media Cloned Modems Gonz Broadband 60 10-16-2007 11:38 AM
How can I recover my RAID Disks? Urgently need help! Chris Windows Networking 2 07-31-2006 07:00 PM
Dynamic Disks TC-Jennifer Windows Networking 2 07-15-2005 04:25 PM



1 2 3 4 5 6 7 8 9 10 11