Re: [FIX] Re: CFS - Portmap

2001-03-23 Thread Martin Blapp


This should made cfs working again, please test the patch.
 
http://home.teleport.ch/freebsd/mount_nfs.c.diff
 
Martin

Martin Blapp, [EMAIL PROTECTED]

Improware AG, UNIX solution and service provider
Zurlindenstrasse 29, 4133 Pratteln, Switzerland
Phone: +41 79 370 26 05, Fax: +41 61 826 93 01




To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: [FIX] Re: CFS - Portmap

2001-03-23 Thread Andrey A. Chernov

On Fri, Mar 23, 2001 at 19:35:33 +0100, Martin Blapp wrote:
 
 This should made cfs working again, please test the patch.
  
 http://home.teleport.ch/freebsd/mount_nfs.c.diff

No, but bad effects are changed. There is no error diagnostic happens but
mount hangs forever instead (I try several times). I run rpcbind without
any additional keys. When mount terminated by ^C various interesting
effects happens. Sometimes this hanging process visible in by ps
nfs -o noauto -o intr -o port=3049 -o nfsv2 localhost
even after ^C. Sometimes directory shown as really mounted (!) after ^C
and umount works for it too.

-- 
Andrey A. Chernov
http://ache.pp.ru/

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: [FIX] Re: CFS - Portmap

2001-03-23 Thread David O'Brien

On Fri, Mar 23, 2001 at 12:49:33AM +0100, Martin Blapp wrote:
 /etc/mount -o port=3049,intr localhost:/null /crypt

What machine are you doing this on??  FreeBSD has no /etc/mount?
 
-- 
-- David  ([EMAIL PROTECTED])
  GNU is Not Unix / Linux Is Not UniX

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: [FIX] Re: CFS - Portmap

2001-03-23 Thread Martin Blapp


Hi,

  /etc/mount -o port=3049,intr localhost:/null /crypt
 
 What machine are you doing this on??  FreeBSD has no /etc/mount?

Correct. I've used the sbin/mount of course, this is just a cut'n'paste
of the documentation.

Martin


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



[FIX] Re: CFS - Portmap

2001-03-22 Thread Martin Blapp


It seems you have to run rpcbind with -i flag:

-i  ``insecure'' mode.  Allows calls to SET and UNSET from an 
host. Normally rpcbind accepts these requests only from the
loopback interface for security reasons.  This change is necessary for
programs that were compiled with earlier versions of the rpc
library and do not make those requests using the loopback
interface.

# mount_nfs -o port=3049,intr localhost:/null /crypt
root@fuchur:~# mount
/dev/da0s2a on / (ufs, NFS exported, local, soft-updates)
devfs on /dev (devfs, local)
/dev/vinum/vol/vinum0 on /usr (ufs, NFS exported, local, soft-updates)
/dev/da0s2e on /var (ufs, local, soft-updates)
procfs on /proc (procfs, local)
linprocfs on /usr/compat/linux/proc (linprocfs, local)
localhost:/null on /crypt (nfs)

Martin

Martin Blapp, [EMAIL PROTECTED]

Improware AG, UNIX solution and service provider
Zurlindenstrasse 29, 4133 Pratteln, Switzerland
Phone: +41 79 370 26 05, Fax: +41 61 826 93 01


On Thu, 22 Mar 2001, Martin Blapp wrote:

 
 If you have not recompiled cfs, does starting the rpcbind with -L
 fix this ? Old binarys resist to work without this option.
 
 from rpcbind man-page:
 
 Allow old-style local connections over the loopback interface.
 Without this flag, local connections are only allowed over a
 local socket, /var/run/rpcbind.sock
 
 Martin
 
 Martin Blapp, [EMAIL PROTECTED]
 
 Improware AG, UNIX solution and service provider
 Zurlindenstrasse 29, 4133 Pratteln, Switzerland
 Phone: +41 79 370 26 05, Fax: +41 61 826 93 01
 
 
 


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: [FIX] Re: CFS - Portmap

2001-03-22 Thread Andrey A. Chernov

On Thu, Mar 22, 2001 at 23:07:08 +0100, Martin Blapp wrote:
 
 It seems you have to run rpcbind with -i flag:
 

-i not helps too. Diagnostic is the same.

 
 # mount_nfs -o port=3049,intr localhost:/null /crypt


You miss "nfsv2" switch here. mountd is running with -2 option too.

