How to reformat HDD & SSD to 512B Sector Size

Notice: Page may contain affiliate links for which we may earn a small commission through services like Amazon Affiliates or Skimlinks.

SmilinJoe

New Member
Sep 27, 2021
6
1
3
First did you check smart(ctl) to make sure you do not have any protection enabled on the drive? Like type 2 protection. Even after changing the block type 2 protection will result in an input/output error when you try and write to the drive.

If you do that needs to be changed.

Did you only change the block size or did you change the block size and perform a low level format after the change?
Doesn't look protection is turned on. I used the commands from this page: Henderson's Law. Had issues with sg_format in the beginning, so I went the camcontrol route. Thought it was equivalent.

Thanks.
 

itronin

Well-Known Member
Nov 24, 2018
1,236
795
113
Denver, Colorado
Doesn't look protection is turned on. I used the commands from this page: Henderson's Law. Had issues with sg_format in the beginning, so I went the camcontrol route. Thought it was equivalent.

Thanks.
so you performed the magic camcontrol command to change the block size to 512 and then performed a camcontrol format?

I don't know whether diskinfo reports protection type. I do know smartctl will. would you mind posting your smartctl output for a couple of the drives just to be sure?

your symptoms are consistent with both type 2 protection being enabled and not low level formatting the drive after changing the block size. Only reason I'm asking.
 

SmilinJoe

New Member
Sep 27, 2021
6
1
3
so you performed the magic camcontrol command to change the block size to 512 and then performed a camcontrol format?

I don't know whether diskinfo reports protection type. I do know smartctl will. would you mind posting your smartctl output for a couple of the drives just to be sure?

your symptoms are consistent with both type 2 protection being enabled and not low level formatting the drive after changing the block size. Only reason I'm asking.
Yeah I ran the commands just like he had.

Here are 3 drives:

root@truenas[~]# smartctl -x /dev/da0
smartctl 7.2 2020-12-30 r5155 [FreeBSD 12.2-RELEASE-p9 amd64] (local build)
Copyright (C) 2002-20, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Vendor: SEAGATE
Product: DKS2F-H6R0SS
Revision: 7FA6
Compliance: SPC-3
User Capacity: 6,001,175,126,016 bytes [6.00 TB]
Logical block size: 512 bytes
Physical block size: 4096 bytes
LU is fully provisioned
Rotation Rate: 7200 rpm
Form Factor: 3.5 inches
Logical Unit id: 0x5000c50086295e6b
Serial number: Z4D4QWD90000R710TMPJ
Device type: disk
Transport protocol: SAS (SPL-3)
Local Time is: Mon Sep 27 15:31:12 2021 PDT
SMART support is: Available - device has SMART capability.
SMART support is: Enabled
Temperature Warning: Disabled or Not Supported
Read Cache is: Enabled
Writeback Cache is: Disabled

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

Grown defects during certification = 0
Total blocks reassigned during format = 0
Total new blocks reassigned = 0
Power on minutes since format = 1759
Current Drive Temperature: 47 C
Drive Trip Temperature: 68 C

Manufactured in week 42 of year 2016
Specified cycle count over device lifetime: 10000
Accumulated start-stop cycles: 422
Specified load-unload count over device lifetime: 300000
Accumulated load-unload cycles: 1665
Elements in grown defect list: 0

Vendor (Seagate Cache) information
Blocks sent to initiator = 4568
Blocks received from initiator = 0
Blocks read from cache and sent to initiator = 459
Number of read and write commands whose size <= segment size = 14
Number of read and write commands whose size > segment size = 0

Vendor (Seagate/Hitachi) factory information
number of hours powered up = 30093.93
number of minutes until next internal SMART test = 46

Error counter log:
Errors Corrected by Total Correction Gigabytes Total
ECC rereads/ errors algorithm processed uncorrected
fast | delayed rewrites corrected invocations [10^9 bytes] errors
read: 7925747 0 0 7925747 0 0.002 0
write: 0 0 0 0 0 0.010 0

Non-medium error count: 0


[GLTSD (Global Logging Target Save Disable) set. Enable Save with '-S on']
No Self-tests have been logged

