Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
NFS mounting problems
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
Dreadfull2007
n00b
n00b


Joined: 28 Feb 2007
Posts: 54

PostPosted: Sun Mar 11, 2007 9:44 pm    Post subject: NFS mounting problems Reply with quote

hi, i googled and searched this forum for about half an hour and didn't manage to solve the problem so i decided to finally ask here.
the problem is i can't mount /proc from server #2 over NFS so after chrooting it should use the /proc from server #2 not the one from server #1

/etc/exports from server #2:
Code:

/ xxx.xxx.xxx.xxx(async,no_subtree_check,no_root_squash,sync,rw)


/etc/conf.d/nfs from server #2:
Code:

# /etc/conf.d/nfs

# If you wish to set the port numbers for lockd,
# please see /etc/sysctl.conf

# Number of servers to be started up by default
RPCNFSDCOUNT=8
# Options to pass to rpc.mountd
# ex. RPCMOUNTDOPTS="-p 32767
RPCMOUNTDOPTS="-p 4002"
# Options to pass to rpc.statd
# ex. RPCSTATDOPTS="-p 32765 -o 32766"
RPCSTATDOPTS="-p 4000"


suppose i mount on server 1 /mnt/server2 over NFS then i see /mnt/server2/proc empty, i also tryied adding "nohide" option to /etc/exports but useless

the idea is that /mnt/server2/proc should be the /proc from server2 so i can use it when i chroot /mnt/server2 /bin/bash, instead all my attempts went to mainly two results: 1) got /proc empty ; 2) got local /proc (from server1 instead of server2)

any ideas ?
any help appreciated, thanks.
Back to top
View user's profile Send private message
IQgryn
l33t
l33t


Joined: 05 Sep 2005
Posts: 764
Location: WI, USA

PostPosted: Mon Mar 12, 2007 6:16 am    Post subject: Reply with quote

Two things:
  1. /proc is a special filesystem, which should never be mounted from a remote machine. All your process information, among other things, would be completely off. Why do you want to do this?
  2. By default, NFS does not export filesystems mounted inside the filesystem being exported. For example, if you have /home as a separate partition from / on the server, you would need to share both / and /home to allow a client machine to see both as they were on the server.
Back to top
View user's profile Send private message
Dreadfull2007
n00b
n00b


Joined: 28 Feb 2007
Posts: 54

PostPosted: Mon Mar 12, 2007 7:54 am    Post subject: Reply with quote

i know i shouldn't but it won't be any security problem
ok so i should have
Code:

/ xxx.xxx.xxx.xxx(async,no_subtree_check,no_root_squash,sync,rw)
/proc xxx.xxx.xxx.xxx(async,no_subtree_check,no_root_squash,sync,rw)

in my /etc/exports ? and on the other server will i need to mount twice ?
Back to top
View user's profile Send private message
IQgryn
l33t
l33t


Joined: 05 Sep 2005
Posts: 764
Location: WI, USA

PostPosted: Mon Mar 12, 2007 4:45 pm    Post subject: Reply with quote

That looks like it will mount, and you will have to mount twice.

I wasn't saying there was a security problem; I'm saying that you may crash both systems. The proc filesystem is not designed to be mounted from a remote machine, and you may have very big problems if you try that. What are you trying to accomplish by doing that? There is probably a better way.
Back to top
View user's profile Send private message
Dreadfull2007
n00b
n00b


Joined: 28 Feb 2007
Posts: 54

PostPosted: Thu Mar 15, 2007 10:01 pm    Post subject: Reply with quote

remote commands from one server to other ones ...
also tried rexec but couldn't start it :|
don't know any other ways.
Back to top
View user's profile Send private message
IQgryn
l33t
l33t


Joined: 05 Sep 2005
Posts: 764
Location: WI, USA

PostPosted: Thu Mar 15, 2007 10:22 pm    Post subject: Reply with quote

Do you mean executing a command on server a but triggering it from server b, or migrating processes from one server to another? Will this be done automatically? manually? both?
Back to top
View user's profile Send private message
Dreadfull2007
n00b
n00b


Joined: 28 Feb 2007
Posts: 54

PostPosted: Sat Mar 17, 2007 9:02 pm    Post subject: Reply with quote

server A should have the ability to execute commands (start/stop processes / write files / get various info from /proc etc) on server B
manual, not auto
Back to top
View user's profile Send private message
IQgryn
l33t
l33t


Joined: 05 Sep 2005
Posts: 764
Location: WI, USA

PostPosted: Sat Mar 17, 2007 9:25 pm    Post subject: Reply with quote

It sounds like something ssh could do just fine. Perhaps you'd want to use screen as well, so you could logout but leave the commands running. Have you tried this? If so, what problems did you have?
Back to top
View user's profile Send private message
dev-urandom
Apprentice
Apprentice


Joined: 24 Jun 2005
Posts: 260
Location: Huh?

PostPosted: Sun Mar 18, 2007 1:50 pm    Post subject: Reply with quote

IQgryn wrote:
It sounds like something ssh could do just fine. Perhaps you'd want to use screen as well, so you could logout but leave the commands running. Have you tried this? If so, what problems did you have?


I second this. Use ssh with key-based authentication setup so that ssh B from A doesn't need a password. Afterwards,
Code:
ssh B your_command


Edit: I forgot to mention the security problems that usually arise from this, make sure that you read the documents carefully before trying it out.
_________________
/earth: file system full.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum