PDA

Archiv verlassen und diese Seite im Standarddesign anzeigen : NFS unter openSuSE 10.2



NECRO25
08.07.07, 10:20
Hallo alle zusammen,

Ich habe ein Problem mit meinem NFS-Server bzw. NFS-Client.
Bei der Einrichtung des Clients in YaST kam folgende Fehlermeldung:


Fehler

Die NFS Verzeichnisse, die in der Datei /etc/fstab
eingetragen sind, konnten nicht eingehangen (gemounted)
werden.

Der Firewall Port ist offen, Die Zugriffsoptionen stimmen auch überein, manuell lassen sich die Verzeichnisse auch nicht einbinden.
Es will einfach nicht gehen ! :mad:

Bitte um Hilfe !

Viele Grüße
Necro25

drcux
08.07.07, 10:36
nen paar mehr Infos würden schon helfen...

NECRO25
08.07.07, 11:21
Hallo drcux

Server Konfiguration:

Zu exportierende Verzeichnisse:

/NFS/
/NFS/Musik/

Rechner-Platzhalter Optionen

* rw,sync
192.168.*:* rw,sync
*.site rw,sync

Client Konfiguration:

Konfiguration des NFS-Client

Server Entferntes Dateisystem Mountpoint Optionen

TUX25 /NFS /media rw,sync

Der Client findet beim Suchen nach NFS-Servern keinen Computer.

Viele Grüße
NECRO25

corax2.05
08.07.07, 11:54
nach meiner erfahrung ist yast bei der nfs erstellung manchmal etwas zickig, sowohl bei server als auch beim client (beim client aber eher).

bei mir half meistens ein neustart von server oder client, ggf. auch von beiden.

vielleicht hilft es ja, viel glück.

kreol
08.07.07, 11:57
Um der besseren Lesbarkeit willen poste die massgeblichen Dateien doch bitte im Wortlaut, unter Verwendung der code-Tags aus meiner Signatur. Also
Vom Server:
cat /etc/exports
cat /etc/hosts.deny
cat /etc/hosts.allow
rpcinfo -p

Am client:
cat /etc/fstab
cat /etc/hosts
ping -c3 ip.des.nfs.servers
ping -c3 hostname_des_servers
rpcinfo -pDie NFS-Freigabe mal händisch mounten und Systemmeldungen bitte auch im Wortlaut hierher posten.


Kreol

NECRO25
08.07.07, 12:40
Hallo kreol

Server:

Ausgabe von cat /etc/exports :

admin@TUX25:~> cat /etc/exports
/NFS/Musik/ *(rw,async)
/NFS/Musik/ 192.168.*.*(rw,async)
/NFS/Musik/ *.site(rw,async)


Ausgabe von cat /etc/hosts.deny :

admin@TUX25:~> cat /etc/hosts.deny
# /etc/hosts.deny
# See 'man tcpd' and 'man 5 hosts_access' as well as /etc/hosts.allow
# for a detailed description.

http-rman : ALL EXCEPT LOCAL



Ausgabe von cat /etc/hosts.allow :

