blog header
Subscribe via: (Email / RSS)

VCDX Enterprise Admin Notes: Manage VMFS Filesystems Using Command-Line Tools

by Harley Stagner on December 8, 2009

This VCDX Enterprise Admin exam note deals with managing VMFS volumes from the command-line.  While vmkfstools is the main utility used to manage VMFS volumes, there are several other commands that supplement vmkfstools to help identify and change vmfs volume characteristics.

Exam Notes for Objective 1.1.S.4

  • Querying for information:
    • ls -la /vmfs/volumes (shows all the VMFS volumes available to the ESX server. This includes UUID and Volume Label, which is just a symbolic link to the UUID directory.)
    • esxcfg-vmhbadevs -m (shows a mapping of VMFS volumes to their Service Console partitions and vmhba names. The volume is identified by the UUID).
    • vdf -h (show some quick size statistics- Size, Used, Avail, %Used- on your VMFS volumes. The volume is identified by the UUID and the volume label).
    • vmkfstools -P -h /vmfs/volumes/VolumeLabel or UUID (Where VolumeLabel is the volume label and UUID is the UUID of the volume. Shows metadata information about the VMFS volume.)
  • If you need to change the volume label on a particular VMFS volume use the following commands on each ESX server that has access to the VMFS volume.
    • ln -sf /vmfs/volumes/UUID /vmfs/volumes/NewVolumeLabel (Where UUID is the UUID of the volume and NewVolumeLabel is your new volume label. This command simply changes the symbolic link to the UUID volume directory.)
    • service mgmt-vmware restart (This restarts the ESX host agent on the host server.)
  • Creating and extending VMFS volumes:
    • vmkfstools -C vmfs3 -b BlockSize -S VolumeLabel vmhba#:#:#:# (Where BlockSize is 1,2,4,or 8. The default block size is 1MB if left alone. Where VolumeLabel is the volume label for your new VMFS volume. Finally, your vmhba path in adapter:target:lun:partition e.g. vmhba32:0:0:1. This creates a VMFS volume.)
    • vmkfstools -Z VMFS_Extent Original_VMFS (Where VMFS_Extent is the extent to add to the original VMFS and Original_VMFS is the original VMFS. E.G. vmkfstools -Z vmhba32:0:1:1 vmhba32:0:0:1 . This will extend a VMFS volume. THE ORDER OF THIS COMMAND IS VERY IMPORTANT AS ANY DATA ON THE EXTENT LUN WILL BE DESTROYED!!! )

Leave a Comment