linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC,v2] scsi: scan: map PQ=1, PDT=other values to SCSI_SCAN_TARGET_PRESENT
@ 2019-08-29 15:49 Andrey Melnikov
  2019-09-12  4:56 ` Zhong Li
  0 siblings, 1 reply; 7+ messages in thread
From: Andrey Melnikov @ 2019-08-29 15:49 UTC (permalink / raw)
  To: Li Zhong, Martin K. Petersen, linux-scsi

Hello.

This patch break exposing individual RAID disks from adaptec raid
controller. I need access to this disc's for S.M.A.R.T monitoring.

Please find other way to workaround bugs in IBM/2145 controller.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [RFC,v2] scsi: scan: map PQ=1, PDT=other values to SCSI_SCAN_TARGET_PRESENT
  2019-08-29 15:49 [RFC,v2] scsi: scan: map PQ=1, PDT=other values to SCSI_SCAN_TARGET_PRESENT Andrey Melnikov
@ 2019-09-12  4:56 ` Zhong Li
  2019-09-12 12:37   ` Andrey Melnikov
  0 siblings, 1 reply; 7+ messages in thread
From: Zhong Li @ 2019-09-12  4:56 UTC (permalink / raw)
  To: Andrey Melnikov; +Cc: Martin K. Petersen, linux-scsi


> On Aug 29, 2019, at 11:49 PM, Andrey Melnikov <temnota.am@gmail.com> wrote:
> 
> Hello.
> 
> This patch break exposing individual RAID disks from adaptec raid
> controller. I need access to this disc's for S.M.A.R.T monitoring.

Hello Andrey, 

Do you have any more details about how/why it is broken? 

Thanks, Zhong 

> 
> Please find other way to workaround bugs in IBM/2145 controller.


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [RFC,v2] scsi: scan: map PQ=1, PDT=other values to SCSI_SCAN_TARGET_PRESENT
  2019-09-12  4:56 ` Zhong Li
@ 2019-09-12 12:37   ` Andrey Melnikov
  2019-09-22 12:07     ` Li Zhong
  2019-09-26 23:26     ` Martin K. Petersen
  0 siblings, 2 replies; 7+ messages in thread
From: Andrey Melnikov @ 2019-09-12 12:37 UTC (permalink / raw)
  To: Zhong Li; +Cc: Martin K. Petersen, linux-scsi

чт, 12 сент. 2019 г. в 07:56, Zhong Li <lizhongfs@gmail.com>:
>
>
> > On Aug 29, 2019, at 11:49 PM, Andrey Melnikov <temnota.am@gmail.com> wrote:
> >
> > Hello.
> >
> > This patch break exposing individual RAID disks from adaptec raid
> > controller. I need access to this disc's for S.M.A.R.T monitoring.
>
> Hello Andrey,
>
> Do you have any more details about how/why it is broken?

adaptec report hidden luns with PQ=1, PDT=0 - now it skipped.

[   32.609143] scsi host6: aacraid
[   32.609566] scsi 6:0:0:0: Direct-Access     Adaptec  srv
  V1.0 PQ: 0 ANSI: 2
[   32.609881] scsi 6:0:1:0: Direct-Access     Adaptec  zbx
  V1.0 PQ: 0 ANSI: 2
[   32.639942] scsi 6:1:4:0: Direct-Access     ATA      WDC
WD2003FZEX-0 01.0 PQ: 1 ANSI: 5
[   32.640810] scsi 6:1:5:0: Direct-Access     ATA      WDC
WD2003FZEX-0 01.0 PQ: 1 ANSI: 5
[   32.641559] scsi 6:1:6:0: Direct-Access     ATA      WDC
WD2003FZEX-0 01.0 PQ: 1 ANSI: 5
[   32.642266] scsi 6:1:7:0: Direct-Access     ATA      WDC
WD2003FZEX-0 01.0 PQ: 1 ANSI: 5


> > Please find other way to workaround bugs in IBM/2145 controller.
>

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [RFC,v2] scsi: scan: map PQ=1, PDT=other values to SCSI_SCAN_TARGET_PRESENT
  2019-09-12 12:37   ` Andrey Melnikov
