2004-09-07 16:16:46

by Mike Miller (OS Dev)

[permalink] [raw]
Subject: clustering and 2.6

All,
I'm having some issues when trying to use some clustering software when
running any 2.6.x kernel.
Basically, there are 2 nodes connected to 1 storage storage enclosure.
When node 1 comes up it reserves the volume(s) in the enclosure. When
node 2 comes up the read capacity fails as expected because of the
SCSI reservation. However, if node 1 fails node 2 breaks the reservation,
but cannot register the disk. At this time we're assuming it's because the read
capacity failed and the size of the disk is zero blocks.

The SCSI mid-layer sets a bogus size on a device when read capacity fails.
Is this the preferred way to get around this issue? Seems like there
should be a better way.

Any input is greatly appreciated.

Thanks,
mikem


2004-09-07 16:41:57

by Christoph Hellwig

[permalink] [raw]
Subject: Re: clustering and 2.6

On Tue, Sep 07, 2004 at 11:12:54AM -0500, mikem wrote:
> The SCSI mid-layer sets a bogus size on a device when read capacity fails.
> Is this the preferred way to get around this issue? Seems like there
> should be a better way.

you need to write something (anything works) to the rescan attribute of
each lun.

2004-09-07 16:45:36

by James Bottomley

[permalink] [raw]
Subject: Re: clustering and 2.6

On Tue, 2004-09-07 at 12:12, mikem wrote:
> All,
> I'm having some issues when trying to use some clustering software when
> running any 2.6.x kernel.
> Basically, there are 2 nodes connected to 1 storage storage enclosure.
> When node 1 comes up it reserves the volume(s) in the enclosure. When
> node 2 comes up the read capacity fails as expected because of the
> SCSI reservation. However, if node 1 fails node 2 breaks the reservation,
> but cannot register the disk. At this time we're assuming it's because the read
> capacity failed and the size of the disk is zero blocks.
>
> The SCSI mid-layer sets a bogus size on a device when read capacity fails.
> Is this the preferred way to get around this issue? Seems like there
> should be a better way.
>
> Any input is greatly appreciated.

The bogus size thing is a holdover from the old days.

However, I recently did a test where I forced the size to zero. What I
see is that the partition does indeed not get registered (even for the
whole disc device). However I can still send a BLKRRPART ioctl to it
trigger a rescan and get the correct size.

James