The following are 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 recover MD devices and logical volumes
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: lvm pvcreate, lvm vgcreate, etc.
(Do not reboot the machine at this point. Otherwise, you will have to create the volume structure again.)
Note: This procedure does not work when connected to Acronis Backup & Recovery 10 Bootable Agent remotely, because the command shell is not available in this case.
Example
Suppose that you previously performed a disk 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 trueimagecmd and trueimagemnt utilities, see the Acronis Backup & Recovery 10 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
trueimagecmd --list --filename:smb://server/backups/linux_machine.tib
The output will contain lines similar to the following:
Num Idx Partition Flags Start Size Type
---- --- --------- ----- ----- --------- ------
Disk 1:
Table 0 Table
Disk 2:
Table 0 Table
...
Dynamic & GPT Volumes:
DYN1 4 my_volgroup-my_logvol 12533760 Ext2
You will need the volume's index, given in the Idx column, in the next step.
trueimagemnt --mount /mnt --filename smb://server/backups/linux_machine.tib -i 4
This command mounts the logical volume DYN1, whose index in the backup is 4, on the mount point /mnt.
To unmount a backup volume
trueimagemnt --unmount /mnt