Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Linux-HA: Users

Stale NFS file handle

 

 

Linux-HA users RSS feed   Index | Next | Previous | View Threaded


harald.dunkel at aixigo

Sep 8, 2009, 7:45 AM

Post #1 of 5 (1080 views)
Permalink
Stale NFS file handle

Hi folks,

I am setting up a Linux NFServer together with drbd and Heartbeat 2
(old format) on Lenny.

kernel is 2.6.29.6
drbd is 8.3.2
heartbeat is 2.1.3-6lenny1

For testing I am running 15 kernel builds on this NFS
partition in parallel in an endless loop. Every 10 minutes
the HA hosts change their role (using /etc/init.d/heartbeat stop).

If the primary heartbeat is stopped (or if I run hb_standby), then
I get a "Stale NFS file handle" message on all writing NFS clients
after 3 minutes. 2 minutes later the clients start writing on the new
primary :-(. First I thought that is what you deserve if you do NFS,
but according to

http://www.linux-ha.org/DRBD/NFS

it seems that this is not supposed to happen. Is this correct?
The haresources file is

nasl002a IPaddr::xx.xx.xx.xx/23/bond0 \
drbddisk:: \
Filesystem::/dev/drbd1::/common::reiserfs::defaults \
Filesystem::/dev/drbd2::/space::reiserfs::defaults,noatime \
nfs-common \
nfs-kernel-server

The link mentioned above suggests to use something like

nasl002a drbddisk:: \
Filesystem::/dev/drbd1::/common::reiserfs::defaults \
Filesystem::/dev/drbd2::/space::reiserfs::defaults,noatime \
killnfsd \
nfs-common \
nfs-kernel-server \
Delay::3::0 \
IPaddr::xx.xx.xx.xx/23/bond0

instead, but this doesn't seem to help, either.


Any helpful comments would be very welcome.


Regards

Harri

_______________________________________________
Linux-HA mailing list
Linux-HA [at] lists
http://lists.linux-ha.org/mailman/listinfo/linux-ha
See also: http://linux-ha.org/ReportingProblems


dejanmm at fastmail

Sep 8, 2009, 8:51 AM

Post #2 of 5 (1038 views)
Permalink
Re: Stale NFS file handle [In reply to]

Hi,

On Tue, Sep 08, 2009 at 04:45:53PM +0200, Harald Dunkel wrote:
> Hi folks,
>
> I am setting up a Linux NFServer together with drbd and Heartbeat 2
> (old format) on Lenny.
>
> kernel is 2.6.29.6
> drbd is 8.3.2
> heartbeat is 2.1.3-6lenny1
>
> For testing I am running 15 kernel builds on this NFS
> partition in parallel in an endless loop. Every 10 minutes
> the HA hosts change their role (using /etc/init.d/heartbeat stop).
>
> If the primary heartbeat is stopped (or if I run hb_standby), then
> I get a "Stale NFS file handle" message on all writing NFS clients
> after 3 minutes. 2 minutes later the clients start writing on the new
> primary :-(. First I thought that is what you deserve if you do NFS,
> but according to
>
> http://www.linux-ha.org/DRBD/NFS
>
> it seems that this is not supposed to happen. Is this correct?
> The haresources file is
>
> nasl002a IPaddr::xx.xx.xx.xx/23/bond0 \
> drbddisk:: \
> Filesystem::/dev/drbd1::/common::reiserfs::defaults \
> Filesystem::/dev/drbd2::/space::reiserfs::defaults,noatime \
> nfs-common \
> nfs-kernel-server
>
> The link mentioned above suggests to use something like
>
> nasl002a drbddisk:: \
> Filesystem::/dev/drbd1::/common::reiserfs::defaults \
> Filesystem::/dev/drbd2::/space::reiserfs::defaults,noatime \
> killnfsd \
> nfs-common \
> nfs-kernel-server \
> Delay::3::0 \
> IPaddr::xx.xx.xx.xx/23/bond0
>
> instead, but this doesn't seem to help, either.

Do you have the same major/minor numbers exposed to the clients?
I think that you can set them in /etc/exports. Otherwise, it
seems like nfs-kernel-server in Debian doesn't really stop all
nfsd processes (apparently the init.d/nfs-kernel-server has to be
fixed, search internet for the relevant links).

Thanks,

Dejan

> Any helpful comments would be very welcome.
>
>
> Regards
>
> Harri
>
> _______________________________________________
> Linux-HA mailing list
> Linux-HA [at] lists
> http://lists.linux-ha.org/mailman/listinfo/linux-ha
> See also: http://linux-ha.org/ReportingProblems
_______________________________________________
Linux-HA mailing list
Linux-HA [at] lists
http://lists.linux-ha.org/mailman/listinfo/linux-ha
See also: http://linux-ha.org/ReportingProblems


mike.kershaw at gmail

Sep 8, 2009, 10:53 AM

Post #3 of 5 (1040 views)
Permalink
Re: Stale NFS file handle [In reply to]

when you export the file systems, you need to give them a consistent identifier:

/mounts/homes/home1 *(sync,rw,no_root_squash,fsid=1)
/mounts/homes/home2 *(sync,rw,no_root_squash,fsid=2)
/mounts/homes/home3 *(sync,rw,no_root_squash,fsid=3)
/mounts/homes/home4 *(sync,rw,no_root_squash,fsid=4)
/mounts/homes/home5 *(sync,rw,no_root_squash,fsid=5)
/mounts/homes/home6 *(sync,rw,no_root_squash,fsid=6)
/mounts/homes/home7 *(sync,rw,no_root_squash,fsid=7)


the nfslock contains the major:minor #'s unless you specify otherwise.
if the major:minor of the device is different on the partner
node(extremely possible as their dynamically assigned) the client
won't be able to write to it. as long as you assign it something
unique like above, you should be good to go!



good luck!
mike




On Tue, Sep 8, 2009 at 11:51 AM, Dejan Muhamedagic<dejanmm [at] fastmail> wrote:
> Hi,
>
> On Tue, Sep 08, 2009 at 04:45:53PM +0200, Harald Dunkel wrote:
>> Hi folks,
>>
>> I am setting up a Linux NFServer together with drbd and Heartbeat 2
>> (old format) on Lenny.
>>
>>       kernel is 2.6.29.6
>>       drbd is 8.3.2
>>       heartbeat is 2.1.3-6lenny1
>>
>> For testing I am running 15 kernel builds on this NFS
>> partition in parallel in an endless loop. Every 10 minutes
>> the HA hosts change their role (using /etc/init.d/heartbeat stop).
>>
>> If the primary heartbeat is stopped (or if I run hb_standby), then
>> I get a "Stale NFS file handle" message on all writing NFS clients
>> after 3 minutes. 2 minutes later the clients start writing on the new
>> primary :-(. First I thought that is what you deserve if you do NFS,
>> but according to
>>
>>       http://www.linux-ha.org/DRBD/NFS
>>
>> it seems that this is not supposed to happen. Is this correct?
>> The haresources file is
>>
>> nasl002a IPaddr::xx.xx.xx.xx/23/bond0 \
>>       drbddisk:: \
>>       Filesystem::/dev/drbd1::/common::reiserfs::defaults \
>>       Filesystem::/dev/drbd2::/space::reiserfs::defaults,noatime \
>>       nfs-common \
>>       nfs-kernel-server
>>
>> The link mentioned above suggests to use something like
>>
>> nasl002a      drbddisk:: \
>>               Filesystem::/dev/drbd1::/common::reiserfs::defaults \
>>               Filesystem::/dev/drbd2::/space::reiserfs::defaults,noatime \
>>               killnfsd \
>>               nfs-common \
>>               nfs-kernel-server \
>>               Delay::3::0 \
>>               IPaddr::xx.xx.xx.xx/23/bond0
>>
>> instead, but this doesn't seem to help, either.
>
> Do you have the same major/minor numbers exposed to the clients?
> I think that you can set them in /etc/exports. Otherwise, it
> seems like nfs-kernel-server in Debian doesn't really stop all
> nfsd processes (apparently the init.d/nfs-kernel-server has to be
> fixed, search internet for the relevant links).
>
> Thanks,
>
> Dejan
>
>> Any helpful comments would be very welcome.
>>
>>
>> Regards
>>
>> Harri
>>
>> _______________________________________________
>> Linux-HA mailing list
>> Linux-HA [at] lists
>> http://lists.linux-ha.org/mailman/listinfo/linux-ha
>> See also: http://linux-ha.org/ReportingProblems
> _______________________________________________
> Linux-HA mailing list
> Linux-HA [at] lists
> http://lists.linux-ha.org/mailman/listinfo/linux-ha
> See also: http://linux-ha.org/ReportingProblems
>
_______________________________________________
Linux-HA mailing list
Linux-HA [at] lists
http://lists.linux-ha.org/mailman/listinfo/linux-ha
See also: http://linux-ha.org/ReportingProblems


dwdha at drdykstra

Sep 8, 2009, 1:06 PM

Post #4 of 5 (1035 views)
Permalink
Re: Stale NFS file handle [In reply to]

You shouldn't have to set the fsid if you're using DRBD properly.
I think the DRBD/NFS page is more out of date than the "See Also"
link there, http://linux-ha.org/HaNFS. See especially the "Device
Numbering" section.

I don't know how the use of reiserfs might affect this, I have no
experience with that, only ext3.

- Dave

On Tue, Sep 08, 2009 at 01:53:43PM -0400, Michael Kershaw wrote:
> when you export the file systems, you need to give them a consistent identifier:
>
> /mounts/homes/home1 *(sync,rw,no_root_squash,fsid=1)
> /mounts/homes/home2 *(sync,rw,no_root_squash,fsid=2)
> /mounts/homes/home3 *(sync,rw,no_root_squash,fsid=3)
> /mounts/homes/home4 *(sync,rw,no_root_squash,fsid=4)
> /mounts/homes/home5 *(sync,rw,no_root_squash,fsid=5)
> /mounts/homes/home6 *(sync,rw,no_root_squash,fsid=6)
> /mounts/homes/home7 *(sync,rw,no_root_squash,fsid=7)
>
>
> the nfslock contains the major:minor #'s unless you specify otherwise.
> if the major:minor of the device is different on the partner
> node(extremely possible as their dynamically assigned) the client
> won't be able to write to it. as long as you assign it something
> unique like above, you should be good to go!
>
>
>
> good luck!
> mike
>
>
>
>
> On Tue, Sep 8, 2009 at 11:51 AM, Dejan Muhamedagic<dejanmm [at] fastmail> wrote:
> > Hi,
> >
> > On Tue, Sep 08, 2009 at 04:45:53PM +0200, Harald Dunkel wrote:
> >> Hi folks,
> >>
> >> I am setting up a Linux NFServer together with drbd and Heartbeat 2
> >> (old format) on Lenny.
> >>
> >> ? ? ? kernel is 2.6.29.6
> >> ? ? ? drbd is 8.3.2
> >> ? ? ? heartbeat is 2.1.3-6lenny1
> >>
> >> For testing I am running 15 kernel builds on this NFS
> >> partition in parallel in an endless loop. Every 10 minutes
> >> the HA hosts change their role (using /etc/init.d/heartbeat stop).
> >>
> >> If the primary heartbeat is stopped (or if I run hb_standby), then
> >> I get a "Stale NFS file handle" message on all writing NFS clients
> >> after 3 minutes. 2 minutes later the clients start writing on the new
> >> primary :-(. First I thought that is what you deserve if you do NFS,
> >> but according to
> >>
> >> ? ? ? http://www.linux-ha.org/DRBD/NFS
> >>
> >> it seems that this is not supposed to happen. Is this correct?
> >> The haresources file is
> >>
> >> nasl002a IPaddr::xx.xx.xx.xx/23/bond0 \
> >> ? ? ? drbddisk:: \
> >> ? ? ? Filesystem::/dev/drbd1::/common::reiserfs::defaults \
> >> ? ? ? Filesystem::/dev/drbd2::/space::reiserfs::defaults,noatime \
> >> ? ? ? nfs-common \
> >> ? ? ? nfs-kernel-server
> >>
> >> The link mentioned above suggests to use something like
> >>
> >> nasl002a ? ? ?drbddisk:: \
> >> ? ? ? ? ? ? ? Filesystem::/dev/drbd1::/common::reiserfs::defaults \
> >> ? ? ? ? ? ? ? Filesystem::/dev/drbd2::/space::reiserfs::defaults,noatime \
> >> ? ? ? ? ? ? ? killnfsd \
> >> ? ? ? ? ? ? ? nfs-common \
> >> ? ? ? ? ? ? ? nfs-kernel-server \
> >> ? ? ? ? ? ? ? Delay::3::0 \
> >> ? ? ? ? ? ? ? IPaddr::xx.xx.xx.xx/23/bond0
> >>
> >> instead, but this doesn't seem to help, either.
> >
> > Do you have the same major/minor numbers exposed to the clients?
> > I think that you can set them in /etc/exports. Otherwise, it
> > seems like nfs-kernel-server in Debian doesn't really stop all
> > nfsd processes (apparently the init.d/nfs-kernel-server has to be
> > fixed, search internet for the relevant links).
> >
> > Thanks,
> >
> > Dejan
> >
> >> Any helpful comments would be very welcome.
> >>
> >>
> >> Regards
> >>
> >> Harri
_______________________________________________
Linux-HA mailing list
Linux-HA [at] lists
http://lists.linux-ha.org/mailman/listinfo/linux-ha
See also: http://linux-ha.org/ReportingProblems


harald.dunkel at aixigo

Sep 8, 2009, 11:17 PM

Post #5 of 5 (1049 views)
Permalink
Re: Stale NFS file handle [In reply to]

Dejan Muhamedagic wrote:
>
> Do you have the same major/minor numbers exposed to the clients?

The hosts and all devices are identical twins. Esp. the major and
minor device numbers of /dev/drbd[12] match.


Regards

Harri

_______________________________________________
Linux-HA mailing list
Linux-HA [at] lists
http://lists.linux-ha.org/mailman/listinfo/linux-ha
See also: http://linux-ha.org/ReportingProblems

Linux-HA users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.