Home VMware ESX and ESXi Server
Service Console - VMFS Datastores Print E-mail
Create a VMFS volume on a LUN:
vmkfstools -C vmfs3 -S label vmhba1:0:2:1

Identify disks attached to the ESX server including SAN LUNs (in human readable format):
vdf -h

Read Metadata from VMFS volumes (version, capacity and file block size):
vmkfstools -P /vmfs/volumes/LUN-A1

Add and extent to a datastore (Each LUN can be max 2TB. 32 extents can be added to reach 64TB):
[vmkfstools -Z addthislun tothislun]
vmkfstools -Z vmhba1:0:12:1 vmhba1:0:11:1

Delete an extended volume:
vmkfstools -C vmfs3 -S LUNB vmhba1:0:12:1

Rename a VMFS datastore:
ls -laF /vmfs/volumes/
Note down the id of the volume linked to the datastore you want to rename (e.g. /vmfs/volumes/477c7-634968-3c1a-001...).
rm -rf /vmfs/volumes/oldname
ln -s /vmfs/volumes/477c7-634968-3c1a-001... /vmfs/volumes/newname


Command Options:
/usr/sbin/vmkfstools -h
No valid command specified

OPTIONS FOR FILE SYSTEMS:
vmkfstools -C --createfs vmfs3
-b --blocksize #[mMkK]
-S --setfsname fsName
-Z --extendfs extension-partition
deviceName
-P --queryfs -h --humanreadable
-T --tovmfs3
-x --upgradetype [zeroedthick|eagerzeroedthick|thin]
-u --upgradefinish
vmfsPath

OPTIONS FOR VIRTUAL DISKS:
vmkfstools -c --createvirtualdisk #[gGmMkK]
-d --diskformat [zeroedthick|
eagerzeroedthick|
thick|
thin]
-a --adapterType [buslogic|lsilogic]
-w --writezeros
-j --inflatedisk
-U --deletevirtualdisk
-E --renamevirtualdisk srcDisk
-i --clonevirtualdisk srcDisk
-d --diskformat [rdm:|rdmp:|
raw:|thin|2gbsparse|
monoflat|monosparse]
-X --extendvirtualdisk #[gGmMkK]
-M --migratevirtualdisk
-r --createrdm /vmfs/devices/disks/...
-q --queryrdm
-z --createrdmpassthru /vmfs/devices/disks/...
-v --verbose #
-g --geometry
-J --miscop [setuuid | getuuid]
vmfsPath

OPTIONS FOR DEVICES:
vmkfstools -s --scan adapterName
-L --lock [reserve|release|lunreset|targetreset|busreset] /vmfs/devices/disks/...
 

        
            

      

 

DISCLAIMER: All advice, tips, guides and other information on this website is provided as-is with no warranty or guarantee. While most information is correct to the best of my knowledge, I am not reponsible for any issues that may arise in using the information, and you do so at your own risk. As always before doing anything; check, double check, test and always make a backup.

 

Help VMadmin

All resources on this site are provided absolutley free. However it takes time and money to keep the site running. If any information has been helpful to you or your company, and you wish to make a donation to help keep VMadmin.co.uk running you can do so via paypal, and it would be much appreciated.

Click to donate to VMadmin.co.uk via paypal.