To make testing easy, put this into /etc/fstab:

localhost:/null  /crypt nfs rw,noauto,intr,port=3049,nfsv2 0 0

Then all you need is "mount /crypt"

-- 
Andrey A. Chernov
http://ache.pp.ru/

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: [FIX] Re: CFS - Portmap

2001-03-22 Thread Martin Blapp


Hmm ?

# /usr/local/etc/rc.d/cfsd.sh stop
# killall mountd
# killall -SIGUSR1 nfsd
# killall rpcbind

# rpcinfo
rpcinfo: can't contact rpcbind: RPC: Remote system error - Connection refused

# rpcbind -i
# mountd -2
# nfsd
# /usr/local/etc/rc.d/cfsd.sh start
# mount_nfs -o port=3049,intr,nfsv2 localhost:/null /crypt
# mount

[...]

localhost:/null on /crypt (nfs)
# umount -v /crypt
# localhost:/null: unmount from /crypt

Martin

Martin Blapp, [EMAIL PROTECTED]

Improware AG, UNIX solution and service provider
Zurlindenstrasse 29, 4133 Pratteln, Switzerland
Phone: +41 79 370 26 05, Fax: +41 61 826 93 01


On Fri, 23 Mar 2001, Andrey A. Chernov wrote:

 On Thu, Mar 22, 2001 at 23:07:08 +0100, Martin Blapp wrote:
  
  It seems you have to run rpcbind with -i flag:
  
 
 -i not helps too. Diagnostic is the same.
 
  
  # mount_nfs -o port=3049,intr localhost:/null /crypt
 
 
 You miss "nfsv2" switch here. mountd is running with -2 option too.
 
 To make testing easy, put this into /etc/fstab:
 
 localhost:/null  /crypt nfs rw,noauto,intr,port=3049,nfsv2 0 0
 
 Then all you need is "mount /crypt"
 
 -- 
 Andrey A. Chernov
 http://ache.pp.ru/
 


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: [FIX] Re: CFS - Portmap

2001-03-22 Thread Andrey A. Chernov

On Thu, Mar 22, 2001 at 23:32:53 +0100, Martin Blapp wrote:

 # nfsd

^

Not start nfsd - it is unneded for cfs, cfs handle all calls by itself.
At least it works without any nfsd previously.


-- 
Andrey A. Chernov
http://ache.pp.ru/

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: [FIX] Re: CFS - Portmap

2001-03-22 Thread Martin Blapp


Without nfsd it doesn't work, right.

Yes, this seems to be the problem. I'll go into source of cfs now and fix
the problem. Or maybe a mount_nfs problem ?

Martin

Martin Blapp, [EMAIL PROTECTED]

Improware AG, UNIX solution and service provider
Zurlindenstrasse 29, 4133 Pratteln, Switzerland
Phone: +41 79 370 26 05, Fax: +41 61 826 93 01


On Fri, 23 Mar 2001, Andrey A. Chernov wrote:

 On Thu, Mar 22, 2001 at 23:32:53 +0100, Martin Blapp wrote:
 
  # nfsd
 
 ^
 
 Not start nfsd - it is unneded for cfs, cfs handle all calls by itself.
 At least it works without any nfsd previously.
 
 
 -- 
 Andrey A. Chernov
 http://ache.pp.ru/
 


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: [FIX] Re: CFS - Portmap

2001-03-22 Thread Andrey A. Chernov

On Fri, Mar 23, 2001 at 01:35:12 +0300, Andrey A. Chernov wrote:
 On Thu, Mar 22, 2001 at 23:32:53 +0100, Martin Blapp wrote:
 
  # nfsd
 
 ^
 
 Not start nfsd - it is unneded for cfs, cfs handle all calls by itself.
 At least it works without any nfsd previously.

I.e. you have success because mount the directory to regular NFS handled 
by nfsd, not to CFS.

-- 
Andrey A. Chernov
http://ache.pp.ru/

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: [FIX] Re: CFS - Portmap

2001-03-22 Thread Martin Blapp


Hmm, look at this:

# mount /crypt
mount_nfs: rpcbind on server: RPC: Program not registered

rpcbind debug output:
PMAP_GETPORT req for (13, 2, udp) from 127.0.0.1.3.18 :port = 0

nfs is prgramm 13

For some strange reason there is a request for nfs.

Martin


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: [FIX] Re: CFS - Portmap

2001-03-22 Thread Martin Blapp


