Switch to full style
Data recovery and disk repair questions and discussions related to old-fashioned SATA, SAS, SCSI, IDE, MFM hard drives - any type of storage device that has moving parts
Post a reply

Lowest level SCSI format

May 5th, 2020, 4:39

Hi Gurus,

The sinopsis:

Hitachi H101212SESUN1.2T connected to LSI MegaRAID 9361-8i was formatting using "sg_format -vvvveQF -f 1" when sudden onset of idiocy struck operator who rebooted server without checking whether format finished or not.

As a result disk is invisible to OS, no block device, but somewhat visible to RAID controller however shows 0 KB and UBad status, i.e.:
----------------------------------------------------------------------------
EID:Slt DID State DG Size Intf Med SED PI SeSz Model Sp Type
----------------------------------------------------------------------------
252:0 8 JBOD - 1.089 TB SAS HDD N N 512B H101212SESUN1.2T U -
252:1 9 UBad - 0 KB SAS HDD N N 512B H101212SESUN1.2T U -

I wonder if there is a way to format this drive using either sg_utils or RAID card commands. OS is Centos 7 kind and has sg_utils and Megacli/storcli installed but sg_utils require block device to operate which is not there and attempts to run anything using storcli so far were not successful

# /opt/MegaRAID/storcli/storcli64 /c0/e252/s1 show all
Controller = 0
Status = Failure
Description = Show Drive Information Failed.
Detailed Status :
===============
---------------------------------
Drive Status ErrCd ErrMsg
---------------------------------
/c0/e252/s1 Failure 46 -
---------------------------------

# /opt/MegaRAID/storcli/storcli64 /c0/e252/s1 start erase
Controller = 0
Status = Failure
Description = Start Drive Erase Failed.
Detailed Status :
===============
------------------------------------------------------------
Drive Status ErrCd ErrMsg
------------------------------------------------------------
/c0/e252/s1 Failure 255 Start Drive erase is not allowed.
------------------------------------------------------------

Thank you in advance for any suggestions.

Re: Lowest level SCSI format

May 5th, 2020, 6:58

Connect the hard to the HBA-controller and start formatting first. Not in the RAID controller.

Re: Lowest level SCSI format

May 5th, 2020, 17:25

Thank you for suggestion, but as I mentioned before when drive is connected to HBA (which, if I understand correctly, is same card with JBOD enabled) disk is not recognised by OS and no block device created.

Re: Lowest level SCSI format

May 6th, 2020, 6:47

Once again: you need a specially flashed SAS controller, HBA, not RAID. Only HBA can let through the standard SCSI command 04 "FORMAT UNIT" (see SCSI Primary Commands (SPC) standart).
You can issue a command using one of the utilities that your OS supports: Niagara, HUGO, sg_format, etc.

Re: Lowest level SCSI format

May 6th, 2020, 7:04

E123 wrote:Once again: you need a specially flashed SAS controller, HBA, not RAID. Only HBA can let through the standard SCSI command 04 "FORMAT UNIT" (see SCSI Primary Commands (SPC) standart).
You can issue a command using one of the utilities that your OS supports: Niagara, HUGO, sg_format, etc.


LSI MegaRAID 9361-8i in JBOD mode is a nothing else but HBA. Remaining 7 drives are visible to OS and sg_utils, this one is not. Since sg_utils require block device to operate, which, again, is not created by OS, they can't be used to format or query drive in this case.

What I'm asking is there any reasonable way to format drive by path or WWN or whatever else without having block device in OS or the only way to recover disk in this case is manufacturer utility.

Re: Lowest level SCSI format

May 6th, 2020, 7:10

Is the drive connected directly? Drive -> cable -> controller?

Re: Lowest level SCSI format

May 6th, 2020, 7:21

E123 wrote:Is the drive connected directly? Drive -> cable -> controller?


There's disk backplane in between but it's mostly passive.

Re: Lowest level SCSI format

May 6th, 2020, 7:32

¯\_(ツ)_/¯
Try WITHOUT backplain... Try changing the controller...
It is on THESE disks that I can to format not only the user area, but also the service(!) area and return everything back.
Everything is done under Windows on the LSI 1086 (in IT mode) + the usual noname Chinese cable + SCSI Commander, such as Niagara.
Post a reply