iSCSI initiator with TSM DP for VMware to perform individual file recovery
Information for manually configuring an iSCSI initiator on Linux and Windows 7 to perform individual file recovery from full-VM backup images in conjunction with IBM Tivoli Storage Manager for Virtual Environments - Data Protection for VMware (TSM for VE - DP for VMware).
GENERAL PROCEDURES FOR USING iSCSI TO PERFORM INDIVIDUAL FILE RECOVERY FROM FULL-VM BACKUP IMAGES
An iSCSI initiator is used in conjunction with the Data Protection for VMware Windows Recovery Agent to achieve individual file recovery from full-vm backup images; the Windows Recovery Agent acts as the iSCSI target and exposes (or presents) a snapshot of a backup copy of a disk to the iSCSI initiator which in turn can read data from the exposed disk. The Data Protection for Windows Mount must be deployed on an officially supported platform. This article provides more detail on how to manually configure an iSCSI initiator from a Linux or Windows 7 machine in order to perform an individual file recovery.
Note that the iSCSI initiator on Linux distributions require that the open-iscsi administration utility, iscsiadm, be installed and configured in the virtual machine guest which is the target of a file recovery operation. Installation and configuration of iscsiadm is outside of the scope of this document.
Follow these steps to use an iSCSI initiator to perform individual file recovery from full-vm image backups
- On the VMware virtual machine guest on which the recovery will be performed, note the iSCSI initiator name.
- For Linux, this iSCSI initiator name is typically found in the file /etc/iscsi/initiatorname.iscsi, for example: InitiatorName=iqn.1994-05.com.redhat:2a4b889612
- For Windows 7, find and launch the iSCSI Initiator program; the initiator name can be found in the Configuration tab under "Initiator Name", for example: iqn.1991-05.com.microsoft:patmos
- On the machine running the Data Protection for Windows Mount UI (iSCSI target)
- launch the UI and fill in the "TSM Server" and "Select snapshot" dialogs and select the "Mount" button
- On the "Choose mount destination" dialog, select the radio button "Mount an iSCSI target"
- Create a "Target name". This should be a unique name which you can identify from the machine running the iSCSI initiator, for example, "dpvmware-001"
- Fill in the "Initiator name" from Step 1 above (the string which typically starts with "iqn")
- Click "OK"
- For VMware virtual machine guests running Linux, issue the following commands as the root user from a terminal session:
iscsiadm -m discovery -t sendtargets -p <ip address of iSCSI target> -l
Note: The '-p' parameter indicates the IP address of the iSCSI target listed in Step 2 above; you can either use a hostname or dotted IP address for the -p parameter
- For VMware virtual machines running Microsoft Windows 7
- Find and launch the "iSCSI Initiator" program
- In the "Targets" tab, fill-in the dialog labeled "Target:" with the TCP/IP address of the Data Protection for Windows Mount (iSCSI target) from Step 2 above and click "Quick Connect"
- A "Quick Connect" dialog should now display a target which matches the "Target name" chosen in Step 2 above. Select this target and click "Connect"
SUGGESTIONS FOR MOUNTING LOGICAL PARTITIONS MANAGED BY THE LINUX LOGICAL VOLUME MANAGER (LVM)
Once an image of a backup disk is exposed using the iSCSI protocol, the process of mounting the logical partitions contained on the exposed disk to the operating system is outside of the scope of this document. IBM does not support mounting logical partitions that are managed by the Linux logical volume manager (LVM); the following information is provided as informational on an "as-is" basis:
To mount a snapshot of an LVM volume on the same machine from which the snapshot was created, you will need to manually modify the snapshot disk as to not introduce duplicate physical and logical volume ids:
- You will to ensure that the script "vgimportclone" is available on the Linux machine. Note that this script is not shipped in the base (default) lvm package and you may have to update the lvm package to a level which provides this script.
- Before mounting a snapshot of the volume, note the disk layout (e.g., fdisk -l)
- Follow the procedures above to expose a snapshot from the iSCSI target (Data Protection for Windows Mount) and create a connection to the iSCSI initiator in the Linux virtual machine guest.
- On the Linux virtual machine guest, check the new disk layout (e.g., fdisk -l) to see which disks have been attached; in this example assume that /dev/sdb1 and /dev/sdb2 have been made available
- On the Linux guest, issue the vgimportclone command, providing a new base volume group name, for example:
vgimportclone --basevgname /dev/VolGroupSnap01 /dev/sdb2
- On the Linux guest, mark the logical volume as active:
lvchange -a y /dev/VolGroupSnap01/LogVol00
- On the Linux guest, mount the volume (in this example the volume will be mounted on an existing mount point named /snapmnt:
mount -o ro /dev/VolGroupSnap01/LogVol00 /snapmnt
To mount a snapshot of an LVM volume to a different machine, you will potentially need to manually modify the snapshot disk to mark the logical volume as active using the "lvchange" command documented in Step 6 above. Note that some Linux distributions will automatically mark the volume as active.
TROUBLESHOOTING iSCSI INITIATOR ERRORS (LINUX)
These are the most typical errors encountered on Linux when using the iSCSI initiator commands documented above:
- If the iSCSI service on Linux is not started, the following errors will typically be displayed:
iscsiadm: can not connect to iSCSI daemon
iscsiadm: Cannot perform discovery. Initiatorname required.
iscsiadm: Discovery Process to <ip address:port> failed to create a discovery session
If these errors occur, start the iSCSI daemon, for example, /etc/init.d/iscsi start
- If the iSCSI initiator name that was entered in the Data Protection for VMware Recovery Agent Mount interface (iSCSI target) does not match the actual iSCSI initiator name, the following errors will typically be displayed:
iscsiadm: Connection to Discovery Address <ip address> closed
iscsiadm: Login I/O error, failed to receive a PDU
iscsiadm: Retrying discovery login to <ip address>
If these errors occur, dismount the snapshot from the Data Protection for VMware mount UI (iSCSI target) and re-mount the snapshot following the instructions above in the "General Procedures for Using iSCSI to Perform Individual File Recovery from Full-VM Backup Images" section.
- If vgimportclone fails with
/dev/<device name> is not is a VG
Please refer to RedHat Bugzilla Bug 697959 (RedHat 5.6) or Bug 712147 (RedHat 6.1) and apply the appropriate fixing lvm2 package.
Note this is currently reported against lvm2 versions: lvm2-2.02.74.el5_6.1 - lvm2-2.02.84-3.el5 or lvm2-2.02.83-3.el6 - lvm2-2.02.86-1.el6
- Since iSCSI relies on TCP/IP communications, it is important that the IP network is correctly configured:
- Ensure that the virtual machine hosting the iSCSI initiator can ping the machine hosting the iSCSI target (Data Protection for VMware Windows Mount)
- Ensure that the port used for iSCSI communication is not closed by any intermediate firewalls between the machines hosting the iSCSI target and the iSCSI initiator. By default, port 3260 is used for iSCSI.
- Ensure that the Windows machine running Data Protection for VMware Mount command has bound the iSCSI port to the desired network interface controller (NIC). This can be done using the "netstat -a" command and verifying the IP address associated with the iSCSI port (by default, 3260). If the "netstat" command indicates that the desired NIC is not being used, modify the IP address used by doing the following:
- Dismount any snapshots currently mounted by Data Protection for VMware Mount and close the Data Protection for VMware Mount program.
- Locate the Data Protection for VMware Mount configuration file on the Windows machine (by default, it is located in C:\ProgramData\Tivoli\TSM\TDPVMware\mount\TDPVMwareMount.conf
- Add the following stanza at the bottom of the configuration file:
Target IP=<desired IPv4 address>
- Restart the Data Protection for VMware Mount program
More support for:
Tivoli Storage Manager for Virtual Environments
Data Protection for VMware
Software version: 6.2, 6.3, 6.4, 7.1
Operating system(s): Linux, Windows
Software edition: All Editions
Reference #: 1473127
Modified date: 13 December 2013
Translate this page: