Changing the read policy for mirrored volumes

For a mirrored volume, Veritas Volume Manager (VxVM) uses the read policy to determine which data plex in the volume to use for reads. By default, VxVM chooses a plex using the following criteria, in order:

To customize the read policy, you can choose one of the following VxVM read policies:

prefer

Uses a particular named plex to satisfy read requests. Specify one preferred plex when you set the prefer policy.

If a read request cannot be satisfied by the preferred plex, VxVM applies the plex order in the select policy.

round

Distributes the non-sequential read operations in "round-robin" fashion across all of the available plexes. For example, given three plexes, VxVM switches between each of the three plexes, so that each plex receives one third of the read requests. Sequential read operations access only one plex. This approach takes advantage of the drive or controller read-ahead caching policies.

select

Chooses a plex based on the characteristics of the plex. The select policy is the default read policy, unless site consistency is enabled. If sites are configured, VxVM internally switches to the siteread policy.

The select policy chooses a plex in the following order:

  • Locally connected striped SSD plexes

  • Locally connected SSD plexes

  • Locally connected striped plexes

  • Locally connected plexes

  • Remotely connected striped SSD plexes

  • Remotely connected SSD plexes

If VxVM cannot find a plex with the above characteristics, VxVM uses the round policy.

siteread

Reads preferentially from plexes at the locally defined site. This method is the default policy for volumes in disk groups where site consistency is enabled.

The siteread policy chooses a plex in the following order:

  • Local site, locally connected striped SSD plexes

  • Local site, locally connected SSD plexes

  • Local site, locally connected striped plexes

  • Local site, locally connected plexes

  • Local site, remotely connected striped SSD plexes

  • Local site, remotely connected SSD plexes

  • Local site, remotely connected striped plexes

  • Local site, remotely connected plexes

If VxVM cannot find a plex with the above characteristics, VxVM refers to the plex order in the select policy.

split

Divides the read requests and distributes them across all the available plexes.

Note:

You cannot set the read policy on a RAID-5 volume.

To set the read policy to round, use the following command:

# vxvol [-g diskgroup] rdpol round volume

For example, to set the read policy for the volume vol01 in disk group mydg to round-robin, use the following command:

# vxvol -g mydg rdpol round vol01

To set the read policy to prefer, use the following command:

# vxvol [-g diskgroup] rdpol prefer volume preferred_plex

For example, to set the policy for vol01 to read preferentially from the plex vol01-02, use the following command:

# vxvol -g mydg rdpol prefer vol01 vol01-02

To set the read policy to select, use the following command:

# vxvol [-g diskgroup] rdpol select volume