Background scan results log
Status: no scans active
Accumulated power on time, hours:minutes 30093:56 [1805636 minutes]
Number of background scans performed: 0, scan progress: 0.00%
Number of background medium scans performed: 0

Protocol Specific port log page for SAS SSP
relative target port id = 1
generation code = 0
number of phys = 1
phy identifier = 0
attached device type: expander device
attached reason: SMP phy control function
reason: loss of dword synchronization
negotiated logical link rate: phy enabled; 12 Gbps
attached initiator port: ssp=0 stp=0 smp=0
attached target port: ssp=0 stp=0 smp=1
SAS address = 0x5000c50086295e69
attached SAS address = 0x50016360021ef7bf
attached phy identifier = 2
Invalid DWORD count = 23
Running disparity error count = 22
Loss of DWORD synchronization = 8
Phy reset problem = 6
Phy event descriptors:
Invalid word count: 23
Running disparity error count: 22
Loss of dword synchronization count: 8
Phy reset problem count: 6
relative target port id = 2
generation code = 0
number of phys = 1
phy identifier = 1
attached device type: no device attached
attached reason: unknown
reason: unknown
negotiated logical link rate: phy enabled; unknown
attached initiator port: ssp=0 stp=0 smp=0
attached target port: ssp=0 stp=0 smp=0
SAS address = 0x5000c50086295e6a
attached SAS address = 0x0
attached phy identifier = 0
Invalid DWORD count = 0
Running disparity error count = 0
Loss of DWORD synchronization = 0
Phy reset problem = 0
Phy event descriptors:
Invalid word count: 0
Running disparity error count: 0
Loss of dword synchronization count: 0
Phy reset problem count: 0

root@truenas[~]# smartctl -x /dev/da1
smartctl 7.2 2020-12-30 r5155 [FreeBSD 12.2-RELEASE-p9 amd64] (local build)
Copyright (C) 2002-20, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Vendor: SEAGATE
Product: DKS2F-H6R0SS
Revision: 7FA6
Compliance: SPC-3
User Capacity: 6,001,175,126,016 bytes [6.00 TB]
Logical block size: 512 bytes
Physical block size: 4096 bytes
LU is fully provisioned
Rotation Rate: 7200 rpm
Form Factor: 3.5 inches
Logical Unit id: 0x5000c500862a552f
Serial number: Z4D4QKE90000R7093BV6
Device type: disk
Transport protocol: SAS (SPL-3)
Local Time is: Mon Sep 27 15:31:14 2021 PDT
SMART support is: Available - device has SMART capability.
SMART support is: Enabled
Temperature Warning: Disabled or Not Supported
Read Cache is: Enabled
Writeback Cache is: Disabled

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

Grown defects during certification = 0
Total blocks reassigned during format = 0
Total new blocks reassigned = 0
Power on minutes since format = 7078
Current Drive Temperature: 46 C
Drive Trip Temperature: 68 C

Manufactured in week 42 of year 2016
Specified cycle count over device lifetime: 10000
Accumulated start-stop cycles: 422
Specified load-unload count over device lifetime: 300000
Accumulated load-unload cycles: 1663
Elements in grown defect list: 0

Vendor (Seagate Cache) information
Blocks sent to initiator = 4184
Blocks received from initiator = 0
Blocks read from cache and sent to initiator = 459
Number of read and write commands whose size <= segment size = 5
Number of read and write commands whose size > segment size = 0

Vendor (Seagate/Hitachi) factory information
number of hours powered up = 30093.83
number of minutes until next internal SMART test = 56

Error counter log:
Errors Corrected by Total Correction Gigabytes Total
ECC rereads/ errors algorithm processed uncorrected
fast | delayed rewrites corrected invocations [10^9 bytes] errors
read: 7920127 0 0 7920127 0 0.002 0
write: 0 0 0 0 0 0.007 0

Non-medium error count: 0


[GLTSD (Global Logging Target Save Disable) set. Enable Save with '-S on']
No Self-tests have been logged

Background scan results log
Status: no scans active
Accumulated power on time, hours:minutes 30093:50 [1805630 minutes]
Number of background scans performed: 0, scan progress: 0.00%
Number of background medium scans performed: 0

