Ich möchte auf dem Laptop ein Verzeichnis vom Desktop mit nfs mounten, bekomme aber "access denied by server ..."
Desktop:
root@siductionbox:~# grep -v "#" /etc/exports
/home/manfred 192.168.178.*(rw,async)
root@siductionbox:~# dpkg -l | grep nfs
ii libnfsidmap2:amd64 0.25-5 amd64 NFS idmapping library
ii nfs-common 1:1.2.8-9 amd64 NFS support files common to client and server
ii nfs-kernel-server 1:1.2.8-9 amd64 support for NFS kernel server
ii nfswatch 4.99.11-3 amd64 Program to monitor NFS traffic for the console
root@siductionbox:~# inxi -v4 -c13
System: Host: siductionbox Kernel: 4.2.5-towo.1-siduction-amd64 x86_64 (64 bit gcc: 5.2.1) Desktop: N/A
Distro: siduction 13.2.1 December - kde - (201401272125)
Machine: Mobo: MSI model: 870-C45(FX) V2 (MS-7715) v: 1.0 Bios: American Megatrends v: V3.1 date: 04/16/2012
CPU: Dual core AMD Athlon II X2 260 (-MCP-) cache: 2048 KB
flags: (lm nx sse sse2 sse3 sse4a svm) bmips: 12804
clock speeds: max: 3200 MHz 1: 2500 MHz 2: 1900 MHz
Graphics: Card: NVIDIA GF119 [GeForce GT 520] bus-ID: 01:00.0
Display Server: X.org 1.17.3 drivers: nvidia (unloaded: fbdev,vesa)
tty size: 218x35 Advanced Data: N/A for root
Network: Card: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller
driver: r8169 v: 2.3LK-NAPI port: e800 bus-ID: 02:00.0
IF: eth0 state: up speed: 100 Mbps duplex: full mac: 8c:89:a5:9d:09:cd
Drives: HDD Total Size: 2120.4GB (28.9% used) ID-1: /dev/sda model: Samsung_SSD_840 size: 120.0GB temp: 0C
ID-2: /dev/sdb model: ST1000DM003 size: 1000.2GB temp: 32C
ID-3: /dev/sdc model: SAMSUNG_HD103SI size: 1000.2GB temp: 24C
Partition: ID-1: / size: 110G used: 12G (11%) fs: ext3 dev: /dev/sda1
ID-2: /home size: 721G used: 466G (68%) fs: ext4 dev: /dev/sdb1
Info: Processes: 181 Uptime: 1:51 Memory: 1760.5/7987.4MB Init: systemd runlevel: 5 Gcc sys: 5.2.1
Client: Shell (bash 4.3.421) inxi: 2.2.28
root@siductionbox:~# ifconfig
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.178.3 netmask 255.255.255.0 broadcast 192.168.178.255
inet6 fe80::8e89:a5ff:fe9d:9cd prefixlen 64 scopeid 0x20<link>
ether 8c:89:a5:9d:09:cd txqueuelen 1000 (Ethernet)
RX packets 13598 bytes 5856820 (5.5 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 10355 bytes 1253713 (1.1 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 0 (Lokale Schleife)
RX packets 106 bytes 33162 (32.3 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 106 bytes 33162 (32.3 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
Laptop:
root@sidthinkpad:~# mount -t nfs 192.168.178.3:/home/manfred /mnt
mount.nfs: access denied by server while mounting 192.168.178.3:/home/manfred
root@sidthinkpad:~# mount -t nfs siductionbox:/home/manfred /mnt
mount.nfs: access denied by server while mounting siductionbox:/home/manfred
root@sidthinkpad:~# dpkg -l | grep nfs
ii libnfsidmap2:i386 0.25-5 i386 NFS idmapping library
ii nfs-common 1:1.2.8-9 i386 NFS support files common to client and server
ii nfs-kernel-server 1:1.2.8-9 i386 support for NFS kernel server
ii nfswatch 4.99.11-3 i386 Program to monitor NFS traffic for the console
root@sidthinkpad:~# inxi -v4 -c13
System: Host: sidthinkpad Kernel: 4.3.0-towo.3-siduction-686 i686 (32 bit gcc: 5.2.1) Console: tty 0
Distro: siduction 14.1.0 Indian Summer - kde - (201411230345)
Machine: System: LENOVO product: 20AQ009CGE v: ThinkPad T440s serial: PC02XCHR
Mobo: LENOVO model: 20AQ009CGE v: SDK0E50510 WIN serial: L1HF4AZ032Y
Bios: LENOVO v: GJET79WW (2.29 ) date: 09/03/2014
CPU: Dual core Intel Core i5-4210U (-HT-MCP-) cache: 3072 KB
flags: (lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx) bmips: 9580
clock speeds: max: 2700 MHz 1: 934 MHz 2: 1906 MHz 3: 1812 MHz 4: 2171 MHz
Graphics: Card: Intel Haswell-ULT Integrated Graphics Controller bus-ID: 00:02.0
Display Server: X.org 1.17.3 drivers: intel (unloaded: fbdev,vesa)
tty size: 218x29 Advanced Data: N/A for root out of X
Network: Card-1: Intel Ethernet Connection I218-V driver: e1000e v: 3.2.6-k port: 3080 bus-ID: 00:19.0
IF: eth0 state: down mac: 68:f7:28:1c:22:73
Card-2: Intel Wireless 7260 driver: iwlwifi bus-ID: 03:00.0
IF: wlp3s0 state: up mac: 5c:c5:d4:12:e1:3e
Drives: HDD Total Size: 180.0GB (4.4% used) ID-1: /dev/sda model: INTEL_SSDSC2BF18 size: 180.0GB temp: 33C
Partition: ID-1: / size: 165G used: 7.4G (5%) fs: ext4 dev: /dev/sda1
Info: Processes: 189 Uptime: 9 min Memory: 440.1/3256.9MB Init: systemd runlevel: 5 Gcc sys: 5.2.1
Client: Shell (bash 4.3.421) inxi: 2.2.28
root@sidthinkpad:~# ifconfig
eth0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
ether 68:f7:28:1c:22:73 txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
device interrupt 20 memory 0xf0600000-f0620000
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 0 (Lokale Schleife)
RX packets 221 bytes 50335 (49.1 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 221 bytes 50335 (49.1 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
wlp3s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.178.51 netmask 255.255.255.0 broadcast 192.168.178.255
inet6 fe80::5ec5:d4ff:fe12:e13e prefixlen 64 scopeid 0x20<link>
ether 5c:c5:d4:12:e1:3e txqueuelen 1000 (Ethernet)
RX packets 857 bytes 72924 (71.2 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 559 bytes 75531 (73.7 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
Was mach ich denn falsch?
Ich mag mich täuschen, aber wenn Du nichts angibst, wird nfs4 verwendet. Da müßte deine Freigabe in der exports dann so aussehen:
/home/manfred 192.168.178.*(fsid=0,rw,async,no_root_squash,no_subtree_check)
(ich weiß nicht ob bei dir no_root_squash und no_subtree_check nötig sind)
und der mount dann:
mount -t nfs4 192.168.178.3:/ /mnt
Sprich das freigebene Verzeichnis ist das root-Verzeichnis der Freigabe. Irgendwo (SLES debian k.A.) hab ich gelesen das dieses Verhalten geändert wurde/wird um die alten Konventionen von nfs3 verwenden zu können aber so funktioniert es zumindest bei mir.
Besten Dank Geier0815,
in der /etc/exports muss no_subtree_check oder subtree_check angegeben werden.
/home/manfred 192.168.178.*(rw,async,subtree_check)
exportfs: /etc/exports [1]: Neither 'subtree_check' or 'no_subtree_check' specified for export "192.168.178.*:/home/manfred"
Beim mount muß, wie du angegeben hast, nfs4 statt nfs stehen.
mount -t nfs4 siductionbox:/home/manfred /mnt
Zu früh gefreut.
Es hat einmal funktioniert, jetzt geht's wieder nicht.
Hab zum Test mal ein Verzeichnis auf sda1 (ext3) angelegt, aber auch das kann ich nicht mounten.
journalctl zeigt nichts an.
root@siductionbox:~# grep -v "#" /etc/exports
/homenfs 192.168.178.*(rw,sync,subtree_check)
/home/manfred 192.168.178.*(rw,async,subtree_check)
root@siductionbox:~# exportfs -a
root@sidthinkpad:~# mount -t nfs 192.168.178.3:/homenfs /mnt
mount.nfs: access denied by server while mounting 192.168.178.3:/homenfs
root@sidthinkpad:~# mount -t nfs4 192.168.178.3:/homenfs /mnt
mount.nfs4: access denied by server while mounting 192.168.178.3:/homenfs
Der Geier hat dir die Lösung doch schon geschrieben, umsetzen musste es schon selber. Stichwort nfs4 und nfs3.
...
Danke, ich hab's:
/etc/exports:
/home/manfred 192.168.178.0/24(fsid=0,rw,async,no_root_squash,subtree_check)
# mount -t nfs4 siductionbox:/ /mnt