Creating the volume structure manually

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

  1. Boot the machine from a Linux-based bootable media.
  2. Click Acronis Bootable Agent. Then, click Run management console.
  3. On the toolbar, click Actions, and then click Start shell. Alternatively, you can press CTRL+ALT+F2.
  4. If necessary, examine the structure of volumes which are stored in the archive, by using the trueimagecmd utility. Also, you can use the trueimagemnt utility to mount one or more of these volumes as if they were regular volumes (see “Mounting backup volumes” later in this topic).
  5. Create the volume structure according to that in the archive, by using the mdadm utility (for MD devices), the lvm utility (for logical volumes), or both.

    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.

  6. If you previously mounted the backup by using the trueimagemnt utility, use this utility again to unmount the backup (see “Mounting backup volumes” later in this topic).
  7. Return to the management console by pressing CTRL+ALT+F1, or by running the command: /bin/product

    (Do not reboot the machine at this point. Otherwise, you will have to create the volume structure again.)

  8. Click Recover, then specify the path to the archive and any other required parameters, and then click OK.

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 machine has two 1-gigabyte and two 2-gigabyte SCSI hard disks, mounted on /dev/sda, /dev/sdb, /dev/sdc, and /dev/sdd, respectively.
  • The first and second pairs of hard disks are configured as two MD devices, both in the RAID-1 configuration, and are mounted on /dev/md0 and /dev/md1, respectively.
  • A logical volume is based on the two MD devices and is mounted on /dev/my_volgroup/my_logvol.

The following picture illustrates this configuration.

Acronis Backup & Recovery 3564 Creating the volume structure manually

Do the following to recover data from this archive.

Step 1: Creating the volume structure

  1. Boot the machine from a Linux-based bootable media.
  2. In the management console, press CTRL+ALT+F2.
  3. Run the following commands to create the MD devices:

    mdadm –create /dev/md0 –level=1 –raid-devices=2 /dev/sd[ab]
    mdadm –create /dev/md1 –level=1 –raid-devices=2 /dev/sd[cd]

  4. Run the following commands to create the logical volume group:

    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

  5. Run the following command to create the logical volume; in the -L parameter, specify the size given by VG Size:

    lvm lvcreate -L1.99G –name my_logvol my_volgroup

  6. Activate the volume group by running the following command:

    lvm vgchange -a y my_volgroup

  7. Press CTRL+ALT+F1 to return to the management console.

Step 2: Starting the recovery

  1. In the management console, click Recover.
  2. In Archive, click Change and then specify the name of the archive.
  3. In Backup, click Change and then select the backup from which you want to recover data.
  4. In Data type, select Volumes.
  5. In Items to recover, select the check box next to my_volgroup-my_logvol.
  6. Under Where to recover, click Change, and then select the logical volume that you created in Step 1. Click the chevron buttons to expand the list of disks.
  7. Click OK to start 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

  1. Use the –list command to list the volumes which are stored in the backup. For example:

    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.

  2. Use the –mount command, specifying the volume’s index in the -
    i
    parameter. For example:

    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

  • Use the –unmount command, specifying the volume’s mount point as a parameter. For example:

    trueimagemnt –unmount /mnt

Creating the volume structure manually