Protocol Specific port log page for SAS SSP
relative target port id = 1
generation code = 0
number of phys = 1
phy identifier = 0
attached device type: expander device
attached reason: SMP phy control function
reason: unknown
negotiated logical link rate: phy enabled; 12 Gbps
attached initiator port: ssp=0 stp=0 smp=0
attached target port: ssp=0 stp=0 smp=1
SAS address = 0x5000c500862a552d
attached SAS address = 0x50016360021ef7bf
attached phy identifier = 3
Invalid DWORD count = 23
Running disparity error count = 22
Loss of DWORD synchronization = 6
Phy reset problem = 6
Phy event descriptors:
Invalid word count: 23
Running disparity error count: 22
Loss of dword synchronization count: 6
Phy reset problem count: 6
relative target port id = 2
generation code = 0
number of phys = 1
phy identifier = 1
attached device type: no device attached
attached reason: unknown
reason: unknown
negotiated logical link rate: phy enabled; unknown
attached initiator port: ssp=0 stp=0 smp=0
attached target port: ssp=0 stp=0 smp=0
SAS address = 0x5000c500862a552e
attached SAS address = 0x0
attached phy identifier = 0
Invalid DWORD count = 0
Running disparity error count = 0
Loss of DWORD synchronization = 0
Phy reset problem = 0
Phy event descriptors:
Invalid word count: 0
Running disparity error count: 0
Loss of dword synchronization count: 0
Phy reset problem count: 0

root@truenas[~]# smartctl -x /dev/da2
smartctl 7.2 2020-12-30 r5155 [FreeBSD 12.2-RELEASE-p9 amd64] (local build)
Copyright (C) 2002-20, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Vendor: SEAGATE
Product: DKS2F-H6R0SS
Revision: 7FA6
Compliance: SPC-3
User Capacity: 6,001,175,126,016 bytes [6.00 TB]
Logical block size: 512 bytes
Physical block size: 4096 bytes
LU is fully provisioned
Rotation Rate: 7200 rpm
Form Factor: 3.5 inches
Logical Unit id: 0x5000c50086296f57
Serial number: Z4D4RX7V0000R709YV2P
Device type: disk
Transport protocol: SAS (SPL-3)
Local Time is: Mon Sep 27 15:31:16 2021 PDT
SMART support is: Available - device has SMART capability.
SMART support is: Enabled
Temperature Warning: Disabled or Not Supported
Read Cache is: Enabled
Writeback Cache is: Disabled

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

Grown defects during certification = 1
Total blocks reassigned during format = 1
Total new blocks reassigned = 0
Power on minutes since format = 7225
Current Drive Temperature: 42 C
Drive Trip Temperature: 68 C

Manufactured in week 42 of year 2016
Specified cycle count over device lifetime: 10000
Accumulated start-stop cycles: 424
Specified load-unload count over device lifetime: 300000
Accumulated load-unload cycles: 1665
Elements in grown defect list: 1

Vendor (Seagate Cache) information
Blocks sent to initiator = 4552
Blocks received from initiator = 0
Blocks read from cache and sent to initiator = 459
Number of read and write commands whose size <= segment size = 14
Number of read and write commands whose size > segment size = 0

Vendor (Seagate/Hitachi) factory information
number of hours powered up = 30093.30
number of minutes until next internal SMART test = 3

Error counter log:
Errors Corrected by Total Correction Gigabytes Total
ECC rereads/ errors algorithm processed uncorrected
fast | delayed rewrites corrected invocations [10^9 bytes] errors
read: 7918964 0 0 7918964 0 0.002 0
write: 0 0 0 0 0 0.011 0

Non-medium error count: 0


[GLTSD (Global Logging Target Save Disable) set. Enable Save with '-S on']
No Self-tests have been logged

Background scan results log
Status: no scans active
Accumulated power on time, hours:minutes 30093:18 [1805598 minutes]
Number of background scans performed: 0, scan progress: 0.00%
Number of background medium scans performed: 0

