ASM Disk Migration Error: Sector Size Mismatch Between RHEL 7 and RHEL 8 ([512] vs [4096])

Environment Details:

  • Source OS: RHEL 7
  • Target OS: RHEL 8 (also applies to RHEL 9 scenario below)
  • Grid Infrastructure Version: 19.26 (Oracle Restart)
  • ASMLib Version on RHEL 7: 2.x
  • ASMLib Version on RHEL 8: 3.1
  • Storage Type: NetApp LUNs
  • Disk Sector Size (RHEL 7): 512 bytes
  • Disk Sector Size (RHEL 8/9): 4096 bytes (default)

We are migrating a standalone Oracle Restart-based database server from RHEL 7 to RHEL 8. The existing ASM disks were created using ASMLib 2 on RHEL 7. Post-migration steps included:

Mounting the NetApp LUNs (created in RHEL 7) onto the new RHEL 8 (or RHEL 9) server.

Running the following commands:

    oracleasm scandisks
    oracleasm listdisks
    oracleasm querydisk -d <disk_name>
    oracleasm discover

    All above commands executed successfully. Disks were recognized without error.

    However, on attempting to mount the disk group via asmcmd, the operation fails with errors related to sector size mismatch.

    Observed Error:

    asmcmd mount DATA
    ORA-15032: not all alterations performed
    ORA-15038: disk 'ORCL:DATA_08' mismatch on 'Physical Sector Size' with target disk group [512] [4096]
    ORA-15038: disk 'ORCL:DATA_07' mismatch on 'Physical Sector Size' with target disk group [512] [4096]
    ORA-15038: disk 'ORCL:DATA_06' mismatch on 'Physical Sector Size' with target disk group [512] [4096]
    ORA-15038: disk 'ORCL:DATA_05' mismatch on 'Physical Sector Size' with target disk group [512] [4096]
    ORA-15038: disk 'ORCL:DATA_04' mismatch on 'Physical Sector Size' with target disk group [512] [4096]
    ORA-15038: disk 'ORCL:DATA_03' mismatch on 'Physical Sector Size' with target disk group [512] [4096]
    ORA-15038: disk 'ORCL:DATA_02' mismatch on 'Physical Sector Size' with target disk group [512] [4096]
    ORA-15038: disk 'ORCL:DATA_01' mismatch on 'Physical Sector Size' with target disk group [512] [4096]

    The issue arises due to a mismatch in physical sector sizes between the source and target systems:

    Disks created under ASMLib 2 on RHEL 7 were configured with 512-byte sectors.

    RHEL 8/RHEL 9 with ASMLib 3.1 defaults to recognizing 4096-byte sectors for new devices.

    ASM expects consistent sector sizes across disks in a disk group. If there’s a mismatch (e.g., [512] vs [4096]), mounting fails.

    Resolution / Recommendations:

    • Verify physical and logical sector sizes on the target system using:
    cat /sys/block/<device>/queue/physical_block_size
    cat /sys/block/<device>/queue/logical_block_size
    • If possible, align the target LUN sector size with the source (512 bytes).
    • If re-creating LUNs or disk groups is an option, consider standardizing sector sizes across all nodes and environments.
    • Alternatively, migrate data to a new disk group created natively on the RHEL 8/9 system with consistent sector size support.

    Leave a comment

    About Me

    I’m Dhiraj Kumar, an Oracle RAC Database With over 15 years of experience, I’m passionate about building high-performance, scalable database solutions that support critical business operations.

    📘 Check out my latest articles and insights on Medium (@dhirajengr) .