Hi,
I'm not sure if this is a NFS or LVM issue, so I cross-post this.
We get stale NFS handles on a LVM2 volume in the following scenario:
- The NFS server is running SLES10/kernel 2.6.16, but it happens
with 2.6.21, too
- the server has /dev/sda, a built-in SCSI disk, with
/dev/sda7 a LVM2 volume, say "exportlvm"
- due to module order in the initrd sda is always sda
- exportlvm is exported to the NFS clients
- the server has 4 fibre-channel raids connected, those have
several partitions and two of the raids have LVM2 filesystems.
- the server doesn't mount or export any of the FC filesystems
Now, when we shutdown the fc port of the server or remove the fc cable, so
that all the fc filesystems disappear, and then reboot the server,
the NFS client gets stale NFS handles on the "exportlvm". When we reboot
the client and then reconnect the FC cable or port and reboot the server
again, the stale NFS handles show up again.
When we change /dev/sda7 from a LVM2 to a normal fs, there are no stale
NFS handles when rebooting the server in this way.
Looks like rebooting the server after dis-/connecting the FC raids with
their LVMs somehow changes sth. on the LVM2 on /dev/sda7, like the minor
numbers etc. Is that possible? Is it a bug? Indeed the "exportlvm" is
the last in the list when calling "vgscan" with the FC raids connected.
Is there a way I can ensure that things like minor numbers (or whatever
could cause these stales) are persistent on the "exportlvm"?
cu,
Frank
--
Dipl.-Inform. Frank Steiner Web: http://www.bio.ifi.lmu.de/~steiner/
Lehrstuhl f. Bioinformatik Mail: http://www.bio.ifi.lmu.de/~steiner/m/
LMU, Amalienstr. 17 Phone: +49 89 2180-4049
80333 Muenchen, Germany Fax: +49 89 2180-99-4049
* Rekursion kann man erst verstehen, wenn man Rekursion verstanden hat. *
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs
On Wed, May 30, 2007 at 09:07:10AM +0200, Frank Steiner wrote:
> Hi,
>
> I'm not sure if this is a NFS or LVM issue, so I cross-post this.
> We get stale NFS handles on a LVM2 volume in the following scenario:
>
> - The NFS server is running SLES10/kernel 2.6.16, but it happens
> with 2.6.21, too
>
> - the server has /dev/sda, a built-in SCSI disk, with
> /dev/sda7 a LVM2 volume, say "exportlvm"
>
> - due to module order in the initrd sda is always sda
>
> - exportlvm is exported to the NFS clients
>
> - the server has 4 fibre-channel raids connected, those have
> several partitions and two of the raids have LVM2 filesystems.
>
> - the server doesn't mount or export any of the FC filesystems
>
> Now, when we shutdown the fc port of the server or remove the fc cable, so
> that all the fc filesystems disappear, and then reboot the server,
> the NFS client gets stale NFS handles on the "exportlvm". When we reboot
> the client and then reconnect the FC cable or port and reboot the server
> again, the stale NFS handles show up again.
>
> When we change /dev/sda7 from a LVM2 to a normal fs, there are no stale
> NFS handles when rebooting the server in this way.
>
> Looks like rebooting the server after dis-/connecting the FC raids with
> their LVMs somehow changes sth. on the LVM2 on /dev/sda7, like the minor
> numbers etc. Is that possible? Is it a bug?
This is the behavior I would expect and is not a bug. Major/minor numbers
depend on the initialization order and number of block level devices
finally available for mounting the filesystems (disks/partitions/logical
volumes, etc). When pulling a disk or (in your case) volume in the middle
some numbers may shift and that affects the filehandles.
Use the fsid= option in /etc/exports to avoid this problem (clients need
to remount because this changes filehandles again).
--
Frank
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs
On Wed, 30 May 2007 10:23:12 +0200
Frank van Maarseveen <[email protected]> wrote:
> On Wed, May 30, 2007 at 09:07:10AM +0200, Frank Steiner wrote:
> > Hi,
> >
> > I'm not sure if this is a NFS or LVM issue, so I cross-post this.
> > We get stale NFS handles on a LVM2 volume in the following scenario:
> >
> > - The NFS server is running SLES10/kernel 2.6.16, but it happens
> > with 2.6.21, too
> >
> > - the server has /dev/sda, a built-in SCSI disk, with
> > /dev/sda7 a LVM2 volume, say "exportlvm"
> >
> > - due to module order in the initrd sda is always sda
> >
> > - exportlvm is exported to the NFS clients
> >
> > - the server has 4 fibre-channel raids connected, those have
> > several partitions and two of the raids have LVM2 filesystems.
> >
> > - the server doesn't mount or export any of the FC filesystems
> >
> > Now, when we shutdown the fc port of the server or remove the fc cable, so
> > that all the fc filesystems disappear, and then reboot the server,
> > the NFS client gets stale NFS handles on the "exportlvm". When we reboot
> > the client and then reconnect the FC cable or port and reboot the server
> > again, the stale NFS handles show up again.
> >
> > When we change /dev/sda7 from a LVM2 to a normal fs, there are no stale
> > NFS handles when rebooting the server in this way.
> >
> > Looks like rebooting the server after dis-/connecting the FC raids with
> > their LVMs somehow changes sth. on the LVM2 on /dev/sda7, like the minor
> > numbers etc. Is that possible? Is it a bug?
>
> This is the behavior I would expect and is not a bug. Major/minor numbers
> depend on the initialization order and number of block level devices
> finally available for mounting the filesystems (disks/partitions/logical
> volumes, etc). When pulling a disk or (in your case) volume in the middle
> some numbers may shift and that affects the filehandles.
>
> Use the fsid= option in /etc/exports to avoid this problem (clients need
> to remount because this changes filehandles again).
>
There are also some options with lvchange that can give LVM volumes a
persistent minor number. But using the fsid option (like frankvm said)
is probably your safest bet.
--
Jeff Layton <[email protected]>
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs
Frank van Maarseveen wrote
> Use the fsid= option in /etc/exports to avoid this problem (clients need
> to remount because this changes filehandles again).
That works fine :-))) Thanks a lot! I'm using this for all our NFS exports now.
cu,
Frank
--
Dipl.-Inform. Frank Steiner Web: http://www.bio.ifi.lmu.de/~steiner/
Lehrstuhl f. Bioinformatik Mail: http://www.bio.ifi.lmu.de/~steiner/m/
LMU, Amalienstr. 17 Phone: +49 89 2180-4049
80333 Muenchen, Germany Fax: +49 89 2180-99-4049
* Rekursion kann man erst verstehen, wenn man Rekursion verstanden hat. *
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs