VMware Cloud Community
A_Mikkelsen
Expert
Expert

Remove vSAN files (VMDK's)

I'm trying to delete orphand VMDK's from a vSAN datastore.
but not able to find a solution.

I can find the files, but not delete them
ex
[vsanDatastore] cloudvolumes/apps/obsolete.vmdk

And option is to attach them to a new VM, and then delete the VM, but don't have the permissions to create an new VM.

 

br

A. Mikkelsen

If you found this or any other answer useful please consider the use of the Helpful or correct buttons to award points. Regards A. Mikkelsen
Reply
0 Kudos
10 Replies
LucD
Leadership
Leadership

Does the delete via the FileManager work?

See my Orphaned Files And Folders – Spring Cleaning


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

Reply
0 Kudos
A_Mikkelsen
Expert
Expert

Hi LucD,

Earlier today I tested with "VMFS" as datastore type, but that didn't work.

I just tested with "vsan" as type, and no result.

Line 76: $fldList is blank

Regards
Anders

If you found this or any other answer useful please consider the use of the Helpful or correct buttons to award points. Regards A. Mikkelsen
Reply
0 Kudos
LucD
Leadership
Leadership

Looks like KB2115700 describes the issue.
I can't seem to find if  this was ever resolved.
Time to get the help from a VSAN expert :smileygrin:


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

Reply
0 Kudos
Jasemccarty
Immortal
Immortal

I'll see what I can do to help.

I haven't run across this myself, so let me spin something up in the lab & see if I can provide some guidance.

Jase

Jase McCarty - @jasemccarty
Reply
0 Kudos
A_Mikkelsen
Expert
Expert

Thanks both

looking forward to your reply

\\A. Mikkelsen

If you found this or any other answer useful please consider the use of the Helpful or correct buttons to award points. Regards A. Mikkelsen
Reply
0 Kudos
Jasemccarty
Immortal
Immortal

A.Mikkelsen -

Just getting back to work this AM, I'm going to attempt to reproduce it.

Keep in mind that on vSAN, everything is an object.

Swap files are objects.

vmdks are objects

snapshots are objects

and the namespace is an object (it just happens to contain the normal config/nvram/etc files)

Jase

Jase McCarty - @jasemccarty
Reply
0 Kudos
LucD
Leadership
Leadership

Does that mean that the DeleteVStorageObject method should be used?


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

Reply
0 Kudos
A_Mikkelsen
Expert
Expert

Hi Jase,

Will keep that in mind.
Let me know if I shall test anything...

\\Anders

If you found this or any other answer useful please consider the use of the Helpful or correct buttons to award points. Regards A. Mikkelsen
Reply
0 Kudos
Jasemccarty
Immortal
Immortal

A.Mikkelsen just a quick update.

I don't see a way yet to remove/purge these with the currently exposed vSAN cmdlets.

I'm currently going down the route of getting a directory listing and removing them as normal datastore items.

Unfortunately, it is a little here, little there, that I can look at it.

Jase McCarty - @jasemccarty
Reply
0 Kudos
A_Mikkelsen
Expert
Expert

Hi Jasemccarty,

Appriciate your effort, keep me updated 

For not I had to choose the workaround of createinga new VM and the deleting it again - shot life 🙂

I hope you fina a way.

A. Mikkelsen

If you found this or any other answer useful please consider the use of the Helpful or correct buttons to award points. Regards A. Mikkelsen
Reply
0 Kudos