View Source

----
{toc:location=top|maxLevel=3|minLevel=3|type=flat|separator=pipe|style=border:1}

----
h3. Preparations


h4. Configuring Server with LVM

For testing purposes, create a Server with a complex LVM layout with five (5) different disks:


!scheme1.png!


The second volume group has to be manually created. Linux install-time partitioning tools put LVM physical volumes on partitions, not raw devices.
* Create physical volumes, i.e., mark already created hard disk partitions for use as a part of LVM. If the swap partition was not an LVM volume, then do not run "pvcreate" on it. The example below shows how to run the {{pvcreate}} command on {color:blue}/dev/hda1:{color} {code}
# pvcreate /dev/sdd
# pvcreate /dev/sde{code}

* Create a Volume Group with the same name as on the backed up Server. By default, CentOS installer names the first volume group "VolGroup00" as in the example below:

{code}#vgcreate VolGroup002 /dev/sdd /dev/sde{code}

* Create the logical volume (LVM) for swap space. This volume should have the same name as it did on the backed up Server. In this example, it is LogVol00. Execute the following command:

{code}# lvcreate --size 17G --name LogicalVol004 VolGroup002 Logical volume "LogicalVol004" created
# lvcreate --extents 2046 --name LogicalVol005 VolGroup002 Logical volume "LogicalVol005" created{code}

The following screen-shot displays all commands for the second volume group:

!lvm01.png!

The following screen-shot shows how the example layout looks in *fdisk*. {{/dev/sdd}} and {{/dev/sde}} do not have partition tables, but LVM can still use them as physical volumes.

!lvm02.png!

h4. Creating a Disk Safe

Create a Disk Safe{newversion} with the "Protect Storage Configuration" option enabled{newversion}. See [Create Disk Safes].

!Create New Disk Safe window_Create button_English.png!

h4. Creating and Running a Policy

1. Create a basic Policy for the new Disk Safe. See [Create policies].

!Create New Policy window_Filled in_Create button_English.png!

2. Then run the created Policy. See [Run policies].

----
h3. Bare-Metal Restore Process

Follow the instructions below to start the Bare-Metal Restore with LVM.
{info:title=Note}The process is the same for all Boot methods:
* Live CD
* PXE Network Boot
{info}

h4. Step 1:  Boot from Live CD or PXE Network Boot

If you are restoring your system partition (e.g. {{/}}, {{/boot}}, {{/bin}}, {{/lib}}, etc.), boot physical or virtual machine from one of the available Server Backup disaster recovery media options (Live CD or PXE Network Boot.)

For more information, see:
* [Boot a server from a CD]
* [Use PXE network boot]

h4. Step 2: Initiate a Bare-Metal Restore from "Recovery Points"

1. Click on "Recovery Points" in the Main Menu to open the "Recovery Points" screen.

2. Select a Server from the drop-down menu located on the "Recovery Points" list toolbar.

Select a Disk Safe from the drop-down menu located on the "Recovery Points" list toolbar.

{info:title=Tip}Alternatively, you can click on "Servers" in the main menu, then select the "Disk Safes" tab in the bottom pane, and then click on the "Recovery Points" icon for the Disk Safe to access the Recovery Points list.
{info}
3. In the "Recovery Points" list, click on the "Bare-Metal Restore" icon in the "Actions" column for the Recovery Point from which you are going to restore.

!Recovery Points_Enterprise_Bare-Metal Restore icon_English.png!

{info:title=Tip}
To find a Recovery Point, you can use the Basic and Advanced List Filters. See [ServerBackup:Customize the Recovery Points list].
{info}
4. The "Bare-Metal Restore" window opens.


!BMR_Main window_English.png!

Look through the information on the Introduction screen and click "Next."

!next.png!

h4. Step 3:  Choose Filesystems


{info:title=Note}
Hereinafter on this page there are some changes. Please refer to this link: [Using Bare-Metal Restore Device Auto-Mapping|Using Bare-Metal Restore Device Auto-Mapping] explaining the new feature.
{info}


On the next page, select the filesystem you want to restore. All available filesystems are listed. In our example, we select the {{/}}, {{/boot}}, {{/home}}, {{/home/user1}}, and {{/home/user2}} filesystems.

!lvm05.png!

Click "Next" to proceed to the following step.

!next.png!

h4. Step 4: Select Host

On the next screen, select the "Restore to Alternate Host Name/IP" option. Enter the IP address and port of your Live CD or PXE Boot environment.

!lvm16.png!

Click "Next" to proceed to the following step.

!next.png!

h4. Step 5: Define Restore Storage Configuration

On the "Restore Storage Configuration" screen, choose the "Select Storage Configuration to Restore" option.

!lvm17.png!

Click "Next" to proceed to the following step.

!next.png!

h5. 5.1 Choose Partition Tables

Partition tables should be restored before restoring LVM Volume Groups. Go through all of the Partition Tables steps before moving on to LVM Volume Groups:
* Choose Partition Tables
* Select Partition Tables
* Map Partition Tables
* Restore Partition Tables

!lvm18.png!

On the "Choose Partition Tables" screen, choose the "Select Partition Tables to Restore" to pick partition tables from the Recovery Point to restore to the target host. 

!lvm19.png!

Click "Next" to proceed to the following step.

!next.png!

Then choose the appropriate partition table layout(s) for the filesystems you want to restore. At least one partition table check-box must be selected.

!lvm20.png!

{info:title=Tip}
Click the plus-sign to see the details of a partition table.

!plus1.png!

The following information is available:
* Content Type
* Size
* Number Of Sectors
* Sector Size
* Serial Number 
* Partitions
{info}

Click "Next" to proceed to the following step.

!next.png!

After choosing partition tables to restore, you need to map the partition tables to the disks on the target host. Map all the partition tables selected.
{note:title=Notice}The target disk must be large enough to hold the partition table, and each target disk can only be selected once.
{note}
!lvm21.png!

Click "Next" to proceed to the following step.

!next.png!

On the next screen, click on the "Restore Partition Tables" button.

!lvm23.png!

Then you should receive the "Successfully Restored Partition Tables" message. Click "OK."

!part_rest.png!

Output from *fdisk* before partition table restore:

!lvm07.png!

Output from *fdisk* after partition table restore (should match original):

!lvm08.png!

h5. 5.2 Choose Software RAID Devices

In our example, there are no Software RAID devices to restore.

If you have any Software RAID devices to restore, they should be restored prior to LVM Volume Groups. Go through all of the Software RAID steps before moving on to LVM Volume Groups.

!lvm09.png!

h5. 5.3 Choose LVM Volume Groups

Selecting LVM Volume Groups is just like choosing Software RAID devices. On "Choose LVM Volume Groups," choose the "Select LVM Vlume Groups to Restore" option.

!lvm24.png!
 
Click the "Next" button.

!18_restore.png!

Choose LVM Volume Groups on the "Select LVM Volume Groups" screen.

!lvm26.png!

{info:title=Tip}
Click on the plus sign to see the details of a Volume Group.

!lvm25.png!

The following information is available:
* Size
* Attributes
* LV Count
* PV Count
* Volumes
{info}
Click the "Next" button.

!18_restore.png!
 
Mapping LVM Volume Groups is similar to mapping Software RAID devices, but there are only physical volumes instead of active/spare members. Devices already restored to {{/dev/sda}}, {{/dev/sdb}}, etc., are pruned from the available devices list.

!lvm27.png!

When all the members are mapped, clicking the "Restore LVM Volume Groups" button will launch the restore.

!lvm28.png!

The "Successfully restored LVM volume groups" message appears. Click "OK."

!vol_gr_rest.png!

When the restore completes successfully, the LVM logical volumes will be available for mapping the selected filesystems.

h4. Step 6: Map Filesystems

Map filesystems in the Recovery Point to logical volumes as a restore destination.

Enter the new Logical Volume as the destination, for example, {{/dev/mynew_vg/vol01}}.

!lvm13.png!

You are provided a table that allows you to map the chosen Partition Tables to physical Disks on the Target Server. You can see as many lines in the table as the number of Partition Tables selected for restore. Each Partition Table must be mapped to a physical Disk on the Target Server before proceeding.
\\
{note:title=Notice}Make sure that the partition for {color:blue}/boot{color} is big enough.
{note}

{info:title=Tip}Click the plus-sign to see the details filesystems.
{info}

After selecting the Disks, click on "Next" to proceed to the next page.

!next.png!

Make sure the "Reboot after restore" box is unchecked.

!reboot.png!

Click "Next" to proceed to the following step.

!next.png!

On the "Summary" page, you will need to confirm the selected Bare-Metal Restore options. Each selected filesystem is listed, along with the name of the target device to which it is being mapped.

!summary.png!


Click "Restore" to start the Bare-Metal Restore task.

!18_restore.png!

The data Restore is initiated. Click "OK" in the notification pop-up.

!19_19.png!

{info:title=Tip}
The Task results can be sent via email as a Report. See [Reporting].
{info}

The Restore process starts and can take a while. You can go to the "Task History" screen to observe the task progress. See [Access task history].

The Task History page displays the State, Alert, Type, Progress Percentage, and the Started Time Stamp of the Bare-Metal Restore process.

!BMR_Success_English.png!

When the process is complete, you can reboot the Server you just restored by pressing <Ctrl><Alt><Del> or by executing the reboot command in the root shell.
{info:title=Note}
Make sure you eject the Disk from the CD-ROM drive so that the Server will boot from the hard Disk.

!centos.png!

If the Disk you used for your Bare-Metal Restore is larger than the Disk you backed up previously, the free space on the new Disk will remain free. You can create a new Partition in this space.
{info}

Results can also be verified at the command line via the "ls" command.

Before restoring LVM devices:

!lvm14.png!

After restoring LVM devices:

!lvm15.png!





{excerpt:hidden=true}Instructions on how to run the bare-metal restore with Linux Logical Volume Manager (LVM).{excerpt}