Skip to main content

Usage: Testing Disks

VC automates disk formating and run storage workloads on the target systems. We documented the rules and the mechanism we used to identify disks to run workloads on.

Rules

  1. On OS Disk, only run on the OS partition.
  2. If other disks have more than 1 partition, run on all concurrently that passes the filters (exclude /, /mnt, /boot.efi)
  3. On Linux, only run on four prefix: /dev/hd, /dev/sd, /dev/nvme, /dev/xvd.
  4. On Windows, disks with status set to offline and read-only will be filtered out.

Disk Filters

Different environments, Azure, AWS/GCP, Lab host, Lab VM, have vastly different configuration of disks. It is a challenge to have a schema that allows you to target the desired disk consistently. Virtual Client implements a set of DiskFilters to accomplish this.

Disk Filters are delimited by ampersand '&'. FilterName and FilterValues are delimited by colon, if applicable. For example, the following filter will return you the disks that are not OS Disk, and is between 3TB and 5TB in size.

OSDisk:false&SizeGreaterThan:3TB&SizeLessThan:5TB

It is important to note that filters are calculated in-order and are non-commutative. In other words, the filter will be examined from left to right, in order. For example, if you have a small os disk and a larger data disk, "OSDisk:false&SmallestSize" will return you the data disk, and "SmallestSize&OSDisk:false" will return empty.

FilterNameParameterDescription
NoneN/AReturn all the disks on system.
BiggestSizeN/AFinds all the disks with the biggest size.
SmallestSizeN/AFinds all the disks with the smallest size.
SizeGreaterThanLong : size in bytes (Support units like 5 GB)Will return disks greater or equal than defined size.
SizeLessThanLong : size in bytes (Support units like 4 TB)Will return disks less or equal than defined size.
SizeEqualToLong : size in bytes (Support units like 3 MB)Will return disks with in ±1% range of defined size.
OSDiskBool: includeDefault to true, which will return OSDisk only. Set to false to remove OS disk.
DiskPathstring: Disk paths delimited by commaReturn the disk which matches the provided disk path.

Default Filter

Default filter means getting the biggest disks.

BiggestSize

Disk Filter Examples

Here we give some example filters for disk testing scenarios.

  1. Test all the biggest disks except your OS disk. The OSDisk:false would be redundant if it's smaller than the disks you want to test.
BiggestSize&OSDisk:false
  1. Testing the OS disk
OSDisk
  1. Testing the smallest non-OS disk.
Smallest&OSDisk:false
  1. Test specific disks on your machine with size. This filter would return all the non-OS disk volumes with size of 4TB ±1%. If you want to test a specific disk with a unique size like 4TB, you can do filters that targets that disk.
SizeEqualTo:4TB&OSDisk:false
  1. Test a Disk which has a specific path. This filter will select the disk, which contains exact match of any specified disk path, in either Disk or Volume. For example, if D:/, E:/ are volumes on same disk and D:/ is provided, the entire disk will be selected.
DiskPath:C:/,D:/
DiskPath:/dev/sda,/dev/sdb