admin@TUX25:~> cat /etc/hosts.allow
# /etc/hosts.allow
# See 'man tcpd' and 'man 5 hosts_access' for a detailed description
# of /etc/hosts.allow and /etc/hosts.deny.
#
# short overview about daemons and servers that are built with
# tcp_wrappers support:
#
# package name | daemon path | token
# ----------------------------------------------------------------------------
# ssh, openssh | /usr/sbin/sshd | sshd, sshd-fwd-x11, sshd-fwd-<port>
# quota | /usr/sbin/rpc.rquotad | rquotad
# tftpd | /usr/sbin/in.tftpd | in.tftpd
# portmap | /sbin/portmap | portmap
# The portmapper does not verify against hostnames
# to prevent hangs. It only checks non-local addresses.
#
# (kernel nfs server)
# nfs-utils | /usr/sbin/rpc.mountd | mountd
# nfs-utils | /sbin/rpc.statd | statd
#
# (unfsd, userspace nfs server)
# nfs-server | /usr/sbin/rpc.mountd | rpc.mountd
# nfs-server | /usr/sbin/rpc.ugidd | rpc.ugidd
#
# (printing services)
# lprng | /usr/sbin/lpd | lpd
# cups | /usr/sbin/cupsd | cupsd
# The cupsd server daemon reports to the cups
# error logs, not to the syslog(3) facility.
#
# (Uniterrupted Power Supply Software)
# apcupsd | /sbin/apcupsd | apcupsd
# apcupsd | /sbin/apcnisd | apcnisd
#
# All of the other network servers such as samba, apache or X, have their own
# access control scheme that should be used instead.
#
# In addition to the services above, the services that are started on request
# by inetd or xinetd use tcpd to "wrap" the network connection. tcpd uses
# the last component of the server pathname as a token to match a service in
# /etc/hosts.{allow,deny}. See the file /etc/inetd.conf for the token names.
# The following examples work when uncommented:
#
#
# Example 1: Fire up a mail to the admin if a connection to the printer daemon
# has been made from host foo.bar.com, but simply deny all others:
# lpd : foo.bar.com : spawn /bin/echo "%h printer access" | \
# mail -s "tcp_wrappers on %H" root
#
#
# Example 2: grant access from local net, reject with message from elsewhere.
# in.telnetd : ALL EXCEPT LOCAL : ALLOW
# in.telnetd : ALL : \
# twist /bin/echo -e "\n\raccess from %h declined.\n\rGo away.";sleep 2
#
#
# Example 3: run a different instance of rsyncd if the connection comes
# from network 172.20.0.0/24, but regular for others:
# rsyncd : 172.20.0.0/255.255.255.0 : twist /usr/local/sbin/my_rsyncd-script
# rsyncd : ALL : ALLOW
#


Ausgabe von rpcinfo -p :

admin@TUX25:~> rpcinfo -p
bash: rpcinfo: command not found


Client folgt !!!!!!!

NECRO25
08.07.07, 12:50
Nun zum Client :

Ausgabe von cat /etc/fstab :

admin@MEGABOOK:~> cat /etc/fstab
/dev/sda2 / ext3 acl,user_xattr 1 1
/dev/sda3 /home ext3 acl,user_xattr 1 2
/dev/sda1 swap swap defaults 0 0
proc /proc proc defaults 0 0
sysfs /sys sysfs noauto 0 0
debugfs /sys/kernel/debug debugfs noauto 0 0
usbfs /proc/bus/usb usbfs noauto 0 0
devpts /dev/pts devpts mode=0620,gid=5 0 0
TUX25:/NFS/Musik /media nfs rw,async 0 0

Ausgabe von cat /etc/hosts :

admin@MEGABOOK:~> cat /etc/hosts
#
# hosts This file describes a number of hostname-to-address
# mappings for the TCP/IP subsystem. It is mostly
# used at boot time, when no name servers are running.
# On small systems, this file can be used instead of a
# "named" name server.
# Syntax:
#
# IP-Address Full-Qualified-Hostname Short-Hostname
#

127.0.0.1 localhost

# special IPv6 addresses
::1 localhost ipv6-localhost ipv6-loopback

fe00::0 ipv6-localnet

ff00::0 ipv6-mcastprefix
ff02::1 ipv6-allnodes
ff02::2 ipv6-allrouters
ff02::3 ipv6-allhosts
127.0.0.2 MEGABOOK.site MEGABOOK


Ausgabe von ping -c3 192.168.0.2 :

ping -c3 192.168.0.2
PING 192.168.0.2 (192.168.0.2) 56(84) bytes of data.
64 bytes from 192.168.0.2: icmp_seq=1 ttl=64 time=20.4 ms
64 bytes from 192.168.0.2: icmp_seq=2 ttl=64 time=6.97 ms
64 bytes from 192.168.0.2: icmp_seq=3 ttl=64 time=5.59 ms

--- 192.168.0.2 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 1999ms
rtt min/avg/max/mdev = 5.596/10.995/20.411/6.682 ms


Ausgabe von ping -c3 TUX25 :

ping -c3 TUX25
ping: unknown host TUX25


Ausgabe von rpcinfo -p :

rpcinfo -p
bash: rpcinfo: command not found


Manuelles Mounten :


MEGABOOK:/home/admin # mount nfs:/TUX25/Musik /media
mount: Konnte die Adresse von nfs nicht herausfinden


Viele Grüße
NECRO25

BedriddenTech
08.07.07, 13:15
Der Name deines NFS-Server ist schlichtweg nicht bekannt, und zudem nutzt du, wenn ich mich nicht täusche, das falsche Format beim Einhängen. Probier mal ein
mount -vtnfs 192.168.0.2:/NFS/Musik /media

Bist du dir sicher, daß die Einträge in der /etc/exports auf deinem Server so richtig sind? Ich dachte eigentlich immer, das korrekte Format wäre IP/Netmask.

kreol
08.07.07, 13:41
BedriddenTech hat ja schon darauf hingewiesen, daß dem client der hostname vom server nicht bekannt ist. Also, wie schon vorgeschlagen mit der IP mounten oder den Server in die /etc/hosts eintragen. Bsp.
...
192.168.0.2 TUX25.<domainname> TUX25
Und warum exportierst Du dasselbe Verzeichnis dreimal, einmal davon mit Wildcard für alle IPs? Das reicht dann doch. Welche Rechner sind im Netz und welche sollen auf Deinen NFS zugreifen dürfen?

Wg. des rpcinfo: Nimm den vollständigen Pfad, also /usr/sbin/rpcinfo -p (bzw. ermittle mit "which rpcinfo" den Pfad und nimm den).

Btw: Aus Sicherheitsgründen ist es auch empfehlenswert, in der /etc/hosts.deny alle Dienste zu verbieten und in der /etc/hosts.allow explizit für bestimmte Rechner freizugeben. Bsp:
hosts.deny:

#
# Alle Zugriffe untersagen (Gestattung in /etc/hosts.allow)
# Protokollierung von Zugriffsversuchen in /var/log/deny.log
#
all : all : spawn (echo Attempt from %h %a to %d at $(date) >> /var/log/deny.log
hosts.allow:
#
# Zugriff auf alle Dienste vom lokalen Rechner erlauben
#
all : localhost : ALLOW
#
# Zugriff von xxx.xxx.xxx.xxx per NFS SSH und FTP erlauben
#
vsftpd : xxx.xxx.xxx.xxx : ALLOW
portmap : xxx.xxx.xxx.xxx : ALLOW
mountd : xxx.xxx.xxx.xxx : ALLOW
statd : xxx.xxx.xxx.xxx : ALLOW
sshd : xxx.xxx.xxx.xxx : ALLOW


Kreol

P.S.
Das vtnfs sagt mir jetzt nichts. Hier ein Eintrag aus meiner fstab:
192.168.178.24:/data1 /p2600/data1 nfs rw,rsize=8192,wsize=8192,noauto,users,sync,hard 0 0

BedriddenTech
08.07.07, 13:51
"-vtnfs" sind zwei Parameter in GNU-Getopts-Notation, einmal der Parameter "-v" (verbose), und "-t nfs" (type nfs). :)

kreol
08.07.07, 14:07
"-vtnfs" sind zwei Parameter in GNU-Getopts-Notation, einmal der Parameter "-v" (verbose), und "-t nfs" (type nfs). :)Muss es dann nicht mount -vt nfs ... heissen? wobei mein mount -v gar nicht kennt.

Vllt stehe ich auch einfach gerade auf dem Schlauch. Händisch würde ich es halt mit mount -t nfs ... versuchen.


Kreol

P.S. Kommando zurück, habe -v gefunden. Dann tendiere ich zu -vt nfs ;)

BedriddenTech
08.07.07, 14:54
Da "mount" die "Getopts"-Funktionen verwendet, ist es egal, ob du nach einem Parameter, der ein Argument erwartet, ein Leerzeichen machst oder nicht. "-v -t nfs", "-vt nfs" und "-vtnfs" haben also dasselbe Ergebnis. Ist übrigens bei allen Befehlen, die der GNU-Notation folgen, so.

kreol
08.07.07, 14:59
*notier* Man lernt nie aus :)

Übersichtlicher finde ich zwar die Version mit Leerzeichen, das ist dann aber wohl Geschmacksfrage.


Kreol

NECRO25
09.07.07, 08:41
Vielen Dank für eure Hilfe !

Es funktioniert :). Ich habe bei der Client Konfiguration anstatt des Server Hostnamens die IP Adresse (192.168.0.2) angegeben. YaST findet zwar immer noch kein NFS Server und sagt, dass die Freigabe nicht in fstab eingetragen werden konnte. Aber es funktioniert trotzdem.

Viele Grüße
NECRO25