Subject: Re: [vserver] How to use nfs mount between two VPSes ...
From: "Dragan Saraginov" <dragan@saraginov.com>
Date: Thu, 23 Jul 2009 13:50:28 -0500 (CDT)

Hi to all.

I am trying to set up an nfs mount between two vservers on two different
physical servers. I added the following line to
'/etc/vservers/nfclient/fstab.remote

xxx.xxx.xxx.xxx:/home   /mnt/nfserver            nfs defaults,rw 0 0

On the nfs vserver I added this directory to '/etc/exports', next ran the
'exportsfs -a' command. I started the portmap service and bound it to the
vserver's IP address by adding 'OPTIONS="-i yyy.yyy.yyy.yyy"' to its
configuration '/etc/sysconfig/portmap' file. Next I downloaded and
installed the unfs v3 from 'http://unfs3.sourceforge.net/'. Here is what I
am getting when I ran 'rpcinfo -p yyy.yyy.yyy.yyy':

   program vers proto   port
    100000    2   tcp    111  portmapper
    100000    2   udp    111  portmapper
    100024    1   udp    857  status
    100024    1   tcp    860  status
    100003    3   udp   2049  nfs
    100003    3   tcp   2049  nfs
    100005    1   udp   2049  mountd
    100005    3   udp   2049  mountd
    100005    1   tcp   2049  mountd
    100005    3   tcp   2049  mountd

But whenever I try to restart the client server at xxx.xxx.xxx.xxx the
restart is hanging a while and after that I am getting the following
error:

mount: yyy.yyy.yyy.yyy:/home: can't read superblock
/etc/vservers/nfclient/fstab.remote:1:1: failed to mount fstab-entry


Am I missing something? Can anyone help me with this issue?

TIA,
Dragan Saragin


> On Wed, Jul 22, 2009 at 09:54:12PM +0200, Dragan Saraginov wrote:
>> Thanks Herbert for the answers.
>>
>> What if the nfs vserver and the client vserver are on the
>> different physical servers?
>
> then it makes more sense to use nfs, and you can do that
> by simply putting the nfs mount in fstab.remote
>
> best,
> Herbert
>
>> Dragan
>>
>> Herbert Poetzl wrote:
>> >On Wed, Jul 22, 2009 at 12:23:53AM -0500, Dragan Saraginov wrote:
>> >
>> >>Hi to all. Can anyone here help me and point me to the right
>> >>direction on how to use nfs mount option in guest VPSes.
>> >>
>> >
>> >that is like mounting an nfs export on the same machine
>> >
>> >
>> >>The goal that need to be achieved is to mount a directories
>> >>between two guest on the same host.
>> >>
>> >
>> >
>> >for this, a --bind or --rbind mount is much simpler
>> >and a lot less resource consuming, not to speak of
>> >'more natural' to the system
>> >
>> >
>> >>But I do not want to add some additional capability to the
>> >>guests configuration. I want to use the 'fstab.remote' option.
>> >>
>> >
>> >no additional capabilities are required for that, and
>> >you can put the --bind and --rbind mounts into fstab
>> >or fstab.remote
>> >
>> >HTH,
>> >Herbert
>> >
>> >
>> >>TIA,
>> >>Dragan
>> >>
>> >>--
>> >>This message has been scanned for viruses and
>> >>dangerous content by MailScanner, and is
>> >>believed to be clean.
>> >>
>> >
>> >
>>
>>
>>
>> __________ Information from ESET Smart Security, version of virus
>> signature
>> database 4267 (20090722) __________
>>
>> The message was checked by ESET Smart Security.
>>
>> http://www.eset.com
>>
>>
>>
>> --
>> This message has been scanned for viruses and
>> dangerous content by MailScanner, and is
>> believed to be clean.
>
> --
> This message has been scanned for viruses and
> dangerous content by MailScanner, and is
> believed to be clean.
>


-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.