The following is a general procedure for recovering MD devices and logical volumes by using a Linux-based bootable media, and an example of such recovery. You can use a similar procedure in Linux.
To create the volume structure manually
Note: Logical Volume Manager utilities such as pvcreate and vgcreate, which are normally available in Linux, are not included in the bootable media environment, so you need to use the lvm utility with a corresponding command. For example: lvm pvcreate, lvm vgcreate, and lvm lvcreate.
(Do not reboot the machine at this point. Otherwise, you will have to create the volume structure again.)
Note: This procedure will not work if you connect to Acronis Backup Bootable Agent remotely, because the command shell is not available in this case.
Example
Suppose that you previously performed a disk-level backup of a machine with the following disk configuration:
The following picture illustrates this configuration.
Do the following to recover data from this archive.
Step 1: Creating the volume structure
mdadm --create /dev/md0 --level=1 --raid-devices=2 /dev/sd[ab]
mdadm --create /dev/md1 --level=1 --raid-devices=2 /dev/sd[cd]
Caution: The pvcreate command destroys all data on the /dev/md0 and /dev/md1 devices.
lvm pvcreate /dev/md0 /dev/md1
lvm vgcreate my_volgroup /dev/md0 /dev/md1
lvm vgdisplay
The output of the lvm vgdisplay command will contain lines similar to the following:
--- Volume group ---
VG Name my_volgroup
...
VG Access read/write
VG Status resizable
...
VG Size 1.99 GB
...
VG UUID 0qoQ4l-Vk7W-yDG3-uF1l-Q2AL-C0z0-vMeACu
lvm lvcreate -L1.99G --name my_logvol my_volgroup
lvm vgchange -a y my_volgroup
Step 2: Starting the recovery
For a complete list of commands and utilities that you can use in the bootable media environment, see List of commands and utilities available in Linux-based bootable media. For detailed descriptions of the acrocmd utility, see the Acronis Backup command-line reference.
Mounting backup volumes
You may want to mount a volume stored in a disk backup, for example, to view some files in it before starting the recovery.
To mount a backup volume
acrocmd list content --loc=\\server\backups --credentials=user,MyPassWd --arc=linux_machine
The output will contain lines similar to the following:
type: disk
Num Partition Flags Size Type GUID
---------- -------------------- ---------- ---------- ------------- --------
Dyn1 my_volgroup-my_lo... 4 GB Ext 3
Dyn2 md0 2.007 GB Ext 2
Disk 1 sda 16 GB DT_FIXED
1-1 sda1 Act,Pri 203.9 MB Ext 2
1-2 sda2 Pri 11.72 GB Reiser
1-3 sda3 Pri 1.004 GB Linux swap
Disk 2 sdb 8 GB DT_FIXED
2-1 sdb1 Pri 2.007 GB Ext 2
2-2 sdb2 Pri 2.007 GB None
Disk 3 sdc 1 GB DT_FIXED
Disk 4 sdd 8 GB DT_FIXED
4-1 sdd1 Pri 2.007 GB Ext 2
4-2 sdd2 Pri 2.007 GB None
acrocmd mount --loc=\\server\backups --arc=linux_machine --mount_point=/mnt --volume=DYN1
This command mounts the logical volume DYN1 on the mount point /mnt.
To unmount a backup volume
acrocmd umount --mount_point=/mnt