@ 2019-09-22 12:07     ` Li Zhong
  2019-09-26 23:26     ` Martin K. Petersen
  1 sibling, 0 replies; 7+ messages in thread
From: Li Zhong @ 2019-09-22 12:07 UTC (permalink / raw)
  To: Andrey Melnikov; +Cc: Martin K. Petersen, linux-scsi

On Thu, Sep 12, 2019 at 8:37 PM Andrey Melnikov <temnota.am@gmail.com> wrote:
>
> чт, 12 сент. 2019 г. в 07:56, Zhong Li <lizhongfs@gmail.com>:
> >
> >
> > > On Aug 29, 2019, at 11:49 PM, Andrey Melnikov <temnota.am@gmail.com> wrote:
> > >
> > > Hello.
> > >
> > > This patch break exposing individual RAID disks from adaptec raid
> > > controller. I need access to this disc's for S.M.A.R.T monitoring.
> >
> > Hello Andrey,
> >
> > Do you have any more details about how/why it is broken?
>
> adaptec report hidden luns with PQ=1, PDT=0 - now it skipped.

It seems to expose these "hidden" disks, we have to revert this patch.
Don't have such raid controller, do these "hidden" disks have any differences
from the normal ones?

However, from the spec,
Qualifier 001b
An addressed logical unit having the indicated device type is not accessible,
at this time, to the task router (see SAM-5) contained in the SCSI target port
that received this INQUIRY command.
However, the task router is capable of accessing the addressed logical unit
from this SCSI target port.

I still think it makes more sense to skip adding the device at the
time of the scan.

And for disks behind the RAID controller, does it make more sense to access
their information through the controller, than exposing it directly to the OS?

Thanks, Zhong

>
> [   32.609143] scsi host6: aacraid
> [   32.609566] scsi 6:0:0:0: Direct-Access     Adaptec  srv
>   V1.0 PQ: 0 ANSI: 2
> [   32.609881] scsi 6:0:1:0: Direct-Access     Adaptec  zbx
>   V1.0 PQ: 0 ANSI: 2
> [   32.639942] scsi 6:1:4:0: Direct-Access     ATA      WDC
> WD2003FZEX-0 01.0 PQ: 1 ANSI: 5
> [   32.640810] scsi 6:1:5:0: Direct-Access     ATA      WDC
> WD2003FZEX-0 01.0 PQ: 1 ANSI: 5
> [   32.641559] scsi 6:1:6:0: Direct-Access     ATA      WDC
> WD2003FZEX-0 01.0 PQ: 1 ANSI: 5
> [   32.642266] scsi 6:1:7:0: Direct-Access     ATA      WDC
> WD2003FZEX-0 01.0 PQ: 1 ANSI: 5
>
>
> > > Please find other way to workaround bugs in IBM/2145 controller.
> >

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [RFC,v2] scsi: scan: map PQ=1, PDT=other values to SCSI_SCAN_TARGET_PRESENT
  2019-09-12 12:37   ` Andrey Melnikov
  2019-09-22 12:07     ` Li Zhong
@ 2019-09-26 23:26     ` Martin K. Petersen
  2019-09-27 14:16       ` Hannes Reinecke
  1 sibling, 1 reply; 7+ messages in thread
From: Martin K. Petersen @ 2019-09-26 23:26 UTC (permalink / raw)
  To: Andrey Melnikov; +Cc: Zhong Li, Martin K. Petersen, linux-scsi


Andrey,

>> > This patch break exposing individual RAID disks from adaptec raid
>> > controller. I need access to this disc's for S.M.A.R.T monitoring.
>
> adaptec report hidden luns with PQ=1, PDT=0 - now it skipped.

>> > Please find other way to workaround bugs in IBM/2145 controller.

Spent some time on this today and I'm in agreement with Zhong's
interpretation of the SCSI spec.

What puzzles me is that aacraid already supports the no_uld_attach
feature so I'm not sure why it also sets PQ=1 for physical devices?

We could either have a SCSI host flag to override the behavior or
consider masking PQ in the driver. Unfortunately, I don't have any
aacraid controllers I can test with in my test setup so I'd have to
synthesize a setup with scsi_debug.

