Hi All,
Hopefully this is an easy one. I have a LUN that has a few vmdks on it. Is there a quick command line to use for formatting this LUN?
Thanks,
Daniel
Yup, Add Storage, select LUN A, should pop a warning saying it will delete all data on volume, OK, name, next next next. That's it, all VMDKs gone.
Or you could use vmkfstools from the service console.
vmkfstools -C vmfs3 -S VolName /path/to/device
Just use 'Add Storage' under the Configuration->Storage tab in the VI client, this will reformat the volume as VMFS (wiping out and existing VMDKs).
Alex
Sorry, I should have been more clear. Here's the scenario.
I have LUNA - currently being used by a cluster of 4 ESX hosts. There are 2 VMs VMDK currently stored on LUNA
I could go to LUN A and manually remove those VMDK files. What I am looking for is a way to do this quickly because I have LUNB, LUNC, LUND...that have similar set up (for testing purpose).
So, either manually go to each LUNs and delete the VMDK manually or find a way to do it quicker. Is there such a way?
vmkfstools can format a LUN.
--Matt
VCP, vExpert, Unix Geek
Yup, Add Storage, select LUN A, should pop a warning saying it will delete all data on volume, OK, name, next next next. That's it, all VMDKs gone.
Or you could use vmkfstools from the service console.
vmkfstools -C vmfs3 -S VolName /path/to/device
Hello,
Do you want the data cleared from the LUN or do you want the Table of contents to have their entry removed? Delete from disk or a format will not actually delete the blocks of data from a forensic recovery.....
Best regards,
Edward L. Haletky
VMware Communities User Moderator, VMware vExpert 2009
====
Author of the book 'VMWare ESX Server in the Enterprise: Planning and Securing Virtualization Servers', Copyright 2008 Pearson Education.
Blue Gears and SearchVMware Pro Blogs -- Top Virtualization Security Links -- Virtualization Security Round Table Podcast
to have more control on the task format one LUN ay a time from VI client as suggested in previous posts
however you can try something like this if you want all LUNS formatted : i've not tried it
-
#!/bin/bash
for i in `find /vmfs/volumes/ -name <LUN_Name> `
do
echo "Formatting $i"
<command to format LUN parametrized with $i>
done
-
I'm not sure that's what you want so USE IT AT YOUR OWN RISK and ON TEST ENVIRONMENT
\aleph0
____________________________
###############
If you found this information useful, please consider awarding points for "Correct" or "Helpful". Thanks!!!
Thanks for the options.