Replacing objects This chapter discusses how to replace objects. What is object-replace? Occasionally, you might wish to change the configuration of a volume or storage object. For instance, you might wish to replace one of the disks in a drive-link or RAID-0 object with a newer, faster disk. As another example, you might have an EVMS volume created from a simple disk segment, and want to switch that segment for a RAID-1 region to provide extra data redundancy. Object-replace accomplishes such tasks. Object-replace gives you the ability to swap one object for another object. The new object is added while the original object is still in place. The data is then copied from the original object to the new object. When this is complete, the original object is removed. This process can be performed while the volume is mounted and in use. Replacing a drive-link child object For this example, we will start with a drive-link object named link1, which is composed of two disk segments named sda1 and sdb1. The goal is to replace sdb1 with another segment named sdc1. Note The drive-linking plug-in allows the target object (sdc1 in this example) to be the same size or larger than the source object. If the target is larger, the extra space will be unused. Other plug-ins have different restrictions and might require that both objects be the same size. Using the EVMS GUI or Ncurses Follow these steps to replace sdb1 with sdc1: Select Actions Replace. In the "Replace Source Object" panel select sdb1. Activate Next. In the "Select Replace Target Object" panel, select sdc1. Activate Replace. Alternatively, you can perform these same steps with the context sensitive menus: From the "Disk Segments" panel, right click (or Press Enter on) the object sdb1. Choose Replace on the popup menu. In the "Select Replace Target Object" panel, select sdc1. Activate Replace. When you save changes, EVMS begins to copy the data from sdb1 to sdc1. The status bar at the bottom of the UI will reflect the percent-complete of the copy operation. The UI must remain open until the copy is finished. At that time, the object sdb1 will be moved to the "Available Objects" panel. Using the CLI Use the Replace to replace objects with the CLI: Replace:source_object_name, target_object_name "source_object_name" is the name of the object you wish to replace with "target_object_name." In the following example, sdb1 is replaced with sdc1. Replace:sdb1,sdc1