-- 
Martin K. Petersen	Oracle Linux Engineering

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [RFC,v2] scsi: scan: map PQ=1, PDT=other values to SCSI_SCAN_TARGET_PRESENT
  2019-09-26 23:26     ` Martin K. Petersen
@ 2019-09-27 14:16       ` Hannes Reinecke
  2019-10-01  1:53         ` Martin K. Petersen
  0 siblings, 1 reply; 7+ messages in thread
From: Hannes Reinecke @ 2019-09-27 14:16 UTC (permalink / raw)
  To: Martin K. Petersen, Andrey Melnikov; +Cc: Zhong Li, linux-scsi

On 9/27/19 1:26 AM, Martin K. Petersen wrote:
> 
> Andrey,
> 
>>>> This patch break exposing individual RAID disks from adaptec raid
>>>> controller. I need access to this disc's for S.M.A.R.T monitoring.
>>
>> adaptec report hidden luns with PQ=1, PDT=0 - now it skipped.
> 
>>>> Please find other way to workaround bugs in IBM/2145 controller.
> 
> Spent some time on this today and I'm in agreement with Zhong's
> interpretation of the SCSI spec.
> 
> What puzzles me is that aacraid already supports the no_uld_attach
> feature so I'm not sure why it also sets PQ=1 for physical devices?
> 
> We could either have a SCSI host flag to override the behavior or
> consider masking PQ in the driver. Unfortunately, I don't have any
> aacraid controllers I can test with in my test setup so I'd have to
> synthesize a setup with scsi_debug.
> 
Well, the aacraid _is_ a strange beast.
Depending on the hardware it might even run fully emulated, with no SCSI
commands being handled at all by the firmware.
(But who am I to complain, the mylex one was even worse ...)
Additionally it has two pecularities:
1) all underlying devices are exported to the OS; of course they have to
be properly masked etc to avoid udev to latch on those devices. I also
was under the impression that the 'no_uld_attach' should be sufficient
here, but then that only avoids the 'sd' driver to become attached to
it. The actual SCSI device is still visible, so one _might_ be tempted
to use the 'sg' device and export it to things like qemu. Which of
course should be avoided.
And my guess here is that setting the PQ flag here is precisely for this
kind of things.
2) all RAID devices have the 'removable' flag set. This was done to
support online resize of the RAID device, but then I'm not sure if it's
still required. I for once would be happy to see that go.

Cheers,

Hannes
-- 
Dr. Hannes Reinecke		      Teamlead Storage & Networking
hare@suse.de			                  +49 911 74053 688
SUSE Software Solutions Germany GmbH, Maxfeldstr. 5, 90409 Nürnberg
HRB 247165 (AG München), GF: Felix Imendörffer

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [RFC,v2] scsi: scan: map PQ=1, PDT=other values to SCSI_SCAN_TARGET_PRESENT
  2019-09-27 14:16       ` Hannes Reinecke
@ 2019-10-01  1:53         ` Martin K. Petersen
  0 siblings, 0 replies; 7+ messages in thread
From: Martin K. Petersen @ 2019-10-01  1:53 UTC (permalink / raw)
  To: Hannes Reinecke; +Cc: Martin K. Petersen, Andrey Melnikov, Zhong Li, linux-scsi


Hannes,

> 1) all underlying devices are exported to the OS; of course they have
> to be properly masked etc to avoid udev to latch on those devices. I
> also was under the impression that the 'no_uld_attach' should be
> sufficient here, but then that only avoids the 'sd' driver to become
> attached to it. The actual SCSI device is still visible, so one
> _might_ be tempted to use the 'sg' device and export it to things like
> qemu. Which of course should be avoided.

Well, yes. But in this case the bug report was that sg devices were no
longer available for smartmontools to monitor.

-- 
Martin K. Petersen	Oracle Linux Engineering

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2019-10-01  1:54 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-29 15:49 [RFC,v2] scsi: scan: map PQ=1, PDT=other values to SCSI_SCAN_TARGET_PRESENT Andrey Melnikov
2019-09-12  4:56 ` Zhong Li
2019-09-12 12:37   ` Andrey Melnikov
2019-09-22 12:07     ` Li Zhong
2019-09-26 23:26     ` Martin K. Petersen
2019-09-27 14:16       ` Hannes Reinecke
2019-10-01  1:53         ` Martin K. Petersen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).