RE: Regarding SCSI SANITIZE command support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Doug Gilbert,

Thanks for your response.

During the drive sanitize, INQUIRY and REPORT LUNS commands were working as expected. Drive supports all the 9 commands (sbc4r15.pdf, clause 4.11.2) during sanitize.

When the OS sends TUR commands, drive reports SenseKey: NOT READY, ASC: 04 and ASCQ: 1B "LOGICAL UNIT NOT READY, SANITIZE IN PROGRESS".

The OS SCSI upper layer driver is trying to read block 0. From the OS dmesg, I could see that SCSI READ 10 byte CDB (opcode: 0x28) have been issued by OS. 

Snippet of OS dmesg:

[ 7679.363737] ................................................not responding...
[ 7726.521694] sd 10:0:10:0: [sdb] FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
[ 7726.521706] sd 10:0:10:0: [sdb] Sense Key : Not Ready [current]
[ 7726.521711] sd 10:0:10:0: [sdb] Add. Sense: Logical unit not ready, sanitize in progress
[ 7726.521717] sd 10:0:10:0: [sdb] CDB: Read(10) 28 00 00 00 00 00 00 00 04 00
[ 7726.521722] blk_update_request: 15 callbacks suppressed
[ 7726.521726] blk_update_request: I/O error, dev sdb, sector 0
[ 7726.521731] buffer_io_error: 14 callbacks suppressed
[ 7726.521735] Buffer I/O error on dev sdb, logical block 0, async page read
[ 7726.522791] sd 10:0:10:0: [sdb] FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
[ 7726.522796] sd 10:0:10:0: [sdb] Sense Key : Not Ready [current]
[ 7726.522799] sd 10:0:10:0: [sdb] Add. Sense: Logical unit not ready, sanitize in progress
[ 7726.522803] sd 10:0:10:0: [sdb] CDB: Read(10) 28 00 00 00 00 04 00 00 04 00
[ 7726.522806] blk_update_request: I/O error, dev sdb, sector 4
[ 7726.522809] Buffer I/O error on dev sdb, logical block 1, async page read
[ 7726.523837] sd 10:0:10:0: [sdb] FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
[ 7726.523851] sd 10:0:10:0: [sdb] Sense Key : Not Ready [current]
[ 7726.523856] sd 10:0:10:0: [sdb] Add. Sense: Logical unit not ready, sanitize in progress
[ 7726.523861] sd 10:0:10:0: [sdb] CDB: Read(10) 28 00 00 00 00 00 00 00 04 00
[ 7726.523866] blk_update_request: I/O error, dev sdb, sector 0
[ 7726.523871] Buffer I/O error on dev sdb, logical block 0, async page read
[ 7726.524846] sd 10:0:10:0: [sdb] FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
[ 7726.524850] sd 10:0:10:0: [sdb] Sense Key : Not Ready [current]
[ 7726.524853] sd 10:0:10:0: [sdb] Add. Sense: Logical unit not ready, sanitize in progress
[ 7726.524856] sd 10:0:10:0: [sdb] CDB: Read(10) 28 00 00 00 00 04 00 00 04 00
[ 7726.524858] blk_update_request: I/O error, dev sdb, sector 4
[ 7726.524860] Buffer I/O error on dev sdb, logical block 1, async page read
[ 7726.525899] sd 10:0:10:0: [sdb] FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
[ 7726.525904] sd 10:0:10:0: [sdb] Sense Key : Not Ready [current]
[ 7726.525907] sd 10:0:10:0: [sdb] Add. Sense: Logical unit not ready, sanitize in progress
[ 7726.525910] sd 10:0:10:0: [sdb] CDB: Read(10) 28 00 00 00 00 00 00 00 04 00
[ 7726.525913] blk_update_request: I/O error, dev sdb, sector 0
[ 7726.525916] Buffer I/O error on dev sdb, logical block 0, async page read
[ 7726.526925] sd 10:0:10:0: [sdb] FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
[ 7726.526930] sd 10:0:10:0: [sdb] Sense Key : Not Ready [current]
[ 7726.526933] sd 10:0:10:0: [sdb] Add. Sense: Logical unit not ready, sanitize in progress
[ 7726.526936] sd 10:0:10:0: [sdb] CDB: Read(10) 28 00 00 00 00 04 00 00 04 00
[ 7726.526939] blk_update_request: I/O error, dev sdb, sector 4
[ 7726.526942] Buffer I/O error on dev sdb, logical block 1, async page read
[ 7726.527989] sd 10:0:10:0: [sdb] FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
[ 7726.527995] sd 10:0:10:0: [sdb] Sense Key : Not Ready [current]
[ 7726.527999] sd 10:0:10:0: [sdb] Add. Sense: Logical unit not ready, sanitize in progress
[ 7726.528003] sd 10:0:10:0: [sdb] CDB: Read(10) 28 00 00 00 00 00 00 00 04 00
[ 7726.528018] blk_update_request: I/O error, dev sdb, sector 0
[ 7726.528022] Buffer I/O error on dev sdb, logical block 0, async page read
[ 7726.528994] sd 10:0:10:0: [sdb] FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
[ 7726.528997] sd 10:0:10:0: [sdb] Sense Key : Not Ready [current]
[ 7726.529000] sd 10:0:10:0: [sdb] Add. Sense: Logical unit not ready, sanitize in progress
[ 7726.529003] sd 10:0:10:0: [sdb] CDB: Read(10) 28 00 00 00 00 04 00 00 04 00
[ 7726.529012] blk_update_request: I/O error, dev sdb, sector 4
[ 7726.529015] Buffer I/O error on dev sdb, logical block 1, async page read
[ 7726.530057] sd 10:0:10:0: [sdb] FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
[ 7726.530061] sd 10:0:10:0: [sdb] Sense Key : Not Ready [current]
[ 7726.530065] sd 10:0:10:0: [sdb] Add. Sense: Logical unit not ready, sanitize in progress
[ 7726.530068] sd 10:0:10:0: [sdb] CDB: Read(10) 28 00 00 00 00 00 00 00 04 00
[ 7726.530071] blk_update_request: I/O error, dev sdb, sector 0
[ 7726.530074] Buffer I/O error on dev sdb, logical block 0, async page read
[ 7726.531071] sd 10:0:10:0: [sdb] FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
[ 7726.531075] sd 10:0:10:0: [sdb] Sense Key : Not Ready [current]
[ 7726.531079] sd 10:0:10:0: [sdb] Add. Sense: Logical unit not ready, sanitize in progress
[ 7726.531082] sd 10:0:10:0: [sdb] CDB: Read(10) 28 00 00 00 00 04 00 00 04 00
[ 7726.531084] blk_update_request: I/O error, dev sdb, sector 4
[ 7726.531087] Buffer I/O error on dev sdb, logical block 1, async page read
[ 7726.535232] Dev sdb: unable to read RDB block 0
[ 7726.539416]  sdb: unable to read partition table

