Anda di halaman 1dari 24

HP StorageWorks D2D Backup System Linux Conguration Guide

Part number: EH88090927 Edition 1.0 edition: July 2007

Legal and notice information Copyright 2007 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice. The only warranties for HP products and services are set forth in the express warranty statements accompanying such products and services. Nothing herein should be construed as constituting an additional warranty. HP shall not be liable for technical or editorial errors or omissions contained herein. Intel, Itanium, Pentium, Intel Inside, and the Intel Inside logo are trademarks or registered trademarks of Intel Corporation or its subsidiaries in the United States and other countries. Microsoft, Windows, Windows XP, and Windows NT are U.S. registered trademarks of Microsoft Corporation. Adobe and Acrobat are trademarks of Adobe Systems Incorporated. Java is a US trademark of Sun Microsystems, Inc. Oracle is a registered US trademark of Oracle Corporation, Redwood City, California. UNIX is a registered trademark of The Open Group. Printed in the US

Contents
About this guide
Intended audience . . . . . . . . Related documentation . . . . . . Document conventions and symbols HP technical support . . . . . . . Customer self repair . . . . . . . Product warranties . . . . . . . . Subscription service . . . . . . . HP websites . . . . . . . . . . . Documentation feedback . . . . .

. . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . .

5
5 5 5 6 6 6 7 7 7

1 Introduction

Overview . . . . . . Hardware installation Software requirements Conguration stages .

. . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . .

9
9 9 9 9

2 Discovery

Overview . . . . . . . . . . . . . . . . . . . Using DHCP to discover the HP D2D Backup System Using the HP Discovery tool . . . . . . . . . . . To identify the required device . . . . . . . . To congure the network settings of a device . .

. . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . .

. . . . .

11
11 11 11 12 12

3 Conguring the iSCSI initiator . . . . . . . . . . . . . . . . . . .


Overview . . . . . . . . . . . . . . . . . . . . SLES 10 SP1 (x86, x64 & IA64) . . . . . . . . . . How to install the Open-ISCSI module . . . . . . How to congure the Open-ISCSI module using the How to congure the Open-ISCSI module using the RedHat 5 (x86, x64 & IA64) . . . . . . . . . . . How to install the Open-iSCSI module . . . . . How to congure Open-iSCSI module . . . . . . . . . . . . . . . . . . . . . . . . . . . command line GUI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . .

. . . . . . . .

15

15 15 15 15 17 17 17 17

4 Controlling an HP StorageWorks D2D Backup System . . . . . . . . .


Verify you are controlling the correct 1x8 G2 autoloader . . To verify the device le for the autoloader . . . . . . . To verify the tape device le for the tape drive . . . . . Reviewing the media in a 1x8 G2 autoloader . . . . . . . Loading a cartridge into the 1x8 G2 autoloader tape drive . Unloading a cartridge from the 1x8 G2 autoloader tape drive Moving a cartridge to the Mail Slot . . . . . . . . . . . . Moving a cartridge from the Mail Slot . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . .

. . . . . . . .

19

19 19 20 20 20 20 21 21

5 Backup and restore les using TAR . . . . . . . . . . . . . . . . .

Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Back up the Linux kernel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Restore the Linux kernel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

23

23 23 23

D2D Backup System

Tables
1 ..Document conventions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5

About this guide


This guide provides information about: Conguring Linux for use with the HP D2D Backup System Controlling an HP D2D Backup System

Intended audience
This guide is intended for network administrators and users with knowledge of: Ethernet networks Linux

Related documentation
The following documents [and websites] provide related information: HP StorageWorks D2D Backup System user guide, available in 13 languages HP StorageWorks D2D Backup System installation poster, available in 4 languages You can nd these documents from the Manuals page of the HP Business Support Center website: http://www.hp.com/support/manuals Search on the product name.

Document conventions and symbols


Table 1 Document conventions Convention
Blue text: Table 1 Blue, underlined text: http://www.hp.com Bold text

