On Mon, 2026-11-16 at 10:39 -0800, Brian Bunker wrote:
> On Fri, 2026-11-13, Martin Wilck wrote:
> > > 3. The array sends 3f/0e as usual, and the rescan runs. The sd
> > >    devices for that H:C:T:L still exist, so there is nothing to
> > > add.
> > 
> > Why does this happen after 2.)? Wouldn't the array send 3f/0e
> > immediately after 1.)? If your "purge" functionality was active in
> > multipathd, and/or if the libstoragemgmt udev rules were enabled,
> > the
> > SCSI device would be deleted.
> 
> Yes, the array sends 3f/0e after 1 as well. My sequence was wrong to
> show it only after 2.
> 
> That UA doesn't lead to cleanup, though. The libstorage-mgmt rule
> only
> adds devices for new LUNs and never removes any, so after step 1 the
> SCSI device is still there.

Yeah, the libstorage-mgmt rule is very simplistic. It only writes to
the "scan" sysfs attribute, which keeps the existing SCSI devices in
place. As I wrote before, it also does not do a rescan.

I think we could improve on that.

> Purge is driven by the checker. It acts only when a checker run
> observes the disconnected state. If volume B is connected at the same
> LUN number before the next checker run, the checker never sees the
> LUN
> gone. It sees a healthy path that now reports a different WWID. The
> array can't prevent that, because the host-side cleanup is
> asynchronous
> and tied to checker intervals.

Right.

> 
> I agree that it is a user mistake. Within that window, comparing the
> WWID against the device is the only check, and that is what
> recheck_wwid does.
> 
> > 1) writing to "rescan" updates the sysfs VPDs, but generates no
> > uevent;
> > 2) writing to /sys/host/scsi_host/host$X/scan (this is what
> > "scan-scsi-target" does) neither updates VPDs nor generates
> > uevents;
> [...]
> 
> That matches what we see: the UA-triggered scan adds devices but
> doesn't refresh VPD for existing ones. For a reused LUN number, sysfs
> VPD stays stale until something rescans that device. Fixing 1) and 2)
> would help the udev side. Until then, SG_IO is the reliable check in
> multipathd.
> 
> > While you can speak for Purity only ;-) I suppose most storage
> > arrays
> > would try to respond to INQUIRY quickly. But other things can
> > happen.
> > Queues may be full, network timeouts may occur, and fabrics may be
> > overloaded.
> 
> Agreed, and that is why I'm happy with Ben's suggestion to run the
> check
> only on paths that are up.

Ok.

Martin

-- 
Dr. Martin Wilck <[email protected]>
SUSE Software Solutions Germany GmbH, Frankenstr. 146, 90461 Nürnberg,
Germany
Geschäftsführer: Stefan Gaiser, Jochen Jaser, Abhinav Puri (HRB
36809,AG Nürnberg)

Reply via email to