Thanks,
Mahesh


-----Original Message-----
From: Douglas Gilbert [mailto:dgilbert@xxxxxxxxxxxx] 
Sent: Tuesday, April 3, 2018 9:53 PM
To: Mahesh Rajashekhara <mahesh.rajashekhara@xxxxxxxxxxxxx>; linux-scsi@xxxxxxxxxxxxxxx
Cc: Vasanthalakshmi Tharmarajan <vasanthalakshmi.thar@xxxxxxxxxxxxx>; Ajish Koshy <Ajish.Koshy@xxxxxxxxxxxxx>
Subject: Re: Regarding SCSI SANITIZE command support

EXTERNAL EMAIL


On 2018-04-02 07:10 AM, Mahesh Rajashekhara wrote:
> Hello,
>
> I am RAID HBA driver engineer here at Microsemi. We are working on linux driver development for Microsemi SAS/SATA RAID HBA controllers.
>
> As per our understanding, while a drive is processing the SANITIZE command:
> - The drive should still be exposed to the OS.
> - The drive will fail all commands other than REQUEST SENSE

Not sure that the drive should ever knowingly fail INQUIRY and REPORT LUNS. That is to allow a discovery process to occur. In the INQUIRY response the peripheral qualifier should be 000b by my reading.

Go look at sbc4r15.pdf, specifically clause 4.11.2 to see all the commands that should be responded to during a SANITIZE (there are
9 of them).

