You are on page 1of 1

How to setup LVM hot spare

Setup LVM hot spare.


Answer
Hot Spare only works if the volume group has mirrored logical volumes. There can be no logical
partitions using the drive to be marked a hot spare. The following command marks hdisk1 as a hot
spare disk:
# chpv -hy hdisk1
Now that the drive is marked as a hot spare you must determine the hotsparepolicy, and the syncpolicy.
Here are your options:
Hotsparepolicy:
y This policy automatically migrates partitions from one failing disk to one
spare disk. From the pool of hot spare disks, the smallest one that is big
enough to substitute for the failing disk will be used.
Y This policy automatically migrates partitions from a failing disk, but might
use the complete pool of hot spare disks.
n No automatic migration will take place. This is the default value for a volume group.
r This value removes all disks from the pool of hot spare disks for this volume group.
Syncpolicy:
y This will automatically try to synchronize stale partitions.
n This will not automatically try to synchronize stale partitions. The latter argument is also the default
for a volume group.
This is the syntax to set the policies:
# chvg -h hotsparepolicy -s syncpolicy VolumeGroup
for example:
# chvg -hy -sy vgname
Now the vg will have a hot spare.

You might also like