1de9c
![]() |
|
|
|
|
|||||||
| Web & Network Services Discussion related to network/web services such as apache, bind, sendmail, etc. |
![]() |
|
|
Thread Tools | Display Modes |
|
#1
|
||||
|
||||
|
Hi. I have set a FreeNAS server. Is running fine and I can get WebUI from My desktop. Now I want to mount FreeNAS hdd's on my desktop computer. According this: http://www.freebsd.org/doc/handbook/network-nfs.html I guess that my desktop computer is NFS client and FreeNAS is the NFS server. So I set to /etc/rc.conf of my desktop computer
Code:
nfs_client_enable="YES"
__________________
==================================== | -------> UNIX. Live Free Or Die! <-------- | ==================================== You can say: I can't do something because is difficult. You must say: I tried a lot before say that I can't. Never Give up. http://unixsystems.dyndns.org/ I am not an BSD expert. But I really want to help. Don't afraid to ask me anything. If I can I will help! Nice wallpapers to make your desktop more hardcore :) ---> http://forums.freebsd.org/showthread.php?t=13416 Last edited by sk8harddiefast; April 8th, 2011 at 13:22. Reason: A stack is a pile. |
|
#2
|
|||
|
|||
|
Hi,
check, that you've exported the appropriate file-systems inside FreeNAS (ask in the FreeNAS forum for help on configuring FreeNAS for your purpose). setup and user guide:nfs setup and user guide:services nfs shares setup and user guide:nfs client On your FreeBSD client add following to /etc/rc.conf Code:
# # NFS Client # nfs_client_enable="YES" nfs_client_flags="-n 4" rpc_lockd_enable="YES" rpc_statd_enable="YES" Use IP-Addresses if you have no name resolution, otherwise use a DNS server/forwarder or add the FreeNAS IP to your /etc/hosts. /etc/fstab Code:
FreeNAS.localdomain:/path/to/nfsshare /mnt nfs rw 0 0 # nfsiod -n 4Mount filesystems from /etc/fstab: # mount -aMount single filesystem which is exported from your FreeNAS box: # mount -t nfs FreeNAS.localdomain:/path/to/nfsshare /mntLook out for the right UserID and GroupID or you run into trouble with permissions. Last edited by Nukama; April 7th, 2011 at 18:40. |
| The Following User Says Thank You to Nukama For This Useful Post: | ||
sk8harddiefast (April 7th, 2011) | ||
|
#3
|
||||
|
||||
|
Ok. I made a step.
My /etc/rc.conf Code:
nfs_client_enable="YES" nfs_client_flags="-n 4" rpc_lockd_enable="YES" rpc_statd_enable="YES" Code:
<<<<<<< current version ::1 localhost localhost.lucifer 127.0.0.1 localhost localhost.lucifer 192.168.1.2 darkchaos.lucifer darkchaos 192.168.1.2 darkchaos.lucifer. 192.168.1.3 FreeNAS.localdomain ======= # $FreeBSD: src/etc/hosts,v 1.16.34.1.6.1 2010/12/21 17:09:25 kensmith Exp $ # # Host Database # # This file should contain the addresses and aliases for local hosts that # share this file. Replace 'my.domain' below with the domainname of your # machine. # # In the presence of the domain name service or NIS, this file may # not be consulted at all; see /etc/nsswitch.conf for the resolution order. # # ::1 localhost localhost.my.domain 127.0.0.1 localhost localhost.my.domain # # Imaginary network. #10.0.0.2 myname.my.domain myname #10.0.0.3 myfriend.my.domain myfriend # # According to RFC 1918, you can use the following IP networks for # private nets which will never be connected to the Internet: # # 10.0.0.0 - 10.255.255.255 # 172.16.0.0 - 172.31.255.255 # 192.168.0.0 - 192.168.255.255 # # In case you want to be able to connect to the Internet, you need # real official assigned numbers. Do not try to invent your own network # numbers but instead get one from your network provider (if any) or # from your regional registry (ARIN, APNIC, LACNIC, RIPE NCC, or AfriNIC.) # >>>>>>> 8.2-RELEASE Code:
# Device Mountpoint FStype Options Dump Pass# /dev/ad14s1b none swap sw 0 0 /dev/ad14s1a / ufs rw 1 1 /dev/ad14s1d /tmp ufs rw 2 2 /dev/ad14s1f /usr ufs rw 2 2 /dev/ad14s1e /var ufs rw 2 2 /dev/ad10s1d /mnt/1000 ufs rw 1 1 /dev/ad16s1d /mnt/1500 ufs rw 1 1 /dev/cd0 /cdrom cd9660 ro,noauto 0 0 /dev/acd0 /cdrom1 cd9660 ro,noauto 0 0 linproc /compat/linux/proc linprocfs rw 0 0 linsys /usr/compat/linux/sys linsysfs rw 0 0 proc /proc procfs rw 0 0 FreeNAS.localdomain:/mnt/80g /mnt/80 nfs rw 0 0 Code:
mount -a Code:
[tcp] FreeNAS.localdomain:/mnt/80g: RPCPROG_NFS: RPC: Program not registered
__________________
==================================== | -------> UNIX. Live Free Or Die! <-------- | ==================================== You can say: I can't do something because is difficult. You must say: I tried a lot before say that I can't. Never Give up. http://unixsystems.dyndns.org/ I am not an BSD expert. But I really want to help. Don't afraid to ask me anything. If I can I will help! Nice wallpapers to make your desktop more hardcore :) ---> http://forums.freebsd.org/showthread.php?t=13416 Last edited by sk8harddiefast; April 7th, 2011 at 19:18. |
|
#4
|
||||
|
||||
|
Looks like nfsd and/or mountd isn't running on the server.
Have a look with # rpcinfo FreeNAS.localdomainThen check if the filesystems are exported correctly: # showmount -e FreeNAS.localdomain
__________________
Senior UNIX Engineer at Unix Support Nederland Experience is something you don't get until just after you need it. |
|
#5
|
||||
|
||||
|
Code:
rpcinfo FreeNAS.localdomain Code:
program version netid address service owner
100000 4 tcp 0.0.0.0.0.111 rpcbind superuser
100000 3 tcp 0.0.0.0.0.111 rpcbind superuser
100000 2 tcp 0.0.0.0.0.111 rpcbind superuser
100000 4 udp 0.0.0.0.0.111 rpcbind superuser
100000 3 udp 0.0.0.0.0.111 rpcbind superuser
100000 2 udp 0.0.0.0.0.111 rpcbind superuser
100000 4 tcp6 ::.0.111 rpcbind superuser
100000 3 tcp6 ::.0.111 rpcbind superuser
100000 4 udp6 ::.0.111 rpcbind superuser
100000 3 udp6 ::.0.111 rpcbind superuser
100000 4 local /var/run/rpcbind.sock rpcbind superuser
100000 3 local /var/run/rpcbind.sock rpcbind superuser
100000 2 local /var/run/rpcbind.sock rpcbind superuser
100005 1 udp6 ::.3.239 mountd superuser
100005 3 udp6 ::.3.239 mountd superuser
100005 1 tcp6 ::.3.239 mountd superuser
100005 3 tcp6 ::.3.239 mountd superuser
100005 1 udp 0.0.0.0.3.239 mountd superuser
100005 3 udp 0.0.0.0.3.239 mountd superuser
100005 1 tcp 0.0.0.0.3.239 mountd superuser
100005 3 tcp 0.0.0.0.3.239 mountd superuser
Code:
showmount -e FreeNAS.localdomain Code:
Exports list on FreeNAS.localdomain: /mnt/80g 192.168.1.0
__________________
==================================== | -------> UNIX. Live Free Or Die! <-------- | ==================================== You can say: I can't do something because is difficult. You must say: I tried a lot before say that I can't. Never Give up. http://unixsystems.dyndns.org/ I am not an BSD expert. But I really want to help. Don't afraid to ask me anything. If I can I will help! Nice wallpapers to make your desktop more hardcore :) ---> http://forums.freebsd.org/showthread.php?t=13416 |
|
#6
|
||||
|
||||
|
There's no nfsd running on the server, hence no exports.
__________________
Senior UNIX Engineer at Unix Support Nederland Experience is something you don't get until just after you need it. |
|
#7
|
||||
|
||||
|
Quote:
__________________
==================================== | -------> UNIX. Live Free Or Die! <-------- | ==================================== You can say: I can't do something because is difficult. You must say: I tried a lot before say that I can't. Never Give up. http://unixsystems.dyndns.org/ I am not an BSD expert. But I really want to help. Don't afraid to ask me anything. If I can I will help! Nice wallpapers to make your desktop more hardcore :) ---> http://forums.freebsd.org/showthread.php?t=13416 |
|
#8
|
|||
|
|||
|
In your /etc/rc.conf comment out following (stop the services/restart FreeBSD):
Code:
#rpc_lockd_enable="YES" #rpc_statd_enable="YES" Last edited by Nukama; April 7th, 2011 at 19:47. |
|
#9
|
||||
|
||||
|
No idea how to turn it on with FreeNAS. On FreeBSD you'd add something like this to /etc/rc.conf:
Code:
nfs_server_enable="YES" Code:
rpcbind_enable="YES" mountd_enable="YES" rpc_statd_enable="YES" rpc_lockd_enable="YES" nfs_server_enable="YES"
__________________
Senior UNIX Engineer at Unix Support Nederland Experience is something you don't get until just after you need it. |
|
#10
|
||||
|
||||
|
Oh, in case you started things by hand, make sure to start rpcbind first. Both mountd and nfsd need to register their RPC.
__________________
Senior UNIX Engineer at Unix Support Nederland Experience is something you don't get until just after you need it. |
|
#11
|
||||
|
||||
|
Pfff
I tried the last 2 post but I get the same ![]() On boot say: NFS server: ......re0 link up (That means that try to connect to FreeNAS) But again return Code:
[tcp] FreeNAS.localdomain:/mnt/80g: RPCPROG_NFS: RPC: Program not registered ![]() Is everything on my fstab and hosts file fine? To be sure that the problem is not there.
__________________
==================================== | -------> UNIX. Live Free Or Die! <-------- | ==================================== You can say: I can't do something because is difficult. You must say: I tried a lot before say that I can't. Never Give up. http://unixsystems.dyndns.org/ I am not an BSD expert. But I really want to help. Don't afraid to ask me anything. If I can I will help! Nice wallpapers to make your desktop more hardcore :) ---> http://forums.freebsd.org/showthread.php?t=13416 |
|
#12
|
|||
|
|||
|
Maybe /etc/hosts.allow on FreeNAS will help, if it's not related to statd and lockd, which must run on both server and client to enable file locking and will refuse to connect, if it is only configured on the client.
@SirDice: nfsd is running on the FreeNAS box Code:
Exports list on FreeNAS.localdomain: /mnt/80g 192.168.1.0 Code:
Exports list on FreeNAS.localdomain: /mnt/80g 192.168.1.0/24 #or with the client IP /mnt/80g 192.168.1.2 |
|
#13
|
||||
|
||||
|
Also I change a little my /etc/hosts.allow
Code:
# # hosts.allow access control file for "tcp wrapped" applications. # $FreeBSD: src/etc/hosts.allow,v 1.23.10.1.6.1 2010/12/21 17:09:25 kensmith Exp $ # # NOTE: The hosts.deny file is deprecated. # Place both 'allow' and 'deny' rules in the hosts.allow file. # See hosts_options(5) for the format of this file. # hosts_access(5) no longer fully applies. # _____ _ _ # | ____| __ __ __ _ _ __ ___ _ __ | | ___ | | # | _| \ \/ / / _` | | '_ ` _ \ | '_ \ | | / _ \ | | # | |___ > < | (_| | | | | | | | | |_) | | | | __/ |_| # |_____| /_/\_\ \__,_| |_| |_| |_| | .__/ |_| \___| (_) # |_| # !!! This is an example! You will need to modify it for your specific # !!! requirements! # Start by allowing everything (this prevents the rest of the file # from working, so remove it when you need protection). # The rules here work on a "First match wins" basis. ALL : ALL : allow # Wrapping sshd(8) is not normally a good idea, but if you # need to do it, here's how #sshd : .evil.cracker.example.com : deny # Protect against simple DNS spoofing attacks by checking that the # forward and reverse records for the remote host match. If a mismatch # occurs, access is denied, and any positive ident response within # 20 seconds is logged. No protection is afforded against DNS poisoning, # IP spoofing or more complicated attacks. Hosts with no reverse DNS # pass this rule. ALL : PARANOID : RFC931 20 : deny # Allow anything from localhost. Note that an IP address (not a host # name) *MUST* be specified for rpcbind(8). ALL : localhost 127.0.0.1 : allow # Comment out next line if you build libwrap without IPv6 support. ALL : [::1] : allow #ALL : my.machine.example.com 192.0.2.35 : allow ALL : 192.168.1.0 : allow # To use IPv6 addresses you must enclose them in []'s #ALL : [fe80::%fxp0]/10 : allow #ALL : [fe80::]/10 : deny #ALL : [2001:db8:2:1:2:3:4:3fe1] : deny #ALL : [2001:db8:2:1::]/64 : allow # Sendmail can help protect you against spammers and relay-rapers sendmail : localhost : allow #sendmail : .nice.guy.example.com : allow #sendmail : .evil.cracker.example.com : deny sendmail : ALL : allow # Exim is an alternative to sendmail, available in the ports tree exim : localhost : allow #exim : .nice.guy.example.com : allow #exim : .evil.cracker.example.com : deny exim : ALL : allow # Rpcbind is used for all RPC services; protect your NFS! # (IP addresses rather than hostnames *MUST* be used here) #rpcbind : 192.0.2.32/255.255.255.224 : allow #rpcbind : 192.0.2.96/255.255.255.224 : allow #rpcbind : ALL : deny rpcbind : 192.168.1.0/255.255.255.0 : allow # NIS master server. Only local nets should have access # (Since this is an RPC service, rpcbind needs to be considered) ypserv : localhost : allow #ypserv : .unsafe.my.net.example.com : deny #ypserv : .my.net.example.com : allow ypserv : ALL : deny # Provide a small amount of protection for ftpd ftpd : localhost : allow #ftpd : .nice.guy.example.com : allow #ftpd : .evil.cracker.example.com : deny ftpd : ALL : allow # You need to be clever with finger; do _not_ backfinger!! You can easily # start a "finger war". fingerd : ALL \ : spawn (echo Finger. | \ /usr/bin/mail -s "tcpd\: %u@%h[%a] fingered me!" root) & \ : deny # The rest of the daemons are protected. ALL : ALL \ : severity auth.info \ : twist /bin/echo "You are not welcome to use %d from %h."
__________________
==================================== | -------> UNIX. Live Free Or Die! <-------- | ==================================== You can say: I can't do something because is difficult. You must say: I tried a lot before say that I can't. Never Give up. http://unixsystems.dyndns.org/ I am not an BSD expert. But I really want to help. Don't afraid to ask me anything. If I can I will help! Nice wallpapers to make your desktop more hardcore :) ---> http://forums.freebsd.org/showthread.php?t=13416 |
|
#14
|
||||
|
||||
|
After rebooting NAS server I get this:
Code:
Mounting NFS file systems:re0: link state changed to UP [tcp] FreeNAS.localdomain:/mnt/80g: RPCPROG_NFS: RPC: Port mapper failure - RPC: Timed out
__________________
==================================== | -------> UNIX. Live Free Or Die! <-------- | ==================================== You can say: I can't do something because is difficult. You must say: I tried a lot before say that I can't. Never Give up. http://unixsystems.dyndns.org/ I am not an BSD expert. But I really want to help. Don't afraid to ask me anything. If I can I will help! Nice wallpapers to make your desktop more hardcore :) ---> http://forums.freebsd.org/showthread.php?t=13416 Last edited by sk8harddiefast; April 8th, 2011 at 07:52. |
|
#15
|
||||
|
||||
|
Problem solved. NFS was not enable as service on NAS. Now is working. Thanks a lot on @Nukama for his help
__________________
==================================== | -------> UNIX. Live Free Or Die! <-------- | ==================================== You can say: I can't do something because is difficult. You must say: I tried a lot before say that I can't. Never Give up. http://unixsystems.dyndns.org/ I am not an BSD expert. But I really want to help. Don't afraid to ask me anything. If I can I will help! Nice wallpapers to make your desktop more hardcore :) ---> http://forums.freebsd.org/showthread.php?t=13416 |
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| [FreeNAS] Marvell 88SE9128 & SB710 | Arghtastic | System Hardware | 2 | February 5th, 2011 11:03 |
| [FreeNAS] FreeNAS + Diaspora : Need more FreeBSD Packages | waazdakka | Installation and Maintenance of FreeBSD Ports or Packages | 4 | January 24th, 2011 20:15 |
| [FreeNAS] FreeNAS isn't booting properly, bad sectors in a raid5. | Evil_AnAnAs | General | 4 | September 15th, 2010 10:45 |
| [FreeNAS] 3G sata card with freenas support | sowens | System Hardware | 6 | December 29th, 2009 08:47 |
| libc.so.6 && FMOD && FreeBSD | Sa3r | Userland Programming & Scripting | 6 | February 5th, 2009 11:54 |