Author Topic: NFS file sharing by PCC GUI on KDE 2012.02  (Read 1599 times)

Offline rekabe

  • Full Member
  • ***
  • Posts: 107
  • /Universe/SolarSystem/Earth/Jamaica
NFS file sharing by PCC GUI on KDE 2012.02
« on: March 04, 2012, 12:47:07 PM »
Still having problems setting  up NFS file sharing via the PCC GUI.
The directory on the server is seen by my client machine but cannot be mounted.
If I use my KDE 2010 live CD everything works fine. Things just not working out on the later KDE editions.
This topic was been raised before but I am still stumped.
« Last Edit: March 05, 2012, 03:33:17 PM by rekabe »

Offline yodelu

  • PCLinuxOS Tester
  • Sr. Member
  • *******
  • Posts: 317
Re: NFS file sharing by PCC GUI on KDE 2012.02
« Reply #1 on: March 04, 2012, 11:22:03 PM »
please post here what rpcinfo -p says on server machine

Offline Just17

  • PCLinuxOS Tester
  • Super Villain
  • *******
  • Posts: 10628
  • MLUs Forever!
Re: NFS file sharing by PCC GUI on KDE 2012.02
« Reply #2 on: March 05, 2012, 07:30:36 AM »
I have found that the Search finds a share ......  and locates it using the PC 'name'.

I have had to edit the resultant fstab entry to change the name to the IP address of the server before it can be mounted.

After that all works as expected.
MLUs rule the roost!

Linux XPS 3.2.18-pclos2.pae.bfs  32 bit
Intel Core2 Quad CPU Q9450 @ 2.66GHz
4 GB RAM
MCP51 High Def Audio
GeForce GTX 550 Ti
PHILIPS  ‎DVD+-RW DVD8701
‎Logitech ‎BT Mini-Receiver
Afatech DTT

Offline AS

  • Hero Member
  • *****
  • Posts: 4111
  • Have a nice ... night!
Re: NFS file sharing by PCC GUI on KDE 2012.02
« Reply #3 on: March 05, 2012, 08:10:37 AM »
I have found that the Search finds a share ......  and locates it using the PC 'name'.

I have had to edit the resultant fstab entry to change the name to the IP address of the server before it can be mounted.

After that all works as expected.

Is the 'name' listed in /etc/hosts ?

Offline Just17

  • PCLinuxOS Tester
  • Super Villain
  • *******
  • Posts: 10628
  • MLUs Forever!
Re: NFS file sharing by PCC GUI on KDE 2012.02
« Reply #4 on: March 05, 2012, 08:17:35 AM »
I have found that the Search finds a share ......  and locates it using the PC 'name'.

I have had to edit the resultant fstab entry to change the name to the IP address of the server before it can be mounted.

After that all works as expected.

Is the 'name' listed in /etc/hosts ?

Yes I manually added it (on the server) to see if it would overcome the problem.
« Last Edit: March 05, 2012, 08:19:16 AM by Just18 »
MLUs rule the roost!

Linux XPS 3.2.18-pclos2.pae.bfs  32 bit
Intel Core2 Quad CPU Q9450 @ 2.66GHz
4 GB RAM
MCP51 High Def Audio
GeForce GTX 550 Ti
PHILIPS  ‎DVD+-RW DVD8701
‎Logitech ‎BT Mini-Receiver
Afatech DTT

Offline rekabe

  • Full Member
  • ***
  • Posts: 107
  • /Universe/SolarSystem/Earth/Jamaica
Re: NFS file sharing by PCC GUI on KDE 2012.02
« Reply #5 on: March 05, 2012, 03:35:11 PM »
Will check as soon as I reach home AS.

Thanks.

Offline gezza

  • Hero Member
  • *****
  • Posts: 513
Re: NFS file sharing by PCC GUI on KDE 2012.02
« Reply #6 on: March 09, 2012, 03:36:49 AM »
Hi,
I have had this problem and have solved it by doing the following:-
1...have a hosts table on all machines.
2...make sure that in pcc you have set all the networking files up, rpcbind,nfs-server,nfs-common,nfsfs, and all nfs bits between.
3...do not untick --nofirewall,since this disables all local networking.
4...still in pcc, -local disks- make sure you share the hard disk partitions.
5...most machines should have static addresses except for laptops. In all hosts files though the addresses and names must be supplied.
following these 5 steps gives me nfs sharing with no problems.
Gezza

Offline yodelu

  • PCLinuxOS Tester
  • Sr. Member
  • *******
  • Posts: 317
Re: NFS file sharing by PCC GUI on KDE 2012.02
« Reply #7 on: March 10, 2012, 12:46:23 AM »
5...most machines should have static addresses
Yep.. that's the way linux works:
1 for a static ip DNS name is provided by hosts file
2 for a dynamic ip DNS is provided by DHCP (and in most cases is provided by your home router)

of course case 2 is the big problem here (i mean with lsnetdrake)
So let's dig in ... :) i'll put my router (TP-LINK 841ND) in this example
the router use the latest original firmware (which is not DDWRT or OPENWRT)
so in dynamic mode the router give to my pc an ip and a DNS name like this
192.168.0.5 for ip and 192-168-0-5.rds.ro for DNS and here the problem is started
lsnetdrake --nfs found a share on 192-168-0-5.rds.ro and try to mount that share with errors because the name  192-168-0-5.rds.ro cannot be resolved by router (or ping)
the problem persist even if you specify a different name in /etc/sysconfig/network HOSTNAME=xxx.yyy or in /etc/sysconfig/network-scripts/ifcfg-ethx DHCP_HOSTNAME=<hostname>
So, in a way, the problem is related to lsnetdrake that should try to mount an ip not a name

