Disk is not eligiable to use for vSAN due to OSDATA partition on disk
search cancel

Disk is not eligiable to use for vSAN due to OSDATA partition on disk

book

Article ID: 453022

calendar_today

Updated On:

Products

VMware vSAN

Issue/Introduction

  • Unable to claim a disk for vSAN.

  • There is currently an existing VMFS partition on the disk:

    # partedUtil getptbl "/vmfs/devices/disks/naa.####"

gpt
97281 255 63 1562824368
7 16986112 268435455 4EB2EA3978554790A79EFAE495E21F8D vmfsl 0

  • Unable to delete partition:

    # partedUtil delete "/vmfs/devices/disks/naa.#### 7"

    Error: Read-only file system during write on /dev/disks/naa.####
    Unable to delete partition 7 from device /vmfs/devices/disks/naa.####


  • Attempts to wipe this disk dd fail:

    # dd if=/dev/zero of=/vmfs/devices/disks/naa.#### bs=1M count=50 conv=notrunc
    dd: writing '/vmfs/devices/disks/naa.####': Read-only file system

Environment

VMware vSphere ESXi 8.0.x

Cause

  • ESXi was accidentally installed on a disk intended for vSAN.

  • The esxcli storage filesystem list command shows an OSDATA-#### volume mounted on the problematic disk.

  • After reinstalling ESXi elsewhere the OSDATA partition is still being utilized by this disk.

  • In /var/run/log/vmkernel.log, you see: WARNING: Partition: ####: naa.####: in-use partition # modification is not supported.

Resolution

  • Place Host in Maintenance Mode. Ensure no vSAN data is at risk.

  • Deactivate Coredump File:
    List coredump files: esxcli system coredump file list
    Disable coredump: esxcli system coredump file set --enable false
    Remove coredump file: esxcli system coredump file remove --file #### (Replace #### with the file name found in the list).

  • Redirect Scratch Location:
    Change the scratch location to a temporary or different persistent datastore: esxcli system syslog config set --logdir=/tmp/scratch

  • Reboot the Host.

  • Delete Partition: Attempt to wipe the disk again using partedUtil or dd conv=notrunc.

  • If still unable to delete the partition then clear partition via host KVM.