HGST SSD sg_format failing on some drives but not all drives

fahadshery

Contributor
Joined
Sep 29, 2017
Messages
179
Hi,

I am using a Broadcom LSI SAS33008-IT controller.
I have 11 HGST HUC101818CS4205 disks.

Some of them are showing they were formatted with Formatted with type 2 protection. See below:
Code:
root@truenas[~]# sg_readcap -l /dev/da0
Read Capacity results:
   Protection: prot_en=1, p_type=1, p_i_exponent=0 [type 2 protection]
   Logical block provisioning: lbpme=0, lbprz=0
   Last LBA=3516328367 (0xd196e9af), Number of logical blocks=3516328368
   Logical block length=512 bytes
   Logical blocks per physical block exponent=3 [so physical block length=4096 bytes]
   Lowest aligned LBA=0
Hence:
   Device size: 1800360124416 bytes, 1716957.2 MiB, 1800.36 GB
root@truenas[~]# smartctl --xall /dev/da0
smartctl 7.2 2020-12-30 r5155 [FreeBSD 12.2-RELEASE-p11 amd64] (local build)
Copyright (C) 2002-20, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Vendor:               HGST
Product:              HUC101818CS4205
Revision:             NE02
Compliance:           SPC-4
User Capacity:        1,800,360,124,416 bytes [1.80 TB]
Logical block size:   512 bytes
Physical block size:  4096 bytes
Formatted with type 2 protection
8 bytes of protection information per logical block
LU is fully provisioned
Rotation Rate:        10520 rpm
Form Factor:          2.5 inches
Logical Unit id:      0x5000cca02c37591c
Serial number:        08GZEMBA
Device type:          disk
Transport protocol:   SAS (SPL-3)
Local Time is:        Wed Dec 22 03:37:16 2021 PST
SMART support is:     Available - device has SMART capability.
SMART support is:     Enabled
Temperature Warning:  Enabled
Read Cache is:        Enabled
Writeback Cache is:   Disabled

=== START OF READ SMART DATA SECTION ===
SMART Health Status: OK

Current Drive Temperature:     27 C
Drive Trip Temperature:        55 C


Now if I try to format it, it gives the following error:
Code:
sg_format --format --size=512 /dev/da1 -v
    HGST      HUC101818CS4205   NE02   peripheral_type: disk [0x0]
      PROTECT=1
      << supports protection information>>
      Unit serial number:         08GYSP8A
      LU name: 5000cca02c361eb4
    mode sense(10) cdb: [5a 00 01 00 00 00 00 00 fc 00]
Mode Sense (block descriptor) data, prior to changes:
  Number of blocks=3516328368 [0xd196e9b0]
  Block size=512 [0x200]
 
  A FORMAT UNIT will commence in 5 seconds
    ALL data on /dev/da1 will be DESTROYED
        Press control-C to abort
    Format unit cdb: [04 18 00 00 00 00]
Format unit:
Fixed format, current; Sense key: Data Protect
Additional sense: Access denied - no access rights
Format unit command: Data protect, type: sense key; write protected media?
FORMAT UNIT failed


I plan to pass my LSI controller to TrueNas VM.

I also looked at this magnificent thread and this post.

I was able to format some of the same drives but was unable to format some other drives which are the same brand and capacity.

any pointers would be appreciated.
 
Top