I seem to be having this same problem when trying to convert the 520 to 512 (can do 4096 per drive sticker too)
Get a Protected Error message when attempt to format 520 to clear data
Code:
sg_format --format --size=520 -v -e /dev/sda
NETAPP X317_SMBPE06TA07 NA00 peripheral_type: disk [0x0]
PROTECT=0
Unit serial number: ZAD2KJTW
LU name: 5000c50094bfb1db
mode sense(10) cdb: [5a 00 01 00 00 00 00 00 fc 00]
Mode Sense (block descriptor) data, prior to changes:
block count maxed out, set <<longlba>>
mode sense(10) cdb: [5a 10 01 00 00 00 00 00 fc 00]
<<< longlba flag set (64 bit lba) >>>
Number of blocks=11521787400 [0x2aec08608]
Block size=520 [0x208]
A FORMAT UNIT will commence in 15 seconds
ALL data on /dev/sda will be DESTROYED
Press control-C to abort
A FORMAT UNIT will commence in 10 seconds
ALL data on /dev/sda will be DESTROYED
Press control-C to abort
A FORMAT UNIT will commence in 5 seconds
ALL data on /dev/sda will be DESTROYED
Press control-C to abort
Format unit cdb: [04 18 00 00 00 00]
Format unit:
Descriptor format, current; Sense key: Data Protect
Additional sense: Access denied - no access rights
Descriptor type: Information: 0x0000000000000000
Descriptor type: Field replaceable unit code: 0x0
Descriptor type: Vendor specific [0x80]
00 00 00 00 00 20 00 00 00 00 00 00 00 00
Format unit command: Data protect, type: sense key; write protected media?
FORMAT UNIT failed
Does not even start when trying to format direct to 512 (same with 4096)
Code:
sg_format --format --size=512 -v -e /dev/sda
NETAPP X317_SMBPE06TA07 NA00 peripheral_type: disk [0x0]
PROTECT=0
Unit serial number: ZAD2KJTW
LU name: 5000c50094bfb1db
mode sense(10) cdb: [5a 00 01 00 00 00 00 00 fc 00]
Mode Sense (block descriptor) data, prior to changes:
block count maxed out, set <<longlba>>
mode sense(10) cdb: [5a 10 01 00 00 00 00 00 fc 00]
<<< longlba flag set (64 bit lba) >>>
Number of blocks=11521787400 [0x2aec08608]
Block size=520 [0x208]
mode select(10) cdb: [55 11 00 00 00 00 00 00 24 00]
mode select(10):
Descriptor format, current; Sense key: Data Protect
Additional sense: Access denied - no access rights
Descriptor type: Information: 0x0000000000000000
Descriptor type: Field replaceable unit code: 0x0
Descriptor type: Vendor specific [0x80]
00 00 00 00 00 20 00 00 00 00 00 00 00 00
MODE SELECT command: Data protect, type: sense key; write protected media?
Results are same if use /dev/sda or /dev/sg0 for dive up until last drive on list.
sg_format -v --format --six --size=512 /dev/sda and sg_format -v --format --six --size=520 /dev/sda both give same results as above.
Looking over the posts a few have referred to setblocksize but I see no package in both debian or in rhel systems that will allow this install. setblocksize -b512 -t1200 /dev/sg0 if run does nothing as the package does not exist.
When sg_sanitize -B -v /dev/sg0 is run this is the output.
Code:
sg_sanitize -B -v /dev/sg0
NETAPP X317_SMBPE06TA07 NA00 peripheral_type: disk [0x0]
PROTECT=0
Unit serial number: ZAD2KJTW
LU name: 5000c50094bfb1db
A SANITIZE will commence in 15 seconds
ALL data on /dev/sg0 will be DESTROYED
Press control-C to abort
A SANITIZE will commence in 10 seconds
ALL data on /dev/sg0 will be DESTROYED
Press control-C to abort
A SANITIZE will commence in 5 seconds
ALL data on /dev/sg0 will be DESTROYED
Press control-C to abort
Sanitize:
Descriptor format, current; Sense key: Illegal Request
Additional sense: Invalid field in cdb
Descriptor type: Sense key specific: Field pointer:
Error in Command: byte 1 bit 4
Descriptor type: Field replaceable unit code: 0x1
Descriptor type: Vendor specific [0x80]
00 00 00 00 ff 20 00 00 00 00 00 00 00 00
Sanitize failed: Illegal request, type: sense key, apart from Invalid opcode
Their is also a reference to sedutil-cli but again not seeing the program on any repo.
As with everyone here no data on the drives just tying to remove the 520 byte sectors so that the drive can be made useful