How to convert Toshiba MG10ACA20TA 512e to 4kn format
Important note: changing your disk as described below, can result in a bricked disk or data loss.
The Toshiba MG10ACA20TA ships with 512e format by default. This format emulates a logical sector size of 512 bytes (512e) whereas the physical sector size actually is 4096 bytes. Most modern operating systems to support sector sizes of 4096 (4kn) nowadays. The 512e emulation involves a read-modify-write process in the device firmware for every write operation that is not 4KB aligned. A workload that is not 4KB aligned and/or not a multiple of 4KB will result in an alignment penalty caused by the read-modify-write opertion. Therefore, it's best to use logical sector sizes that match the physical sector sizes.

With the help of OpenSeaChest and an Ubuntu live USB stick you can convert your disk from 512e into 4kn format. How to get started with Ubuntu live cd or usb stick is outside the scope of this blog. But, if you need more information about this, you can find information here.

Ok, so I assume that by now, you have booted from a linux live cd/dvd stick. The first step you have to perform is to download a portable version of OpenSeaChest. In my case, as I have an Intel x64 system, I chose the x8-64 portable version
Open Sea Chest downloads
Open Sea Chest downloads


  • Open a terminal window. Go to your downloads, extract the image (tar xvf "[IMAGE_NAME].xz").
  • go inside the newly created folder (cd "[IMAGE_NAME])
  • first you need to find out which drive is the drive you want to change. Use the command below to get a detailed list of all drives. This will scan the system and list all storage devices with logical /dev/sg? assignments. The output shows model, serial and firmware numbers. Write down which sg# is your drive. (Mine was '/dev/sg1')

    ./openSeaChest_Info --scan
    Open Sea Chest scan
    Open Sea Chest scan
    Output of open sea cheast scan.
    Output of open sea cheast scan.

    Now that you have identified your drive, you can check which sector sizes your drive support by using the following command: ./openSeaChest_Format -d [DRIVE] --showSupportedFormats

    ./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 N N/A N/A
    4096 Y N N N N/A N/A
    --------------------------------------------------------------------------------

    As you can see, my drive supports both 512 and 4096 byte sector sizes and the current logical sector size is 512 bytes.
    You can change the sector size Note: you can brick your drive, you will loose all data on the disk. So try at your own risk!

    ./openSeaChest_Format -d /dev/sg1 --setSectorSize 4096 --confirm this-will-erase-data-and-may-render-the-drive-inoperable

    The output:

    /dev/sg1 - TOSHIBA MG10ACA20TE - 44F0A0CZF4MJ - 0104 - ATA
    
    Set Sector Size to 4096
    Setting the drive sector size quickly.
    This command may appear to hang the utiliy. Do NOT interrupt this
    command for at least 1 hour if it appears hung. The drive is busy
    performing the sector size change and is not able to indicate its
    progress during this time.
    This often only takes a few minutes to complete and return completion
    of this command to the utility but in some cases it may take this full
    hour before the drive is ready to use.
    After this command has completed successfully the drive is ready to
    read and write data.
    Be aware that the drive may begin performing vendor unique background
    activity which may prevent idle and standby timers from taking affect
    until the background activity has completed.
    If this command takes an hour or the command reports a failure due to
    interruption by the system with a reset, recovery will be attempted
    automatically. You may attempt to run this command again if recovery
    does not appear successfull.
    Successfully set sector size to 4096
    NOTE: After changing the sector size the drive may need to perform additional
    background operations in order to ensure full functionality and reliability.
    This background activity may take a long time and will prevent the drive from
    entering power saving modes like idle or standby until these operations have
    completed. These operations may take a very long time to complete.
    While EPC timers are suspended during this background operation, manual
    transitions to lower power states is supported. Manually moving to a lower power
    state will pause all background activity until the drive has become activate again
    from a command such as a read or write. If forcing a transition
    to idle_a, be aware that this power condition keeps the heads above the medium
    and is considered a special case that the drive firmware will allow it to continue
    these background operations. All EPC timers will be honored once the
    background activity is completed.

    Now we can re-run the showSupportedFormats command:

    ./openSeaChest_Format -d /dev/sg1 --showSupportedFormats

    As you can see, the logical sector size has changed to 4096 bytes!
    --------------------------------------------------------------------------------
    
    Logical Block Size PI-0 PI-1 PI-2 PI-3 Relative Performance Metadata Size
    --------------------------------------------------------------------------------
    512 Y N N N N/A N/A
    * 4096 Y N N N N/A N/A
    --------------------------------------------------------------------------------

    I tried to use the openSeaChest_Format command but that failed on my drive with an in invalid option combination for the format unit.

    ./openSeaChest_Format -d /dev/sg0 --formatUnit 4096 --fastFormat 1 --confirm this-will-erase-data

    /dev/sg0 - TOSHIBA MG10ACA20TA - 44F0A0CGF4MJ - 0104 - ATA
    
    Format Unit
    Format Unit Not Supported or invalid option combination provided!

    But fdisk is able to do the format. Note: for fdisk you can't use the /dev/sg# but you have to use /dev/sd# In my case: /dev/sdb

    fdisk /dev/sdb

    Welcome to fdisk (util-linux 2.39.3).
    
    Changes will remain in memory only, until you decide to write them.
    Be careful before using the write command.

    Device does not contain a recognized partition table.
    The size of this disk is 18.2 TiB (20000588955648 bytes). DOS partition table format
    cannot be used on drives for volumes larger than 17592186040320 bytes for 4096-byte sectors.
    Use GUID partition table format (GPT).
    Created a new DOS (MBR) disklabel with disk identifier 0xa445d8cb.
    Command (m for help):


    A warning indicates that the disk does not have a recognized partiation table. By pressing 'g' we generate a new GPT partition table.
    Created a new GPT disklabel (GUID: 2238F86A-75BC-422C-ADB8-B35947AD0243).

    N.B.: you must be sure you have selected the right drive, otherwise you may brick your disk, loose data.
    Write the changes back to disk: press 'w'
    The partition table has been altered.
    
    Calling ioctl() to re-read partition table.
    Syncing disks.


    fdisk exists, we need to start it again:
    fdisk /dev/sdb
    

    Welcome to fdisk (util-linux 2.39.3).
    Changes will remain in memory only, until you decide to write them.
    Be careful before using the write command.


    As you can see the initial warning is gone. You can now add partitions to the disk either via
    • fdisk
    • reboot to your operating system you have installed and continue from there.

    Back to List

    All form fields are required.
    A confirmation mail for the comments will be send to you.