Is it possible to change the logical or physical block size on disks?

Solution Verified - Updated -

Issue

  • What is recommended sector size for a disk?
  • How can we change sector size of a disk from 512 Bytes to 4096 Bytes?
  • Is it possible to change the block size on SCSI disk devices? The blockdev command in RHEL provides information about currently used block size for SCSI disk, is there any utility/command to change block size?

    $ blockdev --getbsz /dev/sdab
    4096
    $ blockdev --getbsz /dev/sdac
    4096
    $ blockdev --getbsz /dev/sdag
    4096
    $ blockdev --getbsz /dev/sdar
    4096
    $ blockdev --getbsz /dev/sdak
    4096
    
  • How do I modify the block size of a disk device?

  • How can I change the block size to 4Kb for a disk device? The device currently shows 512 bytes.
  • How can I change the block size to 8Kb for a disk device?
  • How can I change the block size to 16Kb for a disk device?
  • How can I change the block size to 128Kb for a disk device?

Environment

  • Red Hat Enterprise Linux (RHEL) 5, 6, 7, 8, 9
  • SCSI disk(s)
  • ATA disk(s)

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content