LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 11-19-2010, 03:28 AM   #1
agambier
LQ Newbie
 
Registered: Nov 2010
Location: Annecy, France
Distribution: Fedora 13
Posts: 22

Rep: Reputation: 2
nfs cache -> don't see new file in some folders


Hi,

I'm using an embedded linux with a TX25 starterkit board.

To start, this board proceeds as below :

1. connect to my PC to download the kernel (using a ftp connection).
2. uncompress the kernel and start it.
3. connect to my pc to mount the root file system using nfs.
4. start the system.

Everything works fine, except that I noticed there's maybe a nfs cache issue.

for example, if a program run on the board creates a file in /home, I can see it from my PC (nfs server). => perfect !
But if a program creates a file in /var/lib/dpkg/, I can see it from the board but not from my PC, so when I restart the board everything is lost.

It seems to be a bad configuration.
I tried to restart the nfs and nfslock services.

here is my /etc/eports file.
Code:
/tftpboot/rootfs_tx25   192.168.1.188(rw,no_root_squash,sync)
I tried to use async.

Any ideas ?

thanks
Alex
 
Old 11-20-2010, 03:36 PM   #2
sag47
Senior Member
 
Registered: Sep 2009
Location: Raleigh, NC
Distribution: Ubuntu, PopOS, Raspbian
Posts: 1,899
Blog Entries: 36

Rep: Reputation: 477Reputation: 477Reputation: 477Reputation: 477Reputation: 477
Could it be an ACL issue? I was dealing with that on a server yesterday where I had the root of the fs limited to the users home directory.

Symbolic linking didn't show up because the link went outside the users home directory. In the end I fixed it by modifying group permissions via the chown command.

Maybe the user you're using to create the file in /var/lib/dpkg/ does not have the access rights on the nfs server to sync it.

Last edited by sag47; 11-20-2010 at 03:37 PM.
 
Old 11-22-2010, 03:05 AM   #3
agambier
LQ Newbie
 
Registered: Nov 2010
Location: Annecy, France
Distribution: Fedora 13
Posts: 22

Original Poster
Rep: Reputation: 2
Quote:
Originally Posted by sag47 View Post
Could it be an ACL issue?
I don't think so because the TX25 board mount the nfs directory as its root directory. On my NFS server the directory /tftpboot/rootfs_tx25 is the / directory of the TX25 board.

When a user, on the TX25 board, wants to write a file in /home he writes in /tftpboot/rootfs_tx25/home and when we wants to write to /var/lib/dpkg he write to /tftpboot/rootfs_tx25/var/lib/dpkg.

As I export only /tftpboot/rootfs_tx25 the rights should be the same for /tftpboot/rootfs_tx25/home and /tftpboot/rootfs_tx25/var/lib/dpkg.

And I use the root user on the TX25 board. It seems that all the modifications made is /var/lib/dpkg (/tftpboot/rootfs_tx25//var/lib/dpkg) are made in RAM but never flushed on the server disk.
 
Old 11-22-2010, 08:11 AM   #4
agambier
LQ Newbie
 
Registered: Nov 2010
Location: Annecy, France
Distribution: Fedora 13
Posts: 22

Original Poster
Rep: Reputation: 2
by using the command df, i realized that /var is mounted as tmpfs...
 
Old 11-22-2010, 02:19 PM   #5
sag47
Senior Member
 
Registered: Sep 2009
Location: Raleigh, NC
Distribution: Ubuntu, PopOS, Raspbian
Posts: 1,899
Blog Entries: 36

Rep: Reputation: 477Reputation: 477Reputation: 477Reputation: 477Reputation: 477
Check the owner and permissions on the files created in /home...

Then you can check the permissions where it's trying to write to. It still depends how you set up your nfs server and the permissions the server has on parts of the system.

tmpfs doesn't matter only that it is wiped upon restart.

Last edited by sag47; 11-22-2010 at 02:21 PM.
 
Old 11-23-2010, 01:19 AM   #6
agambier
LQ Newbie
 
Registered: Nov 2010
Location: Annecy, France
Distribution: Fedora 13
Posts: 22

Original Poster
Rep: Reputation: 2
the permissions are exactly the same (drwxrwxr-x) for /tftpboot/rootfs_tx25/var/lib/dpkg and /tftpboot/rootfs_tx25/home.
same user, same group.
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Some folders not being shared in NFS austinramsay Solaris / OpenSolaris 2 11-02-2010 03:27 AM
NFS Cache DaveQB Linux - Networking 2 11-16-2009 07:59 PM
cache and socket folders in .kde tidiman07 Ubuntu 0 10-29-2006 10:19 PM
Cache nfs files locally? BrianK Linux - Networking 0 05-11-2006 06:02 PM
Does NFS client cache? Sonny Linux - General 1 02-06-2002 12:18 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 04:11 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration