Online Data Relocation39You can control which devices LVM scans by setting up filters in the lvm.conf configuration file. Thefilters in the lvm.conf file consist of a series of simple regular expressions that get applied to thedevice names in the /dev directory to decide whether to accept or reject each block device found.The following examples show the use of filters to control which devices LVM scans. Note that some ofthese examples do not necessarily represent best practice, as the regular expressions are matchedfreely against the complete pathname. For example, a/loop/ is equivalent to a/.*loop.*/ andwould match /dev/solooperation/lvol1.The following filter adds all discovered devices, which is the default behavior as there is no filterconfigured in the configuration file:filter = [ "a/.*/" ]The following filter removes the cdrom device in order to avoid delays if the drive contains no media:filter = [ "r|/dev/cdrom|" ]The following filter adds all loop and removes all other block devices:filter = [ "a/loop.*/", "r/.*/" ]The following filter adds all loop and IDE and removes all other block devices:filter =[ "a|loop.*|", "a|/dev/hd.*|", "r|.*|" ]The following filter adds just partition 8 on the first IDE drive and removes all other block devices:filter = [ "a|^/dev/hda8$|", "r/.*/" ]For more information on the lvm.conf file, see Appendix B, The LVM Configuration Files and thelvm.conf(5) man page.4.7. Online Data RelocationYou can move data while the system is in use with the pvmove command.The pvmove command breaks up the data to be moved into sections and creates a temporary mirrorto move each section. For more information on the operation of the pvmove command, see thepvmove(8) man page.Because the pvmove command uses mirroring, it is not cluster-aware and needs exclusive accessto a volume. For information on activating logical volumes on individual nodes in a cluster, seeSection 4.8, “Activating Logical Volumes on Individual Nodes in a Cluster”.The following command moves all allocated space off the physical volume /dev/sdc1 to other freephysical volumes in the volume group: