Product Announcements

VMware Virtual SAN Operations: Disk Group Management

VSAN-Ops-LogoThis new blog series will focus on Virtual SAN day-to-day operations related tasks and their recommended operating procedures. I will start the series by covering one of the key and most important aspects of Virtual SAN, which is the management of disk groups.

Managing Disk Groups

Disk groups are logical management constructs designed to aggregate and manage locally attached flash devices and magnetic disks on ESXi hosts. When disk groups are created the flash devices are utilized to create a performance (caching) layer, while magnetic disks are utilized to create the persistent storage layer and provide storage capacity.

Creating Disk Groups

Disk groups are individually created on every host that is a member of a Virtual SAN enabled cluster. Creating a disk group requires the existence of a single flash device and a single magnetic disk at the very least. A disk group supports a maximum of one flash device, and up to seven magnetic disks.

Disk groups can be created through the vSphere Web Client as well as the command line interface utilities such as esxcli after the Virtual SAN feature has been enabled in a cluster. The vSphere Web Client presents the simplest method for small environments, while command line utilities such as esxcli can provide automation capabilities for large environments.

The recommended procedures for creating disks groups are described below.

Creating disk groups from the vSphere Web Client 

  1. Log into the vSphere Web Client
  2. Navigate to the Hosts and Clusters view and select the Virtual SAN enabled cluster
  3. Go to the manage tab and select Disk management under the Virtual SAN section
  4. Click the Claim Disks icon
  5. Select a flash device and as many magnetic disks needed
  6. Click Ok

Creating disk groups from the CLI (ESXCLI)

  1. Login to a host via SSH
  2. Identify the device IDs of all disks that will be used to create the disk group
    esxcli core storage device listesxcli-1
  3. Add a flash device and one or more magnetic disks to create the disk group
    esxcli vsan storage add -s <naa.id> -d <naa.id>
    esx2

Note: All of the flash devices and magnetic disks must not contain any existing logical partitions. In the event, they do; all partitions must be deleted before Virtual SAN can utilize them.  For instructions on how to delete partitions, please see http://blogs.vmware.com/vsphere/2014/05/virtual-san-troubleshooting-automatic-add-disk-storage-mode-fails-part-1.html.

Deleting Disk Groups

Disk groups may be deleted for a couple reasons ranging from hardware device decommission, device failure, as well as device upgrades. It is important to point out that deleting a disk group not only deletes that logical construct, but it also permanently deletes the membership between the disks as well as all of their stored content.

Disk groups can be deleted through the vSphere Web Client as well as the command line interface utilities such as esxcli. The vSphere Web Client presents the simplest method for small environments, while command line utilities such as esxcli can provide automation capabilities for large environments.

The recommended procedures for deleting disks groups are described below.

Deleting disk groups from the vSphere Web Client

  1. Log into the vSphere Web Client
  2. Navigate to the Hosts and Clusters view and select the Virtual SAN enabled cluster
  3. Go to the manage tab and select General under the Virtual SAN section
  4. Click on the edit button on the Virtual SAN is Turned On filed
  5. Change the Add disk to Storage setting from Automatic to Manual
  6. Select Disk management under the Virtual SAN section
  7. Select the desired disk group to delete
  8. Click the remove disk group icon to delete the disk group
  9. Click Yes on the disk group pop window to the delete disk group

Note: While it is not a requirement, consider placing the hosts in maintenance mode before deleting a disk group. Placing a host in maintenance mode provides an opportunity to migrate data if necessary. 

Deleting Disk Groups procedure from the CLI (RVC)

  1. Log into vCenter via RVC
  2. From the RVC command line navigate to the datacenter tree structure
    cd vcenter_server/datacenter
    remove-rvc
  3. Use the vsan.host_wipe_vsan_disks command to delete the disks on a particular host
    vsan.host_wipe_vsan_disks ~/computers/cluster/hosts/hostname-or-ip/ -f
    force-rvc
  4. A message output similar to the one illustrated below validates the successful deletion of the disk group.
    success-remove

While it is not a requirement, consider placing the hosts into maintenance mode before deleting a disk group. Placing a host in maintenance mode provides the opportunity to migrate data if necessary.

In the next post I will cover the recommended procedures for replacing failed devices.

– Enjoy

For future updates on Virtual SAN (VSAN), Virtual Volumes (VVols), and other Software-defined Storage technologies as well as vSphere + OpenStack be sure to follow me on Twitter: @PunchingClouds