LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How to build NFS share?? (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-build-nfs-share-4175416048/)

rajthampi 07-11-2012 01:36 AM

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

zordrak 07-11-2012 03:14 AM

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?

rajthampi 07-11-2012 03:53 AM

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

rajthampi 07-11-2012 04:14 AM

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

chrism01 07-11-2012 07:59 PM

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

frieza 07-11-2012 10:20 PM

on the client, the fstab entry for an nfs share would be
Code:

xxx.xxx.xxx.xxx:/share /mountpoint nfs  defaults 0 0


All times are GMT -5. The time now is 10:42 AM.