Skip to content

Wrong sector size(s) set when unsupported block size passed to openSeaChest_Format --formatUnit #156

@bandogora

Description

@bandogora

The Process

I tried to reformat a couple of Toshiba MG07SCA14TE SAS drives with the --formatUnit command:

root@truenas:~# openSeaChest_Format -d /dev/sg1 --formatUnit=4096 --fastFormat=1 --confirm this-will-erase-data

The Issue

Unfortunately I assumed 4Kn was supported and didn't check first.

The issue is that openSeaChest_Format didn't complain about the unsupported size and ran a format anyways. It looks like instead of selecting 4Kn or staying at 512e the tool chose the largest supported size, which ended up being 528.

root@truenas:~# openSeaChest_Format -d /dev/sg1 --showSupportedFormats
--------------------------------------------------------------------------------
 Logical Block Size  PI-0  PI-1  PI-2  PI-3  Relative Performance  Metadata Size
--------------------------------------------------------------------------------
                512     Y     ?     ?     N                   N/A            N/A
                520     Y     ?     ?     N                   N/A            N/A
*               528     Y     ?     ?     N                   N/A            N/A
--------------------------------------------------------------------------------

The physical sector size is also reported as changed, which seems strange to me(?).

Before the format:

Drive Capacity (TB/TiB): 14.00/12.73
Logical Sector Size (B): 512
Physical Sector Size (B): 4096

After the format:

Drive Capacity (TB/TiB): 13.93/12.67
Logical Sector Size (B): 528
Physical Sector Size (B): 4224

Now I have to reformat the drives (quick format not supported) to go back to full capacity and performance.

Suggested Change

I think the best way of handling this would be for openSeaChest_Format to refuse to attempt a format with a size not reported as being supported; and a flag to override if desired.

More Info

I update the drive firmware from 0102 to 0105 before running the format. I didn't powercycle the system between the firmware update and the format; which was dumb, but probably not the cause of the issue.

openSeaChest_Format Version: 3.0.4-6_2_0 X86_64

Full SATInfo:

/dev/sg1 - MG07SCA14TE - [SN] - 0105 - SCSI
        Vendor ID: TOSHIBA
        Model Number: MG07SCA14TE
        Serial Number:
        Firmware Revision: 0105
        World Wide Name: 5000039978119CC1
        Date Of Manufacture: Week 23, 2019
        Drive Capacity (TB/TiB): 13.93/12.67
        Temperature Data:
                Current Temperature (C): 34
                Highest Temperature (C): Not Reported
                Lowest Temperature (C): Not Reported
        Power On Time:  4 years 25 days 7 hours 34 minutes
        Power On Hours: 35647.57
        MaxLBA: 26382172159
        Native MaxLBA: Not Reported
        Logical Sector Size (B): 528
        Physical Sector Size (B): 4224
        Sector Alignment: 0
        Rotation Rate (RPM): 7200
        Form Factor: 3.5"
        Last DST information:
                DST has never been run
        Long Drive Self Test Time:  1 day 9 minutes
        Interface speed:
                Port 0
                        Max Speed (GB/s): 12.0
                        Negotiated Speed (Gb/s): 12.0
                Port 1
                        Max Speed (GB/s): 12.0
                        Negotiated Speed (Gb/s): Not Reported
        Annualized Workload Rate (TB/yr): Not Reported
        Total Bytes Read (B): Not Reported
        Total Bytes Written (B): Not Reported
        Encryption Support: Not Supported
        Cache Size (MiB): Not Reported
        Read Look-Ahead: Enabled
        Write Cache: Enabled
        SMART Status: Good
        ATA Security Information: Not Supported
        Firmware Download Support: Full, Segmented, Deferred
        Number of Logical Units: 1
        Specifications Supported:
                SPC-4
        Features Supported:
                Protection Type 1
                Protection Type 2
                Persistent Reservations
                Application Client Logging
                Self Test
                Automatic Write Reassignment [Enabled]
                Automatic Read Reassignment [Enabled]
                EPC [Enabled]
                Informational Exceptions [Mode 0]
                Translate Address
                Format Unit
                Sanitize
        Adapter Information:
                Adapter Type: PCI
                Vendor ID: 1000h
                Product ID: 00ACh
                Revision: 0001h

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions