How to change hard disk sector sizeCan't remove GPT table from hard driveBoot linux on external hard disk - Send Grub RescueIntel RAID5 array Shows < 50% spaceUbuntu 16.04 LTS unrecognized hard drive — not enough disk space to installExternal Hard Disk not recognised on USB 3 port

Is CC'ing the manager in first e-mail regarding urgent matter considered escalation?

Is Earth's Surface "In orbit"?

What was the sound coming from below the feet of the Death Eaters at Malfoy Manor?

What was the first version of macOS to ship with the Vim text editor?

Hearts and Spades in a Row

YALMIP-like modeling environment in Python

Strange labels on our servers

What else would an hot red wire be for in a split-tab outlet?

What does play with feeling mean?

C - wrapping globals in a struct?

Who are the strongest non-professional GMs?

Mistakenly agreed with a scammer’s term of use

Seen from Europe, why is there a hard separation between Republicans and Democrats in the US?

Using a sealant to stop a toilet tank leak

Vertex Size for more than one vertex

How can I reflect a StreamPlot object?

Starting a sentence instantly with a noun

How do the different seasons work for Eladrin?

How to end sending data over I2C by Slave or Master?

Would a warhorse allow its rider to approach a Dragon at all?

Why does this process map every fraction to the golden ratio?

Did any 360-compatible machine implement registers in core?

Why can Mathematica not use the compiled code?

Should I present forged documents in a Penetration Test/Red team engagement?



How to change hard disk sector size


Can't remove GPT table from hard driveBoot linux on external hard disk - Send Grub RescueIntel RAID5 array Shows < 50% spaceUbuntu 16.04 LTS unrecognized hard drive — not enough disk space to installExternal Hard Disk not recognised on USB 3 port






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty
margin-bottom:0;









1


















I use UbuntuStudio 18.04.1 LTS into an HP 250 G5 laptop computer.



It has an internal SATA 1 TB hard disk, partitioned with the EFI, ROOT, and HOME partitions. EFI partition is formatted as FAT. ROOT and HOME partition are formatted as ext4. Of course, there is a SWAP partition too.



The issue is that the command: stat .bash_logout, tells me that the hard disk sector size is 4096. But, Gparted tells me that the hard disk sector size is only 512!



Why the difference?



If the real sector size is 512... Can I change it to 4096, without to lose data? How?