The sollution could be :
1 Modify the script in lsnetdrake to resolve problem related before - i don't know how
2 Use a configurable secondary DNS (eg dnsmasq) in LAN enviroment
For method 2 i will wait for a requested dnsmasq update to test its behaviour in my LAN    
  
« Last Edit: March 11, 2012, 09:06:14 AM by yodelu »

Offline yodelu

  • PCLinuxOS Tester
  • Sr. Member
  • *******
  • Posts: 317
Re: NFS file sharing by PCC GUI on KDE 2012.02
« Reply #8 on: March 23, 2012, 03:53:09 AM »
ok i'm back with the news
first of all thx for dnsmasq update added in pclos repo
just tested and it works like a charm  in my lan enviroment but unfortunately the sollution for nfs server is a bite complicated and.. fail  if the computer wich run dnsmasq is stopped . So another workaround must be done here 

i will tell you a little "how to get NFS work 99,99%"

the default values that i found on my pclos kde:
in /etc/sysconfig/nfs-server
RPCMOUNTD_OPTIONS="--port 4003"
RPCRQUOTAD_OPTIONS="--port 4004"
 in /etc/sysconfig/nfs-common
STATD_OPTIONS="--port 4001"
LOCKD_TCPPORT=4002
LOCKD_UDPPORT=4002
 

..and now let's patch..

ON SERVER SIDE:

1.  in /etc/sysconfig/nfs-server, replace RPCMOUNTD_OPTIONS="--port 4003" with RPCMOUNTD_OPTIONS="--no-nfs-version 2 --port 4003"
2.  in /etc/rc.d/init.d/nfs-common replace

   # Set the ports lockd should listen on
   if [ -n "$LOCKD_TCPPORT" ]; then
       /sbin/sysctl -w fs.nfs.nlm_tcpport=$LOCKD_TCPPORT >/dev/null 2>&1
   fi
   if [ -n "$LOCKD_UDPPORT" ]; then
       /sbin/sysctl -w fs.nfs.nlm_udpport=$LOCKD_UDPPORT >/dev/null 2>&1
   fi

with

  # Set the ports lockd should listen on
      if [ -n "$LOCKD_TCPPORT" -o -n "$LOCKD_UDPPORT" ]; then
        [ -x /sbin/modprobe ] && /sbin/modprobe lockd $LOCKDARG
        [ -n "$LOCKD_TCPPORT" ] && \
            /sbin/sysctl -w fs.nfs.nlm_tcpport=$LOCKD_TCPPORT >/dev/null 2>&1
        [ -n "$LOCKD_UDPPORT" ] && \
            /sbin/sysctl -w fs.nfs.nlm_udpport=$LOCKD_UDPPORT >/dev/null 2>&1
       fi

reboot server
run rpcinfo -p and see if mountd, nlockmgr and status binds the ports specified above
                                       portmapper and nfs should bind 111 and 2049 ports
if all is ok on server side then create a NFS share  via GUI interface

ON THE CLIENT SIDE
Here we have to do just one thing:
Replace (modify)  in /usr/lib/libDrakX/fs/remote.pm like this:

sub server_to_string {
    my ($_class, $server) = @_;
    $server->{name} || $server->{ip}; 

with

sub server_to_string {
    my ($_class, $server) = @_;
    $server->{ip};

now the $dev will always be an ip not a name assigned by DHCP server..
Save  then open PCC and try to found and mount via GUI interface any NFS share that you have defined in ON SERVER SIDE 

tested in two LAN  (different DHCP servers) enviroments with success
hope will work for you too  :)

Offline Crow

  • Hero Member
  • *****
  • Posts: 8758
  • OBJECTS IN MIRROR... ARE LOSING
Re: NFS file sharing by PCC GUI on KDE 2012.02
« Reply #9 on: April 07, 2012, 01:09:36 PM »
Sadly my server side looks very different, nfs configuration through PCC has been broken for years now I hope your collaboration helps to solve it
I shall pass this way but once;
any good therefore that I can do,
or any kindness that I can show
let me not defer nor neglect it,
for I shall not pass this way again.

Linux User #330412

Offline yodelu

  • PCLinuxOS Tester
  • Sr. Member
  • *******
  • Posts: 317
Re: NFS file sharing by PCC GUI on KDE 2012.02
« Reply #10 on: April 08, 2012, 01:11:35 AM »
if you just want another GUI for configuring NFS server just install webmin package (no matter from synaptic or rpm package from http://www.webmin.com/)
and after you have installed webmin just go to https://localhost:10000/ or https://127.0.0.1:10000/ or https://localhost.localdomain:10000/ or.. you got the point  :)
here navigate to Networking>NFS Exports

Offline Crow

  • Hero Member
  • *****
  • Posts: 8758
  • OBJECTS IN MIRROR... ARE LOSING
Re: NFS file sharing by PCC GUI on KDE 2012.02
« Reply #11 on: April 08, 2012, 06:34:56 PM »
Will try that yodelu, thank you  :)
I shall pass this way but once;
any good therefore that I can do,
or any kindness that I can show
let me not defer nor neglect it,
for I shall not pass this way again.

Linux User #330412