Element
Cross-reference links and e-mail addresses website addresses Keys that are pressed Text typed into a GUI element, such as a box GUI elements that are clicked or selected, such as menu and list items, buttons, tabs, and check boxes Text emphasis File and directory names System output Code Commands, their arguments, and argument values

Italic text Monospace text

Monospace, italic text Monospace, bold text

Code variables Command variables Emphasized monospace text

D2D Backup System

WARNING! Indicates that failure to follow directions could result in bodily harm or death.

CAUTION: Indicates that failure to follow directions could result in damage to equipment or data.

IMPORTANT: Provides clarifying information or specic instructions.

NOTE: Provides additional information.

TIP: Provides helpful hints and shortcuts.

HP technical support
For worldwide technical support information, see the HP support website: http://www.hp.com/support Before contacting HP, collect the following information: Product model names and numbers Technical support registration number (if applicable) Product serial numbers Error messages Operating system type and revision level Detailed questions

Customer self repair


HP customer self repair (CSR) programs allow you to repair your StorageWorks product. If a CSR part needs replacing, HP ships the part directly to you so that you can install it at your convenience. Some parts do not qualify for CSR. Your HP-authorized service provider will determine whether a repair can be accomplished by CSR. For more information about CSR, contact your local service provider. For North America, see the CSR website: http://www.hp.com/go/selfrepair

Product warranties
For information about HP StorageWorks product warranties, see the warranty information website: http://www.hp.com/go/storagewarranty

About this guide

Subscription service
HP recommends that you register your product at the Subscribers Choice for Business website: http://www.hp.com/go/e-updates After registering, you will receive e-mail notication of product enhancements, new driver versions, rmware updates, and other product resources.

HP websites
For additional information, see the following HP websites: http://www.hp.com http://www.hp.com/go/storage http://www.hp.com/service_locator http://www.hp.com/support/manuals http://www.hp.com/support/downloads

Documentation feedback
HP welcomes your feedback. To make comments and suggestions about product documentation, please send a message to storagedocs.feedback@hp.com. All submissions become the property of HP.

D2D Backup System

About this guide

1 Introduction
Overview
The HP StorageWorks D2D Backup System is an iSCSI disk-based storage appliance that emulates up to four tape devices, which can be used to back up a maximum of four host network servers or PCs. Each tape device is congured as a 1x8 G2 Ultrium Tape Autoloader (or standalone Ultrium Tape Drive). Autoloaders may be congured with between 8 and 24 slots.

Hardware installation
Please refer to the printed poster and the HP StorageWorks D2D Backup System User Guide on the HP StorageWorks CD-ROM for detailed instructions on installing the HP D2D Backup System and optional tape drive. The User Guide also describes how to use the Web Management Interface.

Software requirements
1. Refer to http://www.hp.com/go/connect to nd out which versions of Linux are supported and which backup applications are supported. 2. Make sure that your operating system is patched with the latest service packs. 3. Upgrade your backup application to the latest version.

Conguration stages
There are two stages to conguration: Discover the HP D2D Backup System on the network, give it a name and, if DHCP is not supported, assign network settings Create a base conguration to get started This guide describes how to perform these two stages.

D2D Backup System

10

Introduction

2 Discovery
Overview
The HP StorageWorks D2D Backup System must be assigned an IP address before an iSCSI connection can be made to it. If the network has a DHCP server, the HP StorageWorks D2D Backup System will be congured automatically with an IP address If no DHCP server is available, the HP StorageWorks D2D Backup System must be congured manually using the HP Discovery tool, provided on the HP StorageWorks CD-ROM

Using DHCP to discover the HP D2D Backup System


