ESXi

Expand all | Collapse all

Is VMware really unable to format my disks ? Do I really need to download a thirdparty for that ?

  • 1.  Is VMware really unable to format my disks ? Do I really need to download a thirdparty for that ?

    Posted Feb 02, 2015 11:12 AM

    Dear all,

    I'm publishing a new thread, because I think the first one was a very precise technical question, but this title is more in adequation with my real question.

    The previous, more technical post is under : Error: Read-only file system during write on /dev/disks/naa.* : tried all forums with no solution !

    My problem is very simple, I just want to format the disks on my server!

    But it looks like VMware doesn't want or is unable to do such a simple task!

    Do I need to burn a CD from a thirdparty and physically go to the datacenter to boot on a CD-ROM, only to format the disks?

    Any help would be appreciated, because of course I could to all that, but I cannot believe VMware is so badly conceived!

    Denis

    P. S. Details about what I tried:

    # partedUtil mklabel /dev/disks/naa.600605b009a647b01c5ed73926b7ede1 msdos

    Error: Read-only file system during write on /dev/disks/naa.600605b009a647b01c5ed73926b7ede1

    WriteNewPtable: Unable to commit to device /dev/disks/naa.600605b009a647b01c5ed73926b7ede1

    "partedUtil delete partition" gives the same message.

    "partedUtil setptbl" gives the same message.

    "fdisk" (delete, new partitions, write) is of no use. (When I write there is no error but nothing has been written)

    I tried to reboot, no change.

    There are no Virtual machines at all on that server.

    # partedUtil  getptbl /dev/disks/naa.600605b009a647b01c5ed73926b7ede1

    gpt

    1215155 255 63 19521474560

    1 63 8386622 EBD0A0A2B9E5443387C068B6B72699C7 linuxNative 0

    2 8386623 13629502 9D27538040AD11DBBF97000C2911D1B8 vmkDiagnostic 0



  • 2.  RE: Is VMware really unable to format my disks ? Do I really need to download a thirdparty for that ?

    Posted Feb 02, 2015 11:46 AM

    Have you tried using dd to clear out the existing partitioning information?

    There's a guide on how to do this here VMware KB: Troubleshooting the Add Storage Wizard error: Unable to read partition information from this disk

    /Rubeck



  • 3.  RE: Is VMware really unable to format my disks ? Do I really need to download a thirdparty for that ?

    Posted Feb 02, 2015 11:59 AM

    Dear Rubeck,

    Yes, thank you for the suggestion, but it doesn't work either :

    # dd if=/dev/zero of="/dev/disks/naa.600605b009a647b01c5ed73926b7ede1" bs=512

    count=34 conv=notrunc

    dd: /dev/disks/naa.600605b009a647b01c5ed73926b7ede1: Read-only file system

    Denis



  • 4.  RE: Is VMware really unable to format my disks ? Do I really need to download a thirdparty for that ?

    Posted Feb 02, 2015 12:13 PM

    If you remove the VMFS overwrite flag does the same thing happen?

    esxcfg-advcfg -s 0 /Disk/PreventVMFSOverwrite

    /Rubeck



  • 5.  RE: Is VMware really unable to format my disks ? Do I really need to download a thirdparty for that ?

    Posted Feb 02, 2015 12:55 PM

    Yes, good question, I previously tried that, but it was unsuccessful...

    # esxcfg-advcfg --get  /Disk/PreventVMFSOverwrite

    Value of PreventVMFSOverwrite is 1

    # esxcfg-advcfg --set 0  /Disk/PreventVMFSOverwrite

    Value of PreventVMFSOverwrite is 0

    # dd if=/dev/zero of="/dev/disks/naa.600605b009a647b01c5ed73926b7ede1" bs=512

    count=34 conv=notrunc

    dd: /dev/disks/naa.600605b009a647b01c5ed73926b7ede1: Read-only file system

    Denis



  • 6.  RE: Is VMware really unable to format my disks ? Do I really need to download a thirdparty for that ?

    Posted Feb 02, 2015 03:08 PM

    The disk in question has a vmkDiagnostic partition.
    AFAIK you have to delete that partition first



  • 7.  RE: Is VMware really unable to format my disks ? Do I really need to download a thirdparty for that ?

    Posted Feb 02, 2015 04:13 PM

    Is there a way to delete that partition ?


    Because :

    # partedUtil delete /dev/disks/naa.600605b009a647b01c5ed73926b7ede1 2

    Error: Read-only file system during write on /dev/disks/naa.600605b009a647b01c5ed73926b7ede1

    Unable to delete partition 2 from device /dev/disks/naa.600605b009a647b01c5ed73926b7ede1

    # partedUtil delete /dev/disks/naa.600605b009a647b01c5ed73926b7ede1 1

    Error: Read-only file system during write on /dev/disks/naa.600605b009a647b01c5ed73926b7ede1

    Unable to delete partition 1 from device /dev/disks/naa.600605b009a647b01c5ed73926b7ede1



  • 8.  RE: Is VMware really unable to format my disks ? Do I really need to download a thirdparty for that ?

    Posted Feb 02, 2015 05:58 PM

    Have a look here:
    VMware KB: Configuring a diagnostic coredump partition on an ESXi 5.x host

    if that partition is undeleteable it is in use and you may have to provide a diagnostic partition elsewhere



  • 9.  RE: Is VMware really unable to format my disks ? Do I really need to download a thirdparty for that ?

    Posted Feb 02, 2015 06:09 PM

    Congratulations ! You found 50% of the cause of the problem :

    # esxcli system coredump partition get

    Active: naa.600605b009a647b01c5ed73926b7ede1:2

    Configured: naa.600605b009a647b01c5ed73926b7ede1:2

    This is what I did :

    # esxcli system coredump partition set --enable false

    # partedUtil delete /dev/disks/naa.600605b009a647b01c5ed73926b7ede1 2

    It's now a lot better :

    # partedUtil getptbl /dev/disks/naa.600605b009a647b01c5ed73926b7ede1

    gpt

    1215155 255 63 19521474560

    1 63 8386622 EBD0A0A2B9E5443387C068B6B72699C7 linuxNative 0

    But it's not 100% solved :

    # partedUtil delete /dev/disks/naa.600605b009a647b01c5ed73926b7ede1 1

    Error: Read-only file system during write on /dev/disks/naa.600605b009a647b01c5ed73926b7ede1

    Unable to delete partition 1 from device /dev/disks/naa.600605b009a647b01c5ed73926b7ede1

    But we are almost there, I think?

    Thank you very much :-))

    Denis



  • 10.  RE: Is VMware really unable to format my disks ? Do I really need to download a thirdparty for that ?

    Posted Feb 02, 2015 06:15 PM

    Did you also create a new coredump partition ?
    I think you need to specify a new one when you want to do this without reboot



  • 11.  RE: Is VMware really unable to format my disks ? Do I really need to download a thirdparty for that ?

    Posted Feb 02, 2015 10:20 PM

    VMware created/used a coredump partition by itself, on the USB boot disk.

    But then, by unactivating that partition, I was able to recreate a coredump partition on the disk from the GUI and then recreate a storage.

    Now, this is not clean as initially (some small holes and strangely coredump at the end) but I would say the problem is solved:

    #  partedUtil  getptbl /dev/disks/naa.600605b009a647b01c5ed73926b7ede1

    gpt

    1215155 255 63 19521474560

    1 63 8386622 EBD0A0A2B9E5443387C068B6B72699C7 linuxNative 0

    3 8388608 19521267711 AA31E02A400F11DB9590000C2911D1B8 vmfs 0

    2 19521267712 19521472511 9D27538040AD11DBBF97000C2911D1B8 vmkDiagnostic 0

    Denis



  • 12.  RE: Is VMware really unable to format my disks ? Do I really need to download a thirdparty for that ?

    Posted Aug 10, 2016 02:23 PM

    I ended up booting ubuntu server in rescue mode and using “dd if=/dev/zero of=/dev/foo bs=65536 count=65536” to zero out the disks, I couldn’t persuade vsphere/vcenter to understand that I wanted to reuse the disks for something else.



  • 13.  RE: Is VMware really unable to format my disks ? Do I really need to download a thirdparty for that ?

    Posted Aug 11, 2016 03:37 PM

    When you have to use Linux anyway wipe the complete disk - not just the first few GBs.
    VMFS-format does a lousy job when cleaning up previous filesystems - I highly recommend to wipe the full volume with zeroes manually.



  • 14.  RE: Is VMware really unable to format my disks ? Do I really need to download a thirdparty for that ?

    Posted Sep 22, 2022 08:11 AM

    I know this is very old, but I ran into the same issue with two identical sized M.2 SSD drives, one was usable, the other wasn't due to the mentioned reasons above. No matter what, I couldn't figure out a way to have the ESXi server claim the whole drive, it just wasn't doable.

    What I ended up with was to run GParted live and deleting all drive contents, leaving the drive deleted/unformatted.

    Booting up ESXi then I was able to claim the full disk as intended.



  • 15.  RE: Is VMware really unable to format my disks ? Do I really need to download a thirdparty for that ?

    Posted Apr 05, 2023 06:59 PM

    Same problem here attempting to configure VSAN in my lab. Running ESXi 8 on three nodes, each has the same problem on their identical M.2 cards. I previously attempted to create a VSAN and wanted to start over and wow did I get my knuckles rapped for it. Surely there is a better solution than using a 3rd party tool to delete all these partitions and unmount the disks?



  • 16.  RE: Is VMware really unable to format my disks ? Do I really need to download a thirdparty for that ?

    Posted Nov 13, 2023 08:09 PM

    In the end I created a Windows 11 bootable USB stick, booted each esxi host with it and used the Windows installer to completely blank out the disks, problem solved. It's absolutely rediculous that I had to do this, but I got sick of messing around.



  • 17.  RE: Is VMware really unable to format my disks ? Do I really need to download a thirdparty for that ?

    Posted Oct 19, 2023 11:04 PM

    I had the same issue as i went along and tried to figure out a way to claim disks for vsan 8... 

    I ended up with a simple solution after hours of research....

    first: Determine the disk you want to format.
    ls -lah /vmfs/devices/disks/

    Find the naa.* disk, verify that the disk has multiple partitions. 

    Remove partitions with mklabel (identify the )

    "partedUtil mklabel /vmfs/devies/disks/naa.YOUR-DISK gpt"

    This simple oneliner removed the bogus partitions, and i went straight into vcenter, and was able to claim the disks.



  • 18.  RE: Is VMware really unable to format my disks ? Do I really need to download a thirdparty for that ?

    Broadcom Employee
    Posted Nov 07, 2023 03:08 PM

    mklabel doesn't help either:

     

    [root@localhost:~] partedUtil mklabel /vmfs/devices/disks/naa.5002538c4089c28b gpt
    Error: Read-only file system during write on /dev/disks/naa.5002538c4089c28b
    WriteNewPtable: Unable to commit to device /vmfs/devices/disks/naa.5002538c4089c28b

     

    is there a way to erase the partition?



  • 19.  RE: Is VMware really unable to format my disks ? Do I really need to download a thirdparty for that ?

    Posted Nov 10, 2023 04:22 PM

    I had this problem as well trying to delete an old VMFSL partition on a 2nd disk.  mklabel didn't work for me either.

    Every time I tried using the partedUtil to remove the partition, i would get an error pointing to it being ReadOnly.  This VMFSL partition was on a 2nd drive in my system and had once had ESXi installed there.  I was able to remove all of the other partitions from that drive with partedUtil, just not this one.

    I found that the process in this article worked for me.  https://serverfault.com/questions/1064921/unable-to-delete-partition-2-from-device-dev-disks-naa-50000398b8497b91

    Just booted the system to an older ESXi 6.7 install and jumped out from there to run partedUtil.

    I had tried with a newer ESXi 8.02, but that still held on to the partition.  The key was using an install ISO prior to 7.x.