Protocol Specific port log page for SAS SSP
relative target port id = 1
generation code = 0
number of phys = 1
phy identifier = 0
attached device type: expander device
attached reason: SMP phy control function
reason: unknown
negotiated logical link rate: phy enabled; 12 Gbps
attached initiator port: ssp=0 stp=0 smp=0
attached target port: ssp=0 stp=0 smp=1
SAS address = 0x5000c50086296f55
attached SAS address = 0x50016360021ef7bf
attached phy identifier = 6
Invalid DWORD count = 23
Running disparity error count = 22
Loss of DWORD synchronization = 7
Phy reset problem = 6
Phy event descriptors:
Invalid word count: 23
Running disparity error count: 22
Loss of dword synchronization count: 7
Phy reset problem count: 6
relative target port id = 2
generation code = 0
number of phys = 1
phy identifier = 1
attached device type: no device attached
attached reason: unknown
reason: unknown
negotiated logical link rate: phy enabled; unknown
attached initiator port: ssp=0 stp=0 smp=0
attached target port: ssp=0 stp=0 smp=0
SAS address = 0x5000c50086296f56
attached SAS address = 0x0
attached phy identifier = 0
Invalid DWORD count = 0
Running disparity error count = 0
Loss of DWORD synchronization = 0
Phy reset problem = 0
Phy event descriptors:
Invalid word count: 0
Running disparity error count: 0
Loss of dword synchronization count: 0
Phy reset problem count: 0
 

itronin

Well-Known Member
Nov 24, 2018
1,236
795
113
Denver, Colorado
Yeah I ran the commands just like he had.

Here are 3 drives:
strange, no type 2 protection. Its almost like the drive hasn't been formatted with that error... hmmm... hearing hooves but thinking zebras...

but lets continue with horses for a moment.

After I re-block I perform a long format, quick doesn't always work IME. I know I tried quick on some reblocked 16TB seagate exos (512 to 4k) and ended up having to do a long format. no errors on the quick format but no joy using the disks. I'm also going to run BB on used drives too so it just ends up being part of the pre-deployment drive workout.

If its a zebra we're after then could be SED but a quick (and a long format) should have failed. Your drive does support SED according to the specsheet.

If you have the time it might be worth doing a long format on one of the drives while you work different avenues on your other drives.
 

SmilinJoe

New Member
Sep 27, 2021
6
1
3
strange, no type 2 protection. Its almost like the drive hasn't been formatted with that error... hmmm... hearing hooves but thinking zebras...

but lets continue with horses for a moment.

After I re-block I perform a long format, quick doesn't always work IME. I know I tried quick on some reblocked 16TB seagate exos (512 to 4k) and ended up having to do a long format. no errors on the quick format but no joy using the disks. I'm also going to run BB on used drives too so it just ends up being part of the pre-deployment drive workout.

If its a zebra we're after then could be SED but a quick (and a long format) should have failed. Your drive does support SED according to the specsheet.

If you have the time it might be worth doing a long format on one of the drives while you work different avenues on your other drives.
I kicked off a full, slow sg_format last night that should be finishing up shortly. We'll see what happens.

Thanks.
 
  • Like
Reactions: itronin

Dave Corder

Active Member
Dec 21, 2015
294
189
43
41
Following this thread, as I'm adding my first SAS drives to my FreeNAS server (all SATA until now) and have the first camcontrol low level format going right now after converting the first drive to 512 byte
 

Dave Corder

Active Member
Dec 21, 2015
294
189
43
41
why 512 and not 4096? Lots of teeny tiny files? No ISO storage? ;)
Uh...didn't realize that was an option, actually, for my ISO storage.

However, these are 8 TB disks slated to replace some failing 4 TB drives that are already using 512b (pool consists of a bunch of two-drive mirrors). So probably a good idea to stick with 512b to keep my pool happy...
 

SmilinJoe

New Member
Sep 27, 2021
6
1
3
strange, no type 2 protection. Its almost like the drive hasn't been formatted with that error... hmmm... hearing hooves but thinking zebras...

but lets continue with horses for a moment.

After I re-block I perform a long format, quick doesn't always work IME. I know I tried quick on some reblocked 16TB seagate exos (512 to 4k) and ended up having to do a long format. no errors on the quick format but no joy using the disks. I'm also going to run BB on used drives too so it just ends up being part of the pre-deployment drive workout.

If its a zebra we're after then could be SED but a quick (and a long format) should have failed. Your drive does support SED according to the specsheet.