> When we initiate SCSI SANITIZE operation on disk drive,  from the OS 
> dmesg, we could see that continuous SCSI READ (10) commands have been sent by the OS upper layer drivers and drive reports ASC: 04 ASCQ: 1B "LOGICAL UNIT NOT READY, SANITIZE IN PROGRESS". Since the sanitize operation is in progress, the drive will fail the commands.
> Although, OS could see drive is sanitizing, we are not sure why does OS upper layer driver is sending SCSI READ (10).
>
> During the OS boot, if the drive is sanitizing, OS boot is taking very long time and call trace issue has been occurred.
>
> It would be of great help if you could shed some light on this issue.
>
> Snippet of dmesg:
>
>   [ 202.659196] sd 0:0:11:0: [sdm] CDB: Read(10) 28 00 00 00 00 00 00 00 01 00
>   [ 202.659198] blk_update_request: I/O error, dev sdm, sector 0
>   [ 202.659201] Buffer I/O error on dev sdm, logical block 0, async page read
>   [ 202.659294] sd 0:0:11:0: [sdm] FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
>   [ 202.659299] sd 0:0:11:0: [sdm] Sense Key : Not Ready [current]
>   [ 202.659303] sd 0:0:11:0: [sdm] Add. Sense: Logical unit not ready, sanitize in progress
>   [ 202.659308] sd 0:0:11:0: [sdm] CDB: Read(10) 28 00 00 00 00 00 00 00 01 00
>   [ 202.659311] blk_update_request: I/O error, dev sdm, sector 0
>   [ 202.659314] Buffer I/O error on dev sdm, logical block 0, async page read
>   [ 202.659322] sdm: unable to read partition table
>   [ 202.659633] sd 0:0:11:0: [sdm] FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
>   [ 202.659638] sd 0:0:11:0: [sdm] Sense Key : Not Ready [current]
>   [ 202.659641] sd 0:0:11:0: [sdm] Add. Sense: Logical unit not ready, sanitize in progress
>   [ 202.659645] sd 0:0:11:0: [sdm] CDB: Read(10) 28 00 00 00 00 00 00 00 01 00
>   [ 202.659648] blk_update_request: I/O error, dev sdm, sector 0
>   [ 202.660621] sd 0:0:11:0: [sdm] Spinning up disk...
>   [ 204.067155] Buffer I/O error on dev sdm, logical block 488378624, async page read
>   [ 204.122152] SGI XFS with ACLs, security attributes, no debug enabled
>   [ 204.123494] XFS (dm-0): Mounting V5 Filesystem
>   [ 204.289817] XFS (dm-0): Ending clean mount
>   [ 240.069283] INFO: task systemd-udevd:251 blocked for more than 120 seconds.
>   [ 240.069289] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message
>   [  203.661324] .....................................
>   [ 240.069293] systemd-udevd D
>   [ 240.069296] ffffffffc00c3580 0 251 1 0x00000004
>   [ 240.069301] ffff88007e0e7d18 0000000000000082 ffff88007e0ceeb0 ffff88007e0e7fd8
>   [ 240.069306] ffff88007e0e7fd8 ffff88007e0e7fd8 ffff88007e0ceeb0 ffffffffffffffff
>   [ 240.069311] 0000000000000000 ffffffffc00c35d0 0000000000000001 ffffffffc00c3580
>   [ 240.069316] Call Trace:
>   [ 240.069328] [<ffffffff816a94c9>] schedule+0x29/0x70
>   [ 240.069334] [<ffffffff810b7e85>] async_synchronize_cookie_domain+0x85/0x150
>   [ 240.069340] [<ffffffff810b1910>] ? wake_up_atomic_t+0x30/0x30
>   [ 240.069346] [<ffffffff810b7f87>] async_synchronize_full+0x17/0x20
>   [ 240.069351] [<ffffffff81100790>] load_module+0x1fc0/0x29e0
>   [ 240.069358] [<ffffffff8134bbf0>] ? ddebug_proc_write+0xf0/0xf0
>   [ 240.069365] [<ffffffff81101275>] SyS_init_module+0xc5/0x110
>   [ 240.069371] [<ffffffff816b4fc9>] system_call_fastpath+0x16/0x1b

The scsi mid-level and/or the sd driver sends TEST UNIT READY (TUR) commands and should take note of the NOT READY sense key and should not send READ commands until that condition clears. If we are talking about modern SCSI devices then REQUEST SENSE should respond with progress information.

Doug Gilbert






[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux