LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-11-2012, 01:36 AM   #1
rajthampi
Member
 
Registered: May 2008
Location: Kuwait
Distribution: RHEL5, Ubuntu, PSlinuxOS
Posts: 35

Rep: Reputation: 1
Question How to build NFS share??


Hi guys

I am trying to set up NFS share from my Oracle VM Server (3.1.1) which is a bare metal installation.

#uname -r
2.6.39-200.1.1.el5uek

I have two SCSI drives (300gb, 200gb) which are formatted using ext3 (highest supported by VM server) and mounted on /var/storage1, /var/storage2 locations.



When I try to mount them automatically using /etc/fstab using following syntax, the mount is unsuccessful always
Code:
/dev/sdb1               /var/storage1  nfs4     defaults        1       2
/dev/sdc1               /var/storage2  nfs4     defaults        1       2
Hence I am forced to mount the drives as following

Code:
/dev/sdb1               /var/storage1  ext3     defaults        1       2
/dev/sdc1               /var/storage2  ext3     defaults        1       2
My /etc/exports has following entries

Code:
/var/storage1 192.168.0.20(rw,no_root_squash,nohide) 192.168.0.23(rw,no_root_squash,nohide)
/var/storage2 192.168.0.20(rw,no_root_squash,nohide) 192.168.0.23(rw,no_root_squash,nohide)
Where 192.168.0.20 is VM server's IP address itself

Please tell me whether this is the proper method to hold a NFS share

regards

raj

Last edited by rajthampi; 07-11-2012 at 01:38 AM.
 
Old 07-11-2012, 03:14 AM   #2
zordrak
Member
 
Registered: Feb 2008
Distribution: Slackware
Posts: 595

Rep: Reputation: 116Reputation: 116
You don't mount the disks as NFS. You mount an NFS share as NFS, but when you're the one sharing the disks you mount them as they are and then share them so others can mount them as NFS over the network.

You seem to have everything correct; you just need to start sharing. Depending on the OS (I'm not familiar with Oracle's) you may already be doing it.

What happens if you try to mount it from 192.168.0.20 or 192.168.0.23?

What is the output of:
Quote:
# exportfs
?

You should see this:

Quote:
srv:~# exportfs
/var/storage1 192.168.0.20/24
/var/storage2 192.168.0.23/24
If not.. are you running rpc and nfsd?
 
Old 07-11-2012, 03:53 AM   #3
rajthampi
Member
 
Registered: May 2008
Location: Kuwait
Distribution: RHEL5, Ubuntu, PSlinuxOS
Posts: 35

Original Poster
Rep: Reputation: 1
Question

Hello Zordak

Thank you very much for the reply, the output shows the following

Code:
[root@oravms ~]# exportfs
/var/storage1   192.168.0.20
/var/storage1   192.168.0.23
/var/storage2   192.168.0.20
/var/storage2   192.168.0.23
Now bit more about my infrastructure

I have installed the Oracle VM server on VirtualBox 4.1.8, as I mentioned with my post, Oracle VM server is a bare metal installation (no gui) and the NFS share is one of the methods which allows Oravle VM Manager to import Oracle templates to repositories which are read and write-able by the VM Server itself.

ie, when I import a template, the zipped template is downloaded to VM server's local storage, here in this case NFS share folders and VM server unpack the templates to virtual disks and other included with the zipped file

My host, Windows 7 64bit Professional edition desktop has 16GB memory, i7 processor, 2 NIC cards.

1 NIC is dedicated for the VM server and the other one is set for the VM manager (as suggested by geeks from oracle support)

My problem is, my NFS share locks up or the VM server goes on a reboot whenever the unpacking starts and reaches a particular level (for ex, the unzipped archive should contribute a 55gb extracted files, once around 20gb unpacked, either the NFS share gets locked up or the VM server reboots)

following a suggestion I changed the /etc/exports like following

Code:
/var/storage1 192.168.0.20(rw,insecure,async,no_root_squash,nohide) 192.168.0.23(rw,insecure,async,no_root_squash,nohide)
/var/storage2 192.168.0.20(rw,insecure,async,no_root_squash,nohide) 192.168.0.23(rw,insecure,async,no_root_squash,nohide)
Still experiencing frequent reboots or NFS share lock-up

Any suggestions?

regards,
raj
 
Old 07-11-2012, 04:14 AM   #4
rajthampi
Member
 
Registered: May 2008
Location: Kuwait
Distribution: RHEL5, Ubuntu, PSlinuxOS
Posts: 35

Original Poster
Rep: Reputation: 1
Question

Hi

Sorry for asking dumb questions, now I have changed the /etc/exports as following

Code:
/var/storage1 192.168.0.23(rw,sync,no_root_squash,nohide,fsid=0)
/var/storage2 192.168.0.23(rw,sync,no_root_squash,nohide,fsid=0)
Please tell me how I can mount both /var/storage1, /var/storage2 into two different folders over client machine. I mean I want to mount both exported repos into say
/localnfs1 and /localnfs2

Regards

raj
 
Old 07-11-2012, 07:59 PM   #5
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,359

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
Example client mount cfgs here: 1st is at cmd line (eg for test/check), 2nd is entries for /etc/fstab.
http://www.linuxtopia.org/online_boo...nt-config.html
 
Old 07-11-2012, 10:20 PM   #6
frieza
Senior Member
 
Registered: Feb 2002
Location: harvard, il
Distribution: Ubuntu 11.4,DD-WRT micro plus ssh,lfs-6.6,Fedora 15,Fedora 16
Posts: 3,233

Rep: Reputation: 406Reputation: 406Reputation: 406Reputation: 406Reputation: 406
on the client, the fstab entry for an nfs share would be
Code:
xxx.xxx.xxx.xxx:/share /mountpoint nfs  defaults 0 0
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
A loop device mounted within an NFS share is not accessible via NFS? srikanthnv Linux - Software 17 12-18-2011 09:31 AM
How can I mount a NFS share that have a SMB share mounted? perezyanez Linux - Networking 2 09-26-2008 09:03 AM
Sharing a NFS share off of another NFS server keysorsoze Linux - Networking 2 09-19-2008 10:50 AM
Placing a SMB share inside an NFS share grittyminder Linux - Networking 0 05-14-2008 03:49 AM
In NFS server. I want to share directory but i dont want to share subdirectories. aashishdhabarde Linux - Server 1 01-16-2008 03:48 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:11 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration