Wow - compiling a dd-replacement to run one command ?
Respect - you must be even crazier than me
I see this message quite often after recovery-tasks.
My theory is that this message in most cases means that there is still a configuration entry active that prevents a clean unmount.
The partition that is used by that stale entry may no longer even exist - but the write protection that is required by that parameter is still active.
scratch-config, heartbeat-config and a few more details may have similar results.
In cases where I dont want to search and are in a hurry I simply use dd from a Linux LiveCD - either via sshfs - then I mount ESXi filesystem to /esxi and then talk to the device as /esxi/dev/disks/<device> or directly by booting the ESXi into Linux.
________________________________________________
Do you need support with a VMFS recovery problem ? - send a message via skype "sanbarrow"
I do not support Workstation 16 at this time ...