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
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 t...
/Rubeck
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
If you remove the VMFS overwrite flag does the same thing happen?
esxcfg-advcfg -s 0 /Disk/PreventVMFSOverwrite
/Rubeck
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
The disk in question has a vmkDiagnostic partition.
AFAIK you have to delete that partition first
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
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
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
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
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
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.
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.
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.
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?