share|improve this question































    1


















    I use UbuntuStudio 18.04.1 LTS into an HP 250 G5 laptop computer.



    It has an internal SATA 1 TB hard disk, partitioned with the EFI, ROOT, and HOME partitions. EFI partition is formatted as FAT. ROOT and HOME partition are formatted as ext4. Of course, there is a SWAP partition too.



    The issue is that the command: stat .bash_logout, tells me that the hard disk sector size is 4096. But, Gparted tells me that the hard disk sector size is only 512!



    Why the difference?



    If the real sector size is 512... Can I change it to 4096, without to lose data? How?










    share|improve this question



























      1













      1









      1








      I use UbuntuStudio 18.04.1 LTS into an HP 250 G5 laptop computer.



      It has an internal SATA 1 TB hard disk, partitioned with the EFI, ROOT, and HOME partitions. EFI partition is formatted as FAT. ROOT and HOME partition are formatted as ext4. Of course, there is a SWAP partition too.



      The issue is that the command: stat .bash_logout, tells me that the hard disk sector size is 4096. But, Gparted tells me that the hard disk sector size is only 512!



      Why the difference?



      If the real sector size is 512... Can I change it to 4096, without to lose data? How?










      share|improve this question














      I use UbuntuStudio 18.04.1 LTS into an HP 250 G5 laptop computer.



      It has an internal SATA 1 TB hard disk, partitioned with the EFI, ROOT, and HOME partitions. EFI partition is formatted as FAT. ROOT and HOME partition are formatted as ext4. Of course, there is a SWAP partition too.



      The issue is that the command: stat .bash_logout, tells me that the hard disk sector size is 4096. But, Gparted tells me that the hard disk sector size is only 512!



      Why the difference?



      If the real sector size is 512... Can I change it to 4096, without to lose data? How?







      partitioning hard-drive






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Sep 6 '18 at 5:35









      JuanJuan

      1,1194 gold badges14 silver badges30 bronze badges




      1,1194 gold badges14 silver badges30 bronze badges























          1 Answer
          1






          active

          oldest

          votes


















          2



















          It is impossible to change the hard disk's sector size. It is a characteristic of the hard disk itself.



          What you are probably witnessing is a hard disk whose sector size is 4096 internally, but which presents itself to your computer as having a sector size of 512, for compatibility with legacy mainboards and operating systems who may not yet support 4096 byte sector sizes natively. The disk translates the requests for the logical 512 byte sectors into requests for the actual 4096 byte sectors internally, and the computer does not have to know this is happening. Appropriate buffering ensures there are no slow-downs.



          This does not represent a problem and shouldn't cause any performance issue assuming that your filesystem's cluster size is still 4096, or a multiple thereof, and your partitions start on a sector boundary, which they will if they use the modern convention of starting on a multiple of 1MiB.



          To check filesystem cluster size you can use stat -f . (include the dot). This should list the block size of your current filesystem which will most likely be 4096. Note that if you have multiple partitions this can differ between them.



          To check the partition boundaries, use sudo fdisk -l. At the top it'll list the logical sector size which in your case is likely 512 bytes. Make sure all the partitions start on a multiple of 8 such sectors (they will most likely be a multiple of 2048, which is itself a multiple of 8).



          Note that all modern versions of Ubuntu will enforce the above for all new installations.



          On some drives there is a procedure, using manufacturer-supplied software tools, for upgrading the drive itself from 512 byte logical sectors (512e mode) to 4096 byte logical sectors (4k native mode). What this will do is remove the translation layer in the drive which translates between emulated 512 byte sectors on the host side and the actual 4096 byte sectors on the drive. The physical sector size will stay at 4096 bytes. This procedure is usually accompanied by a low level fast format of the drive. The performance benefit is likely to be negligible assuming you were using a 4096 byte (or multiple) cluster size and partition alignment anyway as discussed.






          share|improve this answer




























          • I think I understand your explanation. Using the smartctl command, I can see that the physical sector size is 4096, but the logycal sector size used is 512. But, I'm not sure about the last paragraph (cluster size and sector boundary). How could I know and test it?

            – Juan
            Sep 6 '18 at 8:33











          • I've added info about this :)

            – thomasrutter
            Sep 6 '18 at 23:57











          • Thank you so much! The sudo fdisk -l tells me that all my partitions start on a multiple of 8 sector and all the sector sizes are 512.

            – Juan
            Sep 13 '18 at 2:55











          • Check github.com/Seagate/ToolBin/issues/5 , changing (reported) sector size is a thing these days.

            – Milind R
            Sep 4 at 2:20






          • 1





            @MilindR thanks for pointing out this possibility; I've added some info to my answer.

            – thomasrutter
            Sep 12 at 6:19












          Your Answer








          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "89"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader:
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/4.0/"u003ecc by-sa 4.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          ,
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );














          draft saved

          draft discarded
















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1072621%2fhow-to-change-hard-disk-sector-size%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown


























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          2



















          It is impossible to change the hard disk's sector size. It is a characteristic of the hard disk itself.



          What you are probably witnessing is a hard disk whose sector size is 4096 internally, but which presents itself to your computer as having a sector size of 512, for compatibility with legacy mainboards and operating systems who may not yet support 4096 byte sector sizes natively. The disk translates the requests for the logical 512 byte sectors into requests for the actual 4096 byte sectors internally, and the computer does not have to know this is happening. Appropriate buffering ensures there are no slow-downs.



          This does not represent a problem and shouldn't cause any performance issue assuming that your filesystem's cluster size is still 4096, or a multiple thereof, and your partitions start on a sector boundary, which they will if they use the modern convention of starting on a multiple of 1MiB.



          To check filesystem cluster size you can use stat -f . (include the dot). This should list the block size of your current filesystem which will most likely be 4096. Note that if you have multiple partitions this can differ between them.



          To check the partition boundaries, use sudo fdisk -l. At the top it'll list the logical sector size which in your case is likely 512 bytes. Make sure all the partitions start on a multiple of 8 such sectors (they will most likely be a multiple of 2048, which is itself a multiple of 8).



          Note that all modern versions of Ubuntu will enforce the above for all new installations.



          On some drives there is a procedure, using manufacturer-supplied software tools, for upgrading the drive itself from 512 byte logical sectors (512e mode) to 4096 byte logical sectors (4k native mode). What this will do is remove the translation layer in the drive which translates between emulated 512 byte sectors on the host side and the actual 4096 byte sectors on the drive. The physical sector size will stay at 4096 bytes. This procedure is usually accompanied by a low level fast format of the drive. The performance benefit is likely to be negligible assuming you were using a 4096 byte (or multiple) cluster size and partition alignment anyway as discussed.






          share|improve this answer




























          • I think I understand your explanation. Using the smartctl command, I can see that the physical sector size is 4096, but the logycal sector size used is 512. But, I'm not sure about the last paragraph (cluster size and sector boundary). How could I know and test it?

            – Juan
            Sep 6 '18 at 8:33











          • I've added info about this :)

            – thomasrutter
            Sep 6 '18 at 23:57











          • Thank you so much! The sudo fdisk -l tells me that all my partitions start on a multiple of 8 sector and all the sector sizes are 512.

            – Juan
            Sep 13 '18 at 2:55











          • Check github.com/Seagate/ToolBin/issues/5 , changing (reported) sector size is a thing these days.

            – Milind R
            Sep 4 at 2:20






          • 1





            @MilindR thanks for pointing out this possibility; I've added some info to my answer.

            – thomasrutter
            Sep 12 at 6:19















          2



















          It is impossible to change the hard disk's sector size. It is a characteristic of the hard disk itself.



          What you are probably witnessing is a hard disk whose sector size is 4096 internally, but which presents itself to your computer as having a sector size of 512, for compatibility with legacy mainboards and operating systems who may not yet support 4096 byte sector sizes natively. The disk translates the requests for the logical 512 byte sectors into requests for the actual 4096 byte sectors internally, and the computer does not have to know this is happening. Appropriate buffering ensures there are no slow-downs.



          This does not represent a problem and shouldn't cause any performance issue assuming that your filesystem's cluster size is still 4096, or a multiple thereof, and your partitions start on a sector boundary, which they will if they use the modern convention of starting on a multiple of 1MiB.



          To check filesystem cluster size you can use stat -f . (include the dot). This should list the block size of your current filesystem which will most likely be 4096. Note that if you have multiple partitions this can differ between them.



          To check the partition boundaries, use sudo fdisk -l. At the top it'll list the logical sector size which in your case is likely 512 bytes. Make sure all the partitions start on a multiple of 8 such sectors (they will most likely be a multiple of 2048, which is itself a multiple of 8).



          Note that all modern versions of Ubuntu will enforce the above for all new installations.



          On some drives there is a procedure, using manufacturer-supplied software tools, for upgrading the drive itself from 512 byte logical sectors (512e mode) to 4096 byte logical sectors (4k native mode). What this will do is remove the translation layer in the drive which translates between emulated 512 byte sectors on the host side and the actual 4096 byte sectors on the drive. The physical sector size will stay at 4096 bytes. This procedure is usually accompanied by a low level fast format of the drive. The performance benefit is likely to be negligible assuming you were using a 4096 byte (or multiple) cluster size and partition alignment anyway as discussed.






          share|improve this answer




























          • I think I understand your explanation. Using the smartctl command, I can see that the physical sector size is 4096, but the logycal sector size used is 512. But, I'm not sure about the last paragraph (cluster size and sector boundary). How could I know and test it?

            – Juan
            Sep 6 '18 at 8:33











          • I've added info about this :)

            – thomasrutter
            Sep 6 '18 at 23:57











          • Thank you so much! The sudo fdisk -l tells me that all my partitions start on a multiple of 8 sector and all the sector sizes are 512.

            – Juan
            Sep 13 '18 at 2:55











          • Check github.com/Seagate/ToolBin/issues/5 , changing (reported) sector size is a thing these days.

            – Milind R
            Sep 4 at 2:20






          • 1





            @MilindR thanks for pointing out this possibility; I've added some info to my answer.

            – thomasrutter
            Sep 12 at 6:19













          2















          2











          2









          It is impossible to change the hard disk's sector size. It is a characteristic of the hard disk itself.



          What you are probably witnessing is a hard disk whose sector size is 4096 internally, but which presents itself to your computer as having a sector size of 512, for compatibility with legacy mainboards and operating systems who may not yet support 4096 byte sector sizes natively. The disk translates the requests for the logical 512 byte sectors into requests for the actual 4096 byte sectors internally, and the computer does not have to know this is happening. Appropriate buffering ensures there are no slow-downs.



          This does not represent a problem and shouldn't cause any performance issue assuming that your filesystem's cluster size is still 4096, or a multiple thereof, and your partitions start on a sector boundary, which they will if they use the modern convention of starting on a multiple of 1MiB.



          To check filesystem cluster size you can use stat -f . (include the dot). This should list the block size of your current filesystem which will most likely be 4096. Note that if you have multiple partitions this can differ between them.



          To check the partition boundaries, use sudo fdisk -l. At the top it'll list the logical sector size which in your case is likely 512 bytes. Make sure all the partitions start on a multiple of 8 such sectors (they will most likely be a multiple of 2048, which is itself a multiple of 8).



          Note that all modern versions of Ubuntu will enforce the above for all new installations.



          On some drives there is a procedure, using manufacturer-supplied software tools, for upgrading the drive itself from 512 byte logical sectors (512e mode) to 4096 byte logical sectors (4k native mode). What this will do is remove the translation layer in the drive which translates between emulated 512 byte sectors on the host side and the actual 4096 byte sectors on the drive. The physical sector size will stay at 4096 bytes. This procedure is usually accompanied by a low level fast format of the drive. The performance benefit is likely to be negligible assuming you were using a 4096 byte (or multiple) cluster size and partition alignment anyway as discussed.






          share|improve this answer
















          It is impossible to change the hard disk's sector size. It is a characteristic of the hard disk itself.



          What you are probably witnessing is a hard disk whose sector size is 4096 internally, but which presents itself to your computer as having a sector size of 512, for compatibility with legacy mainboards and operating systems who may not yet support 4096 byte sector sizes natively. The disk translates the requests for the logical 512 byte sectors into requests for the actual 4096 byte sectors internally, and the computer does not have to know this is happening. Appropriate buffering ensures there are no slow-downs.



          This does not represent a problem and shouldn't cause any performance issue assuming that your filesystem's cluster size is still 4096, or a multiple thereof, and your partitions start on a sector boundary, which they will if they use the modern convention of starting on a multiple of 1MiB.



          To check filesystem cluster size you can use stat -f . (include the dot). This should list the block size of your current filesystem which will most likely be 4096. Note that if you have multiple partitions this can differ between them.



          To check the partition boundaries, use sudo fdisk -l. At the top it'll list the logical sector size which in your case is likely 512 bytes. Make sure all the partitions start on a multiple of 8 such sectors (they will most likely be a multiple of 2048, which is itself a multiple of 8).



          Note that all modern versions of Ubuntu will enforce the above for all new installations.



          On some drives there is a procedure, using manufacturer-supplied software tools, for upgrading the drive itself from 512 byte logical sectors (512e mode) to 4096 byte logical sectors (4k native mode). What this will do is remove the translation layer in the drive which translates between emulated 512 byte sectors on the host side and the actual 4096 byte sectors on the drive. The physical sector size will stay at 4096 bytes. This procedure is usually accompanied by a low level fast format of the drive. The performance benefit is likely to be negligible assuming you were using a 4096 byte (or multiple) cluster size and partition alignment anyway as discussed.







          share|improve this answer















          share|improve this answer




          share|improve this answer








          edited Sep 12 at 6:18

























          answered Sep 6 '18 at 5:47









          thomasrutterthomasrutter

          29k4 gold badges72 silver badges92 bronze badges




          29k4 gold badges72 silver badges92 bronze badges















          • I think I understand your explanation. Using the smartctl command, I can see that the physical sector size is 4096, but the logycal sector size used is 512. But, I'm not sure about the last paragraph (cluster size and sector boundary). How could I know and test it?

            – Juan
            Sep 6 '18 at 8:33











          • I've added info about this :)

            – thomasrutter
            Sep 6 '18 at 23:57











          • Thank you so much! The sudo fdisk -l tells me that all my partitions start on a multiple of 8 sector and all the sector sizes are 512.

            – Juan
            Sep 13 '18 at 2:55











          • Check github.com/Seagate/ToolBin/issues/5 , changing (reported) sector size is a thing these days.

            – Milind R
            Sep 4 at 2:20






          • 1





            @MilindR thanks for pointing out this possibility; I've added some info to my answer.

            – thomasrutter
            Sep 12 at 6:19

















          • I think I understand your explanation. Using the smartctl command, I can see that the physical sector size is 4096, but the logycal sector size used is 512. But, I'm not sure about the last paragraph (cluster size and sector boundary). How could I know and test it?

            – Juan
            Sep 6 '18 at 8:33











          • I've added info about this :)

            – thomasrutter
            Sep 6 '18 at 23:57











          • Thank you so much! The sudo fdisk -l tells me that all my partitions start on a multiple of 8 sector and all the sector sizes are 512.

            – Juan
            Sep 13 '18 at 2:55











          • Check github.com/Seagate/ToolBin/issues/5 , changing (reported) sector size is a thing these days.

            – Milind R
            Sep 4 at 2:20






          • 1





            @MilindR thanks for pointing out this possibility; I've added some info to my answer.

            – thomasrutter
            Sep 12 at 6:19
















          I think I understand your explanation. Using the smartctl command, I can see that the physical sector size is 4096, but the logycal sector size used is 512. But, I'm not sure about the last paragraph (cluster size and sector boundary). How could I know and test it?

          – Juan
          Sep 6 '18 at 8:33





          I think I understand your explanation. Using the smartctl command, I can see that the physical sector size is 4096, but the logycal sector size used is 512. But, I'm not sure about the last paragraph (cluster size and sector boundary). How could I know and test it?

          – Juan
          Sep 6 '18 at 8:33













          I've added info about this :)

          – thomasrutter
          Sep 6 '18 at 23:57





          I've added info about this :)

          – thomasrutter
          Sep 6 '18 at 23:57













          Thank you so much! The sudo fdisk -l tells me that all my partitions start on a multiple of 8 sector and all the sector sizes are 512.

          – Juan
          Sep 13 '18 at 2:55





          Thank you so much! The sudo fdisk -l tells me that all my partitions start on a multiple of 8 sector and all the sector sizes are 512.

          – Juan
          Sep 13 '18 at 2:55













          Check github.com/Seagate/ToolBin/issues/5 , changing (reported) sector size is a thing these days.

          – Milind R
          Sep 4 at 2:20





          Check github.com/Seagate/ToolBin/issues/5 , changing (reported) sector size is a thing these days.

          – Milind R
          Sep 4 at 2:20




          1




          1





          @MilindR thanks for pointing out this possibility; I've added some info to my answer.

          – thomasrutter
          Sep 12 at 6:19





          @MilindR thanks for pointing out this possibility; I've added some info to my answer.

          – thomasrutter
          Sep 12 at 6:19


















          draft saved

          draft discarded















































          Thanks for contributing an answer to Ask Ubuntu!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid


          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.

          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1072621%2fhow-to-change-hard-disk-sector-size%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown









          Popular posts from this blog

          Tamil (spriik) Luke uk diar | Nawigatjuun

          Align equal signs while including text over equalitiesAMS align: left aligned text/math plus multicolumn alignmentMultiple alignmentsAligning equations in multiple placesNumbering and aligning an equation with multiple columnsHow to align one equation with another multline equationUsing \ in environments inside the begintabularxNumber equations and preserving alignment of equal signsHow can I align equations to the left and to the right?Double equation alignment problem within align enviromentAligned within align: Why are they right-aligned?

          Training a classifier when some of the features are unknownWhy does Gradient Boosting regression predict negative values when there are no negative y-values in my training set?How to improve an existing (trained) classifier?What is effect when I set up some self defined predisctor variables?Why Matlab neural network classification returns decimal values on prediction dataset?Fitting and transforming text data in training, testing, and validation setsHow to quantify the performance of the classifier (multi-class SVM) using the test data?How do I control for some patients providing multiple samples in my training data?Training and Test setTraining a convolutional neural network for image denoising in MatlabShouldn't an autoencoder with #(neurons in hidden layer) = #(neurons in input layer) be “perfect”?