Hi,

I see, seems that (port==2049? nc : NULL) has changed in some way.
I'll fix that.

PS: let's change to private discussion and not cc current anymore.

Martin

Martin Blapp, [EMAIL PROTECTED]

Improware AG, UNIX solution and service provider
Zurlindenstrasse 29, 4133 Pratteln, Switzerland
Phone: +41 79 370 26 05, Fax: +41 61 826 93 01



To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: [FIX] Re: CFS - Portmap

2001-03-22 Thread Alfred Perlstein

* Martin Blapp [EMAIL PROTECTED] [010322 15:00] wrote:
 
 Hi,
 
 I see, seems that (port==2049? nc : NULL) has changed in some way.
 I'll fix that.
 
 PS: let's change to private discussion and not cc current anymore.

Please don't, I'd like to understand what's going on here.

There's also a chance someone will jump in with the answer you're
looking for.

-- 
-Alfred Perlstein - [[EMAIL PROTECTED]|[EMAIL PROTECTED]]
Daemon News Magazine in your snail-mail! http://magazine.daemonnews.org/

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: [FIX] Re: CFS - Portmap

2001-03-22 Thread Martin Blapp


Ok,

here is what I found:

notes.ms, line 228

If your system does not support NFS mounts on ports other
than 2049, add -DCFS_PORT=2049; you will not be able to simultaneously
run the target system as an NFS server under this configuration.

cfs.h:#define CFS_PORT 2049
nfsproto.h:#define  NFS_PORT 2049
nfsproto.x:const NFS_PORT  = 2049

and then this code here:

if (!svc_reg(tp, NFS_PROGRAM, NFS_VERSION, nfs_program_2,
   (port==2049? nc : NULL))) {
 fprintf(stderr,"Can't register CFS NFS\n");
exit(1);
}

Cause the 5. argument (const char *nettype nc) is NULL in our case,
svc_reg does not register cfs within rpcbind.

If you compile with -DCFS_PORT=2049, cfs works as normal.

I'm only thinking what is the right thing to do ...

Martin

Martin Blapp, [EMAIL PROTECTED]

Improware AG, UNIX solution and service provider
Zurlindenstrasse 29, 4133 Pratteln, Switzerland
Phone: +41 79 370 26 05, Fax: +41 61 826 93 01


On Thu, 22 Mar 2001, Alfred Perlstein wrote:

 * Martin Blapp [EMAIL PROTECTED] [010322 15:00] wrote:
  
  Hi,
  
  I see, seems that (port==2049? nc : NULL) has changed in some way.
  I'll fix that.
  
  PS: let's change to private discussion and not cc current anymore.
 
 Please don't, I'd like to understand what's going on here.
 
 There's also a chance someone will jump in with the answer you're
 looking for.
 
 -- 
 -Alfred Perlstein - [[EMAIL PROTECTED]|[EMAIL PROTECTED]]
 Daemon News Magazine in your snail-mail! http://magazine.daemonnews.org/
 


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: [FIX] Re: CFS - Portmap

2001-03-22 Thread Andrey A. Chernov

On Fri, Mar 23, 2001 at 00:33:28 +0100, Martin Blapp wrote:
 
 
 If you compile with -DCFS_PORT=2049, cfs works as normal.
 

It sounds like in that case it is impossible to run nfsd and cfsd at the
same machine, i.e. does cfs disallows nfs? 

BTW, why it works before?

-- 
Andrey A. Chernov
http://ache.pp.ru/

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: [FIX] Re: CFS - Portmap

2001-03-22 Thread Peter Wemm

Martin Blapp wrote:
 
 Ok,
 
 here is what I found:
 
 notes.ms, line 228
 
 If your system does not support NFS mounts on ports other
 than 2049, add -DCFS_PORT=2049; you will not be able to simultaneously
 run the target system as an NFS server under this configuration.
 
 cfs.h:#define CFS_PORT 2049
 nfsproto.h:#define  NFS_PORT 2049
 nfsproto.x:const NFS_PORT  = 2049
 
 and then this code here:
 
 if (!svc_reg(tp, NFS_PROGRAM, NFS_VERSION, nfs_program_2,
(port==2049? nc : NULL))) {
  fprintf(stderr,"Can't register CFS NFS\n");
 exit(1);
 }
 
 Cause the 5. argument (const char *nettype nc) is NULL in our case,
 svc_reg does not register cfs within rpcbind.
 
 If you compile with -DCFS_PORT=2049, cfs works as normal.
 
 I'm only thinking what is the right thing to do ...

Maybe it is ok as a short term workaround.

Breaking nfs from working on user defined ports is a step backwards and
should be fixed.  Lots of people run nfsd and cfsd at the same time.

 Martin
 
 Martin Blapp, [EMAIL PROTECTED]
 
 Improware AG, UNIX solution and service provider
 Zurlindenstrasse 29, 4133 Pratteln, Switzerland
 Phone: +41 79 370 26 05, Fax: +41 61 826 93 01
 
 
 On Thu, 22 Mar 2001, Alfred Perlstein wrote:
 
  * Martin Blapp [EMAIL PROTECTED] [010322 15:00] wrote:
   
   Hi,
   
   I see, seems that (port==2049? nc : NULL) has changed in some way.
   I'll fix that.
   
   PS: let's change to private discussion and not cc current anymore.
  
  Please don't, I'd like to understand what's going on here.
  
  There's also a chance someone will jump in with the answer you're
  looking for.
  
  -- 
  -Alfred Perlstein - [[EMAIL PROTECTED]|[EMAIL PROTECTED]]
  Daemon News Magazine in your snail-mail! http://magazine.daemonnews.org/
  
 
 
 To Unsubscribe: send mail to [EMAIL PROTECTED]
 with "unsubscribe freebsd-current" in the body of the message
 

Cheers,
-Peter
--
Peter Wemm - [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED]
"All of this is for nothing if we don't go to the stars" - JMS/B5


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: [FIX] Re: CFS - Portmap

2001-03-22 Thread Martin Blapp


 Breaking nfs from working on user defined ports is a step backwards and
 should be fixed.  Lots of people run nfsd and cfsd at the same time.

No, you understand me wrong, the way this is done is bogus. If you set
-DCFS_PORT=3049 like it is done at the moment and use nc instead of NULL
it works. To have a NULL nc entry is not correct in tirpc.

/etc/mount -o port=3049,intr localhost:/null /crypt

Works here if I remove this check.

Martin


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: [FIX] Re: CFS - Portmap

2001-03-22 Thread Andrey A. Chernov

On Fri, Mar 23, 2001 at 00:49:33 +0100, Martin Blapp wrote:
 
  Breaking nfs from working on user defined ports is a step backwards and
  should be fixed.  Lots of people run nfsd and cfsd at the same time.
 
 No, you understand me wrong, the way this is done is bogus. If you set
 -DCFS_PORT=3049 like it is done at the moment and use nc instead of NULL
 it works. To have a NULL nc entry is not correct in tirpc.

So the question is: why cfsd attempts to register with NULL netconfig for
ports != 2049? What it wants to obtain by such move?

-- 
Andrey A. Chernov
http://ache.pp.ru/

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: [FIX] Re: CFS - Portmap

2001-03-22 Thread Martin Blapp


I'm fixing now the code ... We have to use now Solaris code part and
add #if defined(__FreeBSD__) || defined (__SOLARIS2X__) ifdef's and also
fill out this:

/* Assign the local bind address and type of service */
tp-xp_ltaddr = tres-addr;
tp-xp_type = tinfo.servtype;
tp-xp_rtaddr.len = 0;
tp-xp_rtaddr.maxlen = tres-addr.maxlen;
tp-xp_netid = strdup(nc-nc_netid);
tp-xp_tp = strdup(nc-nc_device);

Then we can use it again. Fix is on the way, just have pation.

Martin


Martin Blapp, [EMAIL PROTECTED]

Improware AG, UNIX solution and service provider
Zurlindenstrasse 29, 4133 Pratteln, Switzerland
Phone: +41 79 370 26 05, Fax: +41 61 826 93 01





To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: [FIX] Re: CFS - Portmap

2001-03-22 Thread Martin Blapp


I'll go to bed now.

It's not cfsd which does this. My update of mount_nfs (and syncing
source with NetBSD) broke this. I'll change mount_nfs so this works
again. There is no need for mount_nfs to register nfs within rpcbind
if port=0.

Sorry that this last so long to detect.

Martin

Martin Blapp, [EMAIL PROTECTED]

Improware AG, UNIX solution and service provider
Zurlindenstrasse 29, 4133 Pratteln, Switzerland
Phone: +41 79 370 26 05, Fax: +41 61 826 93 01



To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message