5.4.16.11. Controlling I/O Operations on a RAID1 Logical Volume
As of the Red Hat Enterprise Linux release 6.5, you can control the I/O operations for a device in a RAID1 logical volume by using the
--writemostly
and --writebehind
parameters of the lvchange
command. The format for using these parameters is as follows.
--[raid]writemostly PhysicalVolume[:{t|y|n}]
Marks a device in a RAID1 logical volume aswrite-mostly
. All reads to these drives will be avoided unless necessary. Setting this parameter keeps the number of I/O operations to the drive to a minimum. The default behavior is to set thewrite-mostly
attribute for the specified physical volume in the logical volume. It is possible to remove thewrite-mostly
flag by appending:n
to the physical volume or to toggle the value by specifying:t
. The--writemostly
argument can be specified more than one time in a single command, making it possible to toggle the write-mostly attributes for all the physical volumes in a logical volume at once.--[raid]writebehind IOCount
Specifies the maximum number of outstanding writes that are allowed to devices in a RAID1 logical volume that are marked aswrite-mostly
. Once this value is exceeded, writes become synchronous, causing all writes to the constituent devices to complete before the array signals the write has completed. Setting the value to zero clears the preference and allows the system to choose the value arbitrarily.