The IP address and other network settings are assigned automatically when you connect the HP D2D Backup System to the network. You only need to know the serial number of the HP D2D Backup System to complete the installation and create an 8slot autoloader conguration. The serial number can be found on a label on the front of the unit. In the web browser type in: D2DBS-<serial number> If you cannot connect to the HP D2D Backup System using the Web Management interface: Check that you are using a supported web browser and that Active Scripting or JAVA scripting is enabled. See the HP StorageWorks D2D Backup System User Guide for more information about recommended web browser settings. Check that the network light is on, on the front of the HP StorageWorks D2D Backup System as this indicates an IP address has been congured. Try connecting to the HP StorageWorks D2D Backup System using the DHCP assigned IP address instead.

Using the HP Discovery tool


The HP Discovery tool is a java application for conguring HP StorageWorks D2D Backup Systems. The tool can be run from HP StorageWorks CD-ROM by selecting HPdiscovery.sh in the Linux folder or by launching it from a console as follows: localhost:~ $ cd /media/cdrom/Linux/ localhost:~ $ ./HPdiscovery.sh NOTE: Java must be installed on the Linux system for the HP Discovery tool to work. Java can be installed using the Linux package manager or by visiting http://java.sun.com When the HP Discovery tool is run it will nd any HP StorageWorks D2D Backup Systems on the local network and list them by name. The name displayed by the HP Discovery tool should match the label on the front of the HP StorageWorks D2D Backup System.

D2D Backup System

11

NOTE: If no HP StorageWorks D2D Backup Systems are discovered, ensure that UDP port 8106 is open in any rewalls that are running.

To identify the required device


If you have multiple HP StorageWorks D2D Backup Systems on the network you can use the Beacon button to help identify the unit that you wish to congure. Select a device in the list and click Beacon. The lights on the front of the selected HP StorageWorks D2D Backup System will ash.

To congure the network settings of a device


1. Select the device in the list and click Congure.

12

Discovery

2. Enter the network details and click Congure to send the details to the HP StorageWorks D2D Backup System. The list of available HP StorageWorks D2D Backup System on the network will be displayed again, this time with the updated network settings shown. 3. Make a note of the IP address of the HP StorageWorks D2D Backup System because it will be required during iSCSI conguration.

D2D Backup System

13

14

Discovery

3 Conguring the iSCSI initiator


Overview
The HP D2D Backup System is an iSCSI device. This means that the HP D2D Backup System plugs directly into your network, but it presents devices as directly-attached SCSI autoloaders to host machines. In order to function, it requires an iSCSI initiator. The Open-iSCSI module is the iSCSI initiator that is commonly used with Linux operating systems. This chapter describes how to congure the Open-iSCSI module with: SuSE Linux Enterprise Server 10 SP1 (SLES 10 SP1) (x86, x64 and IA64) RedHat Advanced Server 5 (RedHat 5) (x86, x64 and IA64)

SLES 10 SP1 (x86, x64 & IA64)


The following Open-iSCSI module is required: Open-iSCSI 2.0.707-0.19 NOTE: This is the minimum version, newer versions will also be supported as and when they are released.

How to install the Open-ISCSI module


1. Open the Software Management tool from within YaST Control Center. 2. Select and install the open-iscsi module.

How to congure the Open-ISCSI module using the command line


The command line tool for conguring the Open-iSCSI package is iscsiadm. Detailed instructions for iscsiadm can be found in the iscsiadm(8) man documents. The following instructions provide the minimum steps required to connect a Linux host to an HP StorageWorks D2D Backup System. 1. To discover available iSCSI target devices on an HP StorageWorks D2D Backup System type the following, where x.x.x.x is the IP address of the HP StorageWorks D2D Backup System: localhost:~ $ iscsiadm --mode discovery --type sendtargets --portal x.x.x.x The response from the HP StorageWorks D2D Backup System will be two iSCSI Qualied Names (IQN). The rst IQN will correspond to the autoloader robotics and the second will correspond to the autoloader tape drive. For example: [3a034e] x.x.x.x:3260,1 iqn.198603.com.hp:storage.D2DBS.cr20352eeb.4a287d842ad99057. autoloader1.robotics [f173d0] x.x.x.x:3260,1 iqn.198603.com.hp:storage.D2DBS.cr20352eeb.4e13b26a7a4e3a06.autoloader1.drive

D2D Backup System

15

NOTE: Note: If iscsiadm does not return a list of iSCSI targets, ensure that port 3260 is open in any running rewalls. 2. To use the autoloader device, the Linux machine must now log in to each iSCSI target device. This is done using the following two commands, where the IQN value matches those returned by the iscsiadm discovery command above: localhost:~ $ iscsiadm --mode node --targetname iqn.198603.com.hp:storage.D2DBS.cr20352eeb.4a287d842ad99057. autoloader1.robotics --portal x.x.x.x:3260 --login localhost:~ $ iscsiadm --mode node --targetname iqn.198603.com.hp:storage.D2DBS.cr20352eeb.4e13b26a7a4e3a06.autoloader1.drive --portal x.x.x.x:3260 -login 3. To verify that the Linux machine now has access to the autoloader device, use the following command: localhost:~ $ cat /proc/scsi/scsi The output of this command will be a list of all the congured SCSI devices on the system, including the HP StorageWorks D2D Backup System autoloader. An example output would be: Attached devices: Host: scsi9 Channel: 00 Id: 00 Lun: 00 Vendor: HP Model: 1x8 G2 AUTOLDR Rev: kn77 Type: Medium Changer ANSI SCSI revision: 03 Host: scsi11 Channel: 00 Id: 00 Lun: 00 Vendor: HP Model: Ultrium 2-SCSI Rev: kn77 Type: Sequential-Access ANSI SCSI revision: 03 4. To enable the iSCSI target devices to remain persistent across system reboots, the open-iscsi service must be congured to run at system startup. This can be done by issuing the following command: localhost:~ $ chkconfig open-iscsi on 5. To verify that this conguration change has been accepted, use the following command: localhost:~ $ chkconfig -list open-iscsi open-iscsi 0:off 1:off 2:off 3:on 4:off 5:on 6:off 6. In addition the iSCSI nodes must also be congured to log in automatically on system startup. The conguration settings are modied as follows: localhost:~ $ iscsiadm --mode node --targetname iqn.198603.com.hp:storage.D2DBS.cr20352eeb.4a287d842ad99057. autoloader1.robotics --portal x.x.x.x:3260 --op update -name node.conn[0].startup --value automatic localhost:~ $ iscsiadm --mode node --targetname iqn.198603.com.hp:storage.D2DBS.cr20352eeb.4e13b26a7a4e3a06. autoloader1.drive --portal x.x.x.x:3260 --op update -name node.conn[0].startup --value automatic 7. To verify that the Linux machine maintains access to the autoloader device across system reboots, use the following command after a reboot: localhost:~ $ cat /proc/scsi/scsi The output of this command will again be a list of all the congured SCSI devices on the system, including the HP StorageWorks D2D Backup System autoloader.

16

Conguring the iSCSI initiator

How to congure the Open-ISCSI module using the GUI


The Open-iSCSI module can also be congured through the YaST Control Center, by selecting iSCSI Initiator in the menu. You need to know the IP address of the HP StorageWorks D2D Backup System in order to set up an iSCSI connection. If the iSCSI Initiator option is not available within the YaST control Center, it can be added using the Software Management tool within YaST by selecting the yast2-iscsi-client package.

RedHat 5 (x86, x64 & IA64)


One of the following Open-iSCSI modules is required: iscsi-initiator-utils 6.2.0.742-0.6.el5.i386 iscsi-initiator-utils 6.2.0.742-0.6.el5.x86_64 iscsi-initiator-utils 6.2.0.742-0.6.el5.ia64

NOTE: These are the minimum versions, newer versions will also be supported as and when they are released.

How to install the Open-iSCSI module


Use the Package Manager tool to select and install the iscsi-initiator-utils package.

How to congure Open-iSCSI module


The command line tool for conguring the Open-iSCSI package is iscsiadm. Detailed instructions for iscsiadm can be found in the iscsiadm(8) man documents. The following instructions provide the minimum steps required to connect a Linux host to a HP StorageWorks D2D Backup System. 1. To discover available iSCSI target devices on a HP StorageWorks D2D Backup System type the following, where x.x.x.x is the IP address of the HP StorageWorks D2D Backup System: localhost:~ $ iscsiadm --mode discovery --type sendtargets --portal x.x.x.x The response from the HP StorageWorks D2D Backup System will be two iSCSI Qualied Names (IQN). The rst IQN will correspond to the autoloader robotics and the second will correspond to the autoloader tape drive. [3a034e] x.x.x.x:3260,1 iqn.198603.com.hp:storage.D2DBS.cr20352eeb.4a287d842ad99057. autoloader1.robotics [f173d0] x.x.x.x:3260,1 iqn.198603.com.hp:storage.D2DBS.cr20352eeb.4e13b26a7a4e3a06. autoloader1.drive 2. To use the autoloader device, the Linux machine must now log in to each iSCSI target device. This is done using the following two commands, where the IQN value matches those returned by the discovery command above: localhost:~ $ iscsiadm --mode node --targetname iqn.198603.com.hp:storage.D2DBS.cr20352eeb.4a287d842ad99057. autoloader1.robotics --portal x.x.x.x:3260 --login localhost:~ $ iscsiadm --mode node --targetname iqn.198603.com.hp:storage.D2DBS.cr20352eeb.4e13b26a7a4e3a06. autoloader1.drive --portal x.x.x.x:3260 -login

D2D Backup System

17

3. To verify that the Linux machine now has access to the autoloader device, use the following command: localhost:~ $ cat /proc/scsi/scsi The output of this command will be a list of all the congured SCSI devices on the system, including the HP StorageWorks D2D Backup System autoloader. An example output would be: Attached devices: Host: scsi9 Channel: 00 Id: 00 Lun: 00 Vendor: HP Model: 1x8 G2 AUTOLDR Rev: kn77 Type: Medium Changer ANSI SCSI revision: 03 Host: scsi11 Channel: 00 Id: 00 Lun: 00 Vendor: HP Model: Ultrium 2-SCSI Rev: kn77 Type: Sequential-Access ANSI SCSI revision: 03 4. To enable the iSCSI target devices to remain persistent across system reboots, the open-iscsi service must be congured to run at system startup. This can be done by issuing the following command: localhost:~ $ chkconfig iscsi on 5. To verify that this conguration change has been accepted, use the following command: localhost:~ $ chkconfig -list iscsi iscsi 0:off 1:off 2:off 3:on 4:on 5:on 6:off 6. In addition the iSCSI nodes must also be congured to log in automatically on system startup. The conguration settings are modied as follows: localhost:~ $ iscsiadm --mode node --targetname iqn.198603.com.hp:storage.D2DBS.cr20352eeb.4a287d842ad99057. autoloader1.robotics --portal x.x.x.x:3260 --op update -name node.conn[0].startup --value automatic localhost:~ $ iscsiadm --mode node --targetname iqn.198603.com.hp:storage.D2DBS.cr20352eeb.4e13b26a7a4e3a06. autoloader1.drive --portal x.x.x.x:3260 --op update -name node.conn[0].startup --value automatic 7. To verify that the Linux machine maintains access to the autoloader device across system reboots, use the following command after a reboot: localhost:~ $ cat /proc/scsi/scsi The output of this command will again be a list of all the congured SCSI devices on the system, including the HP StorageWorks D2D Backup System autoloader.

18

Conguring the iSCSI initiator

4 Controlling an HP StorageWorks D2D Backup System


The HP StorageWorks D2D Backup System appears to the Linux operating system as a 1x8 G2 autoloader and Ultrium 2 tape drive. The robotics within the autoloader can be controlled from the console using a command called MTX. If the MTX utility is not installed, it can be added using the package manager. The complete MTX manual can also be accessed from any Linux console using the command man mtx. The following examples illustrate of how to complete common tasks with the HP StorageWorks D2D Backup System. Verify you are controlling the correct 1x8 G2 autoloader Review the media Load a cartridge into the tape drive Unload a cartridge from the tape drive Move a cartridge to the mail slot Move a cartridge from the mail slot

Verify you are controlling the correct 1x8 G2 autoloader


The robotics of a 1x8 G2 autoloader will be assigned a generic SCSI device le. Typically the device le name can be determined by running the following command: localhost:~ $ cat /proc/scsi/scsi The output will be similar to this: Attached devices: Host: scsi0 Channel: 00 Id: 00 Lun: 00 Vendor: Compaq Model: BF03688284 Rev: HPB3 Type: Direct-Access ANSI SCSI revision: 03 Host: scsi9 Channel: 00 Id: 00 Lun: 00 Vendor: HP Model: 1x8 G2 AUTOLDR Rev: kn77 Type: Medium Changer ANSI SCSI revision: 03 Host: scsi11 Channel: 00 Id: 00 Lun: 00 Vendor: HP Model: Ultrium 2-SCSI Rev: kn77 Type: Sequential-Access ANSI SCSI revision: 03 These three SCSI devices each have a unique ID starting with 0 (zero) for the rst device, 1 for the second and 2 for the third, therefore giving this 1x8 G2 autoloader an ID of 1. Concatenating the ID of the 1x8 G2 autoloader to the generic SCSI device le (sg), gives a device le name of sg1. The 1x8 G2 autoloader can therefore be accessed using the device le /dev/sg1.

To verify the device le for the autoloader


To verify the correct device le has been determined, the following command should be used: localhost:~ $ mtx f /dev/sg1 inquiry The output for a 1x8 G2 autoloader should be: Product Type: Medium Changer Vendor ID: HP Product ID: 1x8 G2 AUTOLDR

D2D Backup System

19

Revision: kn77 Attached Changer:

No

If the details of a different device are displayed, try changing the ID of the generic SCSI device le. ( This is not a common occurrence.)

To verify the tape device le for the tape drive


The tape drive of the 1x8 G2 autoloader will also be assigned a device le in the same way as the robotics. In the example above this would be /dev/sg2. In addition the tape drive will also be assigned a SCSI tape device le. Typically the rst tape device attached to Linux system is given the tape device le of /dev/st0. To verify the tape device le for the tape drive, the MT command should be used: localhost:~ $ mt f /dev/st0 status The output should be: mt: /dev/st0 : No medium found This indicates that the tape device le is valid but no media is loaded into the drive.

Reviewing the media in a 1x8 G2 autoloader


To verify the contents of the media slots within a 1x8 G2 autoloader, the following command should be used: localhost:~ $ mtx f /dev/sg1 status The output for a 1x8 G2 autoloader with 8 cartridges congured would look similar to this: Storage Changer /dev/sg1:1 Drives, 9 Slots ( 1 Import/Export ) Data Transfer Element 0:Empty Storage Element 1:Full :VolumeTag=64258F41 Storage Element 2:Full :VolumeTag=64258F42 Storage Element 3:Full :VolumeTag=64258F43 Storage Element 4:Full :VolumeTag=64258F44 Storage Element 5:Full :VolumeTag=64258F45 Storage Element 6:Empty Storage Element 7:Empty Storage Element 8:Empty Storage Element 9 IMPORT/EXPORT:Empty The data transfer element is the Ultrium tape drive within the 1x8 G2 autoloader. Storage elements 1 to 8 refer to the 8 congured slots within the 1x8 G2 autoloader. Storage element 9 refers to the import/export slot of the 1x8 G2 autoloader, also known as the Mail Slot in the HP StorageWorks D2D Backup System Web Management Interface. In the example above, slots 1 to 5 contain media and slots 6 to 8 are empty. The default autoloader created by a HP StorageWorks D2D Backup System will have blank cartridges in all 8 storage slots.

