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.