Reformat HP 3PAR HGST 520 byte drives to 512 or 4096 bytes

Hello,

I currently have a number of HP HGST 14TB drives (from decommissioned HP 3PAR Storage) that are currently 520 bytes formatted. I have followed several forum post instructions to reformat them to 512 bytes with no success. I continue getting the error “Access denied - no access rights.”

I have installed sg and sedutil-cli packages and attempted to reformat and change block size with no results. Below is what I attempted with all the information:

NOTE 01: Drives attempting to format are /dev/sg1 to 6 (/dev/sg0 is the OS drive)
NOTE 02: I am running CentOS 7 OS VM with 2 vCPU and 4GB RAM
[root@localhost ~]# sg_scan -i
/dev/sg0: scsi0 channel=0 id=0 lun=0
ATA SAMSUNG MZ7WD480 203Q [rmb=0 cmdq=1 pqual=0 pdev=0x0]
/dev/sg1: scsi0 channel=0 id=1 lun=0
HGST HCBF1200S5xeF010 3P05 [rmb=0 cmdq=1 pqual=0 pdev=0x0]
/dev/sg2: scsi0 channel=0 id=2 lun=0
HGST HCBF1200S5xeF010 3P05 [rmb=0 cmdq=1 pqual=0 pdev=0x0]
/dev/sg3: scsi0 channel=0 id=3 lun=0
HGST HCBF1200S5xeF010 3P05 [rmb=0 cmdq=1 pqual=0 pdev=0x0]
/dev/sg4: scsi0 channel=0 id=4 lun=0
HGST HCBF1200S5xeF010 3P05 [rmb=0 cmdq=1 pqual=0 pdev=0x0]
/dev/sg5: scsi0 channel=0 id=5 lun=0
HGST HCBF1200S5xeF010 3P05 [rmb=0 cmdq=1 pqual=0 pdev=0x0]
/dev/sg6: scsi1 channel=0 id=0 lun=0 [em]
ATA SDEZS25-240G-Z01 0400 [rmb=0 cmdq=0 pqual=0 pdev=0x0]
[root@localhost ~]#
[root@localhost ~]#
[root@localhost ~]# sg_format /dev/sg1
HGST HCBF1200S5xeF010 3P05 peripheral_type: disk [0x0]
<< supports protection information>>
Mode Sense (block descriptor) data, prior to changes:
Number of blocks=293028246 [0x11774196]
Block size=4096 [0x1000]
Read Capacity (10) results:
Number of logical blocks=2344225968
Logical block size=520 bytes
Warning: mode sense and read capacity report different block sizes [4096,520]
Probably needs format
No changes made. To format use ‘–format’. To resize use ‘–resize’
[root@localhost ~]#
[root@localhost ~]# sg_format -v --format --size=520 /dev/sg1
inquiry cdb: 12 00 00 00 24 00
HGST HCBF1200S5xeF010 3P05 peripheral_type: disk [0x0]
PROTECT=1
<< supports protection information>>
mode sense (10) cdb: 5a 00 01 00 00 00 00 00 fc 00
mode sense (10): pass-through requested 252 bytes but got 28 bytes
Mode Sense (block descriptor) data, prior to changes:
Number of blocks=293028246 [0x11774196]
Block size=4096 [0x1000]
mode select (10) cdb: 55 11 00 00 00 00 00 00 1c 00

A FORMAT will commence in 10 seconds
ALL data on /dev/sg1 will be DESTROYED
Press control-C to abort
A FORMAT will commence in 5 seconds
ALL data on /dev/sg1 will be DESTROYED
Press control-C to abort
format cdb: 04 18 00 00 00 00
format unit: Fixed format, current; Sense key: Data Protect
Additional sense: Access denied - no access rights
Format command failed
FORMAT failed
[root@localhost ~]#
[root@localhost ~]#
[root@localhost ~]# cat /sys/module/libata/parameters/allow_tpm
1
[root@localhost ~]# sedutil-cli --scan
Scanning for Opal compliant disks
/dev/sda No SAMSUNG MZ7WD480HCGM-00003 DXM9203Q
/dev/sdb No
/dev/sdc No
/dev/sdd No
/dev/sde No
/dev/sdf No
/dev/sdg No SDEZS25-240G-Z01 EF870400
No more disks present ending scan
[root@localhost ~]#
[root@localhost ~]#
[root@localhost ~]# sedutil-cli --query /dev/sdb
Invalid or unsupported disk /dev/sdb
[root@localhost ~]#

Could anyone provide any additional insight or assistance or another method to try and reformat the drives. Any help would be greatly appreciated. Thank you.

1 Like

I have a similar issue with these drives, i have tried HUGO 7.0.3, sgformat, and WDCKIT 2.16.0.0, It was roughly 6 months ago last I attempted to get these drives to cooperate. This is the first I’ve heard of someone else trying these HPE 3PAR 14tb SAS drives and having issues, I thought I was the only one either trying it, or having issues.

I will grab a couple tonight and re-run everything to give data so that maybe between your errors, and mine, maybe we can get somewhere with this.

If i rememeber correctly, mine would format to 512, but any time i would try to load a file system on them, it would freak out.

Quick follow up, I found a newer version of HUGO 7.4.5, which seems to have solved my format issue, i noticed the 7.0.3 version was older than my drives. You might try that version (available online) if you are still having issues formatting the drives. I was able to successfully format one of the drives to 512k, put a file system on it, and transfer some data to it … now i get to format drives for the next few weeks, as they take around 22hrs to format.

I have Debian 11 and Hugo 7.4.5 installed but I am still getting the error “format failed.” The command I am using is the following:

NOTE: #1 is the drive I am trying to format and #2 is the OS drive

root@debian11:~# hugo show
Manuf. Model Serial Interface Capacity Type Firmware

  1. HGST <model#> <serial#> SAS 1950 GB SSD 3P02
  2. SanDisk <model#> <serial#> SATA 240 GB SSD EF870400

root@debian11:~# hugo format -m <model#> --fastformat -n max -b 512

** WARNING MESSAGE ***
Are you sure you want to Format this device? (Y/N) y

Format device on 1 Device(s)…
Failed: Format command Failed on device <serial#>.
Device will not be formatted.

Any help would be greatly appreciated. Thank you.