Loading a cartridge into the 1x8 G2 autoloader tape drive


To load a cartridge into the tape drive, the mtx load command should be used. For example, to move a cartridge from slot 2 to the drive the command would be: localhost:~ $ mtx f /dev/sg1 load 2

Unloading a cartridge from the 1x8 G2 autoloader tape drive


To unload a cartridge from the tape drive and return it to its original storage slot, the mtx unload command should be used:

20

Controlling an HP StorageWorks D2D Backup System

localhost:~ $ mtx f /dev/sg1 unload To unload a cartridge and place it in a different storage slot, the mtx unload command may be passed an additional slot number. For example, to unload a cartridge and place it in to storage slot 7, the command would be: localhost:~ $ mtx f /dev/sg1 unload 7

Moving a cartridge to the Mail Slot


To move a cartridge to the mail slot for exporting to an attached tape drive, the mtx command transfer should be used. For example, to move the cartridge in slot 1 to the mail slot 9, the following command should be used: localhost:~ $ mtx f /dev/sg1 transfer 1 9

Moving a cartridge from the Mail Slot


To move a cartridge from the mail slot following an import from an attached tape drive, the mtx command should be: localhost:~ $ mtx f /dev/sg1 transfer 9 1 NOTE: If more than 8 storage slots have been congured for the 1x8 G2 autoloader then the ID of the mail slot will change. The ID of the mail slot will be equal to the number of storage slots plus 1. Therefore, a 1x8 G2 autoloader with 16 storage slots will have a mail slot with an ID of 17.

NOTE: It is not possible to move a cartridge directly from a mail slot to the tape drive. You must rst move the cartridge to a storage slot and then move it to the tape drive.

D2D Backup System

21

22

Controlling an HP StorageWorks D2D Backup System

5 Backup and restore les using TAR


Introduction
This section describes how to perform a simple backup and recovery of les to an HP StorageWorks D2D Backup System using the console applications; MTX and TAR. In the examples, the autoloader robotics is controlled using generic SCSI device le sg1 and the autoloader tape drive uses tape device le st0. The le to be backed up and restored is the Linux kernel.

Back up the Linux kernel


1. Check to see what media is available. localhost:~ $ mtx f /dev/sg1 status Storage Changer /dev/sg1:1 Drives, 9 Slots ( 1 Import/Export ) Data Transfer Element 0:Empty Storage Element 1:Full :VolumeTag=64258F41 Storage Element 2:Full :VolumeTag=64258F42 Storage Element 3:Full :VolumeTag=64258F43 Storage Element 4:Full :VolumeTag=64258F44 Storage Element 5:Full :VolumeTag=64258F45 Storage Element 6:Empty Storage Element 7:Empty Storage Element 8:Empty Storage Element 9 IMPORT/EXPORT:Empty 2. Move the cartridge from slot 1 to the tape drive. localhost:~ $ mtx f /dev/sg1 load 1 3. Ensure you are in the root directory. localhost:~ $ cd / 4. Back up the Linux kernel using tar. localhost:~ $ tar cvf /dev/st0 ./boot/vmlinux* 5. Move the cartridge back to slot 1. localhost:~ $ mtx f /dev/sg1 unload

Restore the Linux kernel


1. Move the cartridge from slot 1 to the tape drive. localhost:~ $ mtx f /dev/sg1 load 1 2. Create a temporary folder to restore the backup into. localhost:~ $ mkdir temp localhost:~ $ cd /temp 3. Restore the Linux kernel to the temporary folder. localhost:~ $ tar xvf /dev/st0

D2D Backup System

23

4. Move the cartridge back to slot 1. localhost:~ $ mtx f /dev/sg1 unload 5. Compare the original Linux kernel with the restored Linux kernel. localhost:~ $ cmp /boot/vmlinux* /temp/boot/vmlinux* If no differences are found between the two les, no message will be displayed.

24

Backup and restore les using TAR

Anda mungkin juga menyukai