If you have the time it might be worth doing a long format on one of the drives while you work different avenues on your other drives.
Same result. Did the 12 hour sg_format on all the drives, and I still get the input/output errors. Anything else I can try before trying to send these drives back?

Thanks.
 

itronin

Well-Known Member
Nov 24, 2018
1,236
795
113
Denver, Colorado
Same result. Did the 12 hour sg_format on all the drives, and I still get the input/output errors. Anything else I can try before trying to send these drives back?

Thanks.
Only things I can guess at are (1) that the drives are SED locked but that should have prevented your formats and block changes and you should have seen errors... Or (2) they were used in something like a Vantara and not offboarded with std firmware (vs. the funky vsp firmware).

But

On most Linux flavors this will tell you want's going on SED-wise
Code:
hdparm -I /dev/MyDeviceName
On Truenas
Code:
sedutil-cli --scan
will list the drives that are capable but doesn't tell you if its active:

For example:
Code:
root@redacted[/mnt/Disk/Users/redacted]# sedutil-cli --scan
Scanning for Opal compliant disks
/dev/da0   No      VMware  Virtual disk     2.0 
/dev/da1     E     HGST    HUH721008AL5201  B384
/dev/da10  No      HGST    HUH728080AL5200  A515
/dev/da11  No      HGST    HUH728080AL5200  A515
/dev/da12    E     HGST    HUH721008AL5201  B384
/dev/da13    E     HGST    HUH721008AL5201  B384
/dev/da14    E     HGST    HUH721008AL5201  B384
/dev/da15    E     HGST    HUH721008AL5201  B384
/dev/da16    E     HGST    HUH721008AL5201  B384
/dev/da2   No      HGST    HUH728080AL5200  A515
/dev/da3   No      HGST    HUH728080AL5200  A515
/dev/da4   No      HGST    HUH728080AL5200  A515
/dev/da5   No      HGST    HUH728080AL5200  A515
/dev/da6   No      HGST    HUH728080AL5200  A515
/dev/da7   No      HGST    HUH728080AL5200  A515
/dev/da8   No      HGST    HUH728080AL5200  A515
/dev/da9   No      HGST    HUH728080AL5200  A515
/dev/nvme0     p   INTEL SSDPED1D280GA                      E2010435
No more disks present ending scan
see here: Self-Encrypting Drives |

since you can't use the disks anyway you can always try this:

Code:
sedutil-cli --yesIreallywanttoERASEALLmydatausingthePSID <PSINODASHED> </dev/device>
where the PSID will come from the label on the drive. if there's no psid then not SED capable btw.

FWIW I've seen sort of kind of this type of behavior on 600/900GB SAS spinners (some seagate/some hitachi part #s) that came out of a hitachi vantara . I ended up sending them back ....
 

SmilinJoe

New Member
Sep 27, 2021
6
1
3
Only things I can guess at are (1) that the drives are SED locked but that should have prevented your formats and block changes and you should have seen errors... Or (2) they were used in something like a Vantara and not offboarded with std firmware (vs. the funky vsp firmware).

But

On most Linux flavors this will tell you want's going on SED-wise
Code:
hdparm -I /dev/MyDeviceName
On Truenas
Code:
sedutil-cli --scan
will list the drives that are capable but doesn't tell you if its active:

For example:
Code:
root@redacted[/mnt/Disk/Users/redacted]# sedutil-cli --scan
Scanning for Opal compliant disks
/dev/da0   No      VMware  Virtual disk     2.0
/dev/da1     E     HGST    HUH721008AL5201  B384
/dev/da10  No      HGST    HUH728080AL5200  A515
/dev/da11  No      HGST    HUH728080AL5200  A515
/dev/da12    E     HGST    HUH721008AL5201  B384
/dev/da13    E     HGST    HUH721008AL5201  B384
/dev/da14    E     HGST    HUH721008AL5201  B384
/dev/da15    E     HGST    HUH721008AL5201  B384
/dev/da16    E     HGST    HUH721008AL5201  B384
/dev/da2   No      HGST    HUH728080AL5200  A515
/dev/da3   No      HGST    HUH728080AL5200  A515
/dev/da4   No      HGST    HUH728080AL5200  A515
/dev/da5   No      HGST    HUH728080AL5200  A515
/dev/da6   No      HGST    HUH728080AL5200  A515
/dev/da7   No      HGST    HUH728080AL5200  A515
/dev/da8   No      HGST    HUH728080AL5200  A515
/dev/da9   No      HGST    HUH728080AL5200  A515
/dev/nvme0     p   INTEL SSDPED1D280GA                      E2010435
No more disks present ending scan
see here: Self-Encrypting Drives |

since you can't use the disks anyway you can always try this:

Code:
sedutil-cli --yesIreallywanttoERASEALLmydatausingthePSID <PSINODASHED> </dev/device>
where the PSID will come from the label on the drive. if there's no psid then not SED capable btw.

FWIW I've seen sort of kind of this type of behavior on 600/900GB SAS spinners (some seagate/some hitachi part #s) that came out of a hitachi vantara . I ended up sending them back ....
Well the drives have returned for a refund. That was a learning experience!
 

TheCyberCb

New Member
Nov 16, 2021
1
2
3
Denmark
Thank you for the guide, saved 14 Hitachi SLR5A-S200SS (HUSSL4020ASS600) 200GB SAS SSD's from 2011.
Seems they come from a Hitachi Virtual Storage Platform (PN on the ESD bag: Hitachi 5541877-C), bought at an auktion cheap. (138USD for all 14 SSD's)
They came with a Logical block size of 520 bytes.
Formatted without problems to 512 bytes, after installing the driver for my LSI HBA in CentOS.
 
  • Like
Reactions: Samir and Fritz

DANIELDCMX

New Member
Jan 25, 2021
16
0
1
[QUOTE = "lian, postagem: 314104, membro: 9726"]
Oi, pessoal - tenho maed FW personalizado para ST9600204SS - PM para obter mais informações.
[/CITAR]
amigo você tem esse firmware disponível, eu preciso dele!
friend you have this firmware available, i need it!
 

fahadshery

New Member
Jan 12, 2021
17
4
3
I was able to do it through freenas with the camcontrol cmd when sg_utils didn't work. I have the drives in a zfs pool now and works just fine.
long shot, not sure if you'd see it but do you have the cam control command pls? I have HUC101818CS4205 SSD's with type 2 protection on. I am getting Access denied when trying to format using sg_format.
 

Sergy

New Member
Jan 15, 2022
3
2
3
HP/HGST 400 ГБ 2.5" 12Gb/s SAS SSD HUSML 4040ASS600 (520)
what should I do? I don't understand the code....



ubuntu@ubuntu:~$ sudo sg_scan -i
/dev/sg0: scsi9 channel=0 id=0 lun=0 [em]
iODD External HDD [rmb=0 cmdq=0 pqual=0 pdev=0x0]
/dev/sg1: scsi9 channel=0 id=0 lun=1 [em]
iODD Virtual CD-Rom [rmb=1 cmdq=0 pqual=0 pdev=0x5]

ubuntu@ubuntu:~$ sudo sg_format --format --size=512 --fmtpinfo=0 /dev/sd0
error opening device file: /dev/sd0: No such file or directory

ubuntu@ubuntu:~$ sudo sg_format --format --size=512 --fmtpinfo=0 /dev/sg0 -v
iODD External HDD peripheral_type: disk [0x0]
PROTECT=0
Unit serial number: S25WJ9CB612866
LU name: 60024e920573a2750000000000000000
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=625142448 [0x2542eab0]
Block size=512 [0x200]

A FORMAT UNIT will commence in 5 seconds
ALL data on /dev/sg0 will be DESTROYED
Press control-C to abort
format unit cdb: 04 18 00 00 00 00
format unit:
Fixed format, current; Sense key: Illegal Request
Additional sense: Invalid command operation code
Format unit command: Illegal request, invalid opcode sense key
FORMAT UNIT failed

sg_scan -i
sg_scan: Error opening /dev/sg0 : Permission denied
/dev/sg1: scsi9 channel=0 id=0 lun=1 [em]
iODD Virtual CD-Rom [rmb=1 cmdq=0 pqual=0 pdev=0x5]
 
  • Like
Reactions: Samir

frogtech

Well-Known Member
Jan 4, 2016
1,482
272
83
35
HP/HGST 400 ГБ 2.5" 12Gb/s SAS SSD HUSML 4040ASS600 (520)
what should I do? I don't understand the code....



ubuntu@ubuntu:~$ sudo sg_scan -i
/dev/sg0: scsi9 channel=0 id=0 lun=0 [em]
iODD External HDD [rmb=0 cmdq=0 pqual=0 pdev=0x0]
/dev/sg1: scsi9 channel=0 id=0 lun=1 [em]
iODD Virtual CD-Rom [rmb=1 cmdq=0 pqual=0 pdev=0x5]

ubuntu@ubuntu:~$ sudo sg_format --format --size=512 --fmtpinfo=0 /dev/sd0
error opening device file: /dev/sd0: No such file or directory

ubuntu@ubuntu:~$ sudo sg_format --format --size=512 --fmtpinfo=0 /dev/sg0 -v
iODD External HDD peripheral_type: disk [0x0]
PROTECT=0
Unit serial number: S25WJ9CB612866
LU name: 60024e920573a2750000000000000000
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=625142448 [0x2542eab0]
Block size=512 [0x200]

A FORMAT UNIT will commence in 5 seconds
ALL data on /dev/sg0 will be DESTROYED
Press control-C to abort
format unit cdb: 04 18 00 00 00 00
format unit:
Fixed format, current; Sense key: Illegal Request
Additional sense: Invalid command operation code
Format unit command: Illegal request, invalid opcode sense key
FORMAT UNIT failed

sg_scan -i
sg_scan: Error opening /dev/sg0 : Permission denied
/dev/sg1: scsi9 channel=0 id=0 lun=1 [em]
iODD Virtual CD-Rom [rmb=1 cmdq=0 pqual=0 pdev=0x5]
I'd probably just try directly connecting it instead of using what to me appears to be you housing the drive inside an enclosure that also has some emulation firmware that runs on top of it for booting from ISOs stored on the disk. You'd even need a SAS backplane or a breakout cable that has the entire SAS interface (/w power) on it.
 
  • Like
Reactions: Samir

Sergy

New Member
Jan 15, 2022
3
2
3
It seems to me that - ubuntu 18 live - just does not see my controler -Dell TXCMC ASR-8405 SAS/SATA 12Gb/s - although it is connected in HBA mode directly. ubuntu 18 live - shows only CD and SATA .It is necessary to mount the controller to begin with.
 
  • Like
Reactions: Samir

KablammoNick

New Member
Jan 24, 2022
1
2
3
Please excuse the stream-of-consciousness post. Not sure how best to get all the information in one spot...

Got some 200Gb SSD’s in an EMC2 enclosure.
Drives P/N: MZ3S9200XACP-000C3.
They appear to be SATA drives (as missing the joined connector bit usually seen for SAS drives)

The Interposers are 250-136-903C, as per https://www.reddit.com/r/homelab/comments/bxx24u it sort of says they’re SAS, but the connector has me confused.

Can’t seem to format them to 512b.

Tried Ubuntu live USB and sg3utils as per 10TB for $70! How to format 520b sector SAS drives to 512b - EMC, Netapp, HP, Dell, etc. - YouTube 1
“sg_format --format --size=512 --fmtpinfo=0 /dev/sg0”

  • Added -6 and -v
  • Errors with “Illegal request, Invalid opcode, type: sense key + asc,ascq”
Tried FreeBSD live USB and camcontrol as per da0: invalid sector size 520 and Repurposing netapp disk trays with FreeBSD and ZFS – Sysop.ca
“camcontrol cmd da1 -v -c “15 10 0 0 v:i1 0” 12 -o 12 “0 0 0 8 0 0:i3 0 v:i3” 512”

  • Fails with error (can’t recall it now but can drop back into FreeBSD to get it specifically if someone wants it)
Have tried both sets of commands with:

  • Drive connected to SATA port on motherboard
  • Drive connected to HBA via SAS connector
  • Drive connected in disk shelf via SAS connector (to the ‘bottom’ port as described https://www.reddit.com/r/homelab/comments/7kumy8 and a few other posts)
  • HBA is an LSI 9200-8i, identifies as IBM 6Gb Perf HBA on firmware 15.00.00.00-IT.
 
  • Like
Reactions: yukas and Samir