linux configuration guide

24
HP StorageWorks D2D Backup System Linux Conguration Guide Part number: EH880–90927 Edition 1.0 edition: July 2007

Upload: sharepoint88

Post on 12-Mar-2015

108 views

Category:

Documents


3 download

TRANSCRIPT

Page 1: Linux Configuration Guide

HP StorageWorks

D2D Backup System

Linux Configuration Guide

Part number: EH880–90927Edition 1.0 edition: July 2007

Page 2: Linux Configuration Guide

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 forthin the express warranty statements accompanying such products and services. Nothing herein should be construed as constitutingan 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 itssubsidiaries 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

Page 3: Linux Configuration Guide

Contents

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

1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . 9Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9Hardware installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9Software requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9Configuration stages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9

2 Discovery . . . . . . . . . . . . . . . . . . . . . . . . . . . 11Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11Using DHCP to discover the HP D2D Backup System . . . . . . . . . . . . . . . . . . . . . . 11Using the HP Discovery tool . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11

To identify the required device . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12To configure the network settings of a device . . . . . . . . . . . . . . . . . . . . . . . . 12

3 Configuring the iSCSI initiator . . . . . . . . . . . . . . . . . . . 15Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15SLES 10 SP1 (x86, x64 & IA64) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15

How to install the Open-ISCSI module . . . . . . . . . . . . . . . . . . . . . . . . . . . 15How to configure the Open-ISCSI module using the command line . . . . . . . . . . . . . . 15How to configure the Open-ISCSI module using the GUI . . . . . . . . . . . . . . . . . . . 17

RedHat 5 (x86, x64 & IA64) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17How to install the Open-iSCSI module . . . . . . . . . . . . . . . . . . . . . . . . . . 17How to configure Open-iSCSI module . . . . . . . . . . . . . . . . . . . . . . . . . . . 17

4 Controlling an HP StorageWorks D2D Backup System . . . . . . . . . 19Verify you are controlling the correct 1x8 G2 autoloader . . . . . . . . . . . . . . . . . . . . 19

To verify the device file for the autoloader . . . . . . . . . . . . . . . . . . . . . . . . . 19To verify the tape device file for the tape drive . . . . . . . . . . . . . . . . . . . . . . . 20

Reviewing the media in a 1x8 G2 autoloader . . . . . . . . . . . . . . . . . . . . . . . . . 20Loading a cartridge into the 1x8 G2 autoloader tape drive . . . . . . . . . . . . . . . . . . . 20Unloading a cartridge from the 1x8 G2 autoloader tape drive . . . . . . . . . . . . . . . . . . 20Moving a cartridge to the Mail Slot . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21Moving a cartridge from the Mail Slot . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21

5 Backup and restore files using TAR . . . . . . . . . . . . . . . . . 23Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23Back up the Linux kernel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23Restore the Linux kernel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23

D2D Backup System 3

Page 4: Linux Configuration Guide

Tables1 ..Document conventions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5

4

Page 5: Linux Configuration Guide

About this guide

This guide provides information about:

• Configuring Linux for use with the HP D2D Backup System• Controlling an HP D2D Backup System

Intended audienceThis guide is intended for network administrators and users with knowledge of:

• Ethernet networks• Linux

Related documentationThe 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 find 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 symbolsTable 1 Document conventions

Convention Element

Blue text: Table 1 Cross-reference links and e-mail addresses

Blue, underlined text: http://www.hp.com website addresses

Bold text • 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

Italic text Text emphasis

Monospace text • File and directory names• System output• Code• Commands, their arguments, and argument values

Monospace, italic text • Code variables• Command variables

Monospace, bold text Emphasized monospace text

D2D Backup System 5

Page 6: Linux Configuration Guide

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 specific instructions.

NOTE:Provides additional information.

TIP:Provides helpful hints and shortcuts.

HP technical supportFor 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 repairHP customer self repair (CSR) programs allow you to repair your StorageWorks product. If a CSRpart 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 repaircan be accomplished by CSR.

For more information about CSR, contact your local service provider. For North America, see the CSRwebsite:

http://www.hp.com/go/selfrepair

Product warrantiesFor information about HP StorageWorks product warranties, see the warranty information website:

http://www.hp.com/go/storagewarranty

6 About this guide

Page 7: Linux Configuration Guide

Subscription serviceHP recommends that you register your product at the Subscriber’s Choice for Business website:

http://www.hp.com/go/e-updates

After registering, you will receive e-mail notification of product enhancements, new driver versions,firmware updates, and other product resources.

HP websitesFor 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 feedbackHP welcomes your feedback.

To make comments and suggestions about product documentation, please send a message [email protected]. All submissions become the property of HP.

D2D Backup System 7

Page 8: Linux Configuration Guide

8 About this guide

Page 9: Linux Configuration Guide

1 Introduction

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

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

Software requirements1. Refer to http://www.hp.com/go/connect to find 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.

Configuration stagesThere are two stages to configuration:• 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 configuration to get started

This guide describes how to perform these two stages.

D2D Backup System 9

Page 10: Linux Configuration Guide

10 Introduction

Page 11: Linux Configuration Guide

2 Discovery

OverviewThe HP StorageWorks D2D Backup System must be assigned an IP address before an iSCSI connectioncan be made to it.• If the network has a DHCP server, the HP StorageWorks D2D Backup System will be configured

automatically with an IP address• If no DHCP server is available, the HP StorageWorks D2D Backup System must be configured

manually using the HP Discovery tool, provided on the HP StorageWorks CD-ROM

Using DHCP to discover the HP D2D Backup SystemThe IP address and other network settings are assigned automatically when you connect the HP D2DBackup System to the network. You only need to know the serial number of the HP D2D Backup Systemto complete the installation and create an 8–slot autoloader configuration. The serial number can befound 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 aboutrecommended web browser settings.

• Check that the network light is on, on the front of the HP StorageWorks D2D Backup System as thisindicates an IP address has been configured.

• Try connecting to the HP StorageWorks D2D Backup System using the DHCP assigned IP addressinstead.

Using the HP Discovery toolThe HP Discovery tool is a java application for configuring HP StorageWorks D2D Backup Systems. Thetool can be run from HP StorageWorks CD-ROM by selecting HPdiscovery.sh in the Linux folder or bylaunching 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 theLinux package manager or by visiting http://java.sun.com

When the HP Discovery tool is run it will find any HP StorageWorks D2D Backup Systems on the localnetwork and list them by name. The name displayed by the HP Discovery tool should match the label onthe front of the HP StorageWorks D2D Backup System.

D2D Backup System 11

Page 12: Linux Configuration Guide

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

To identify the required deviceIf you have multiple HP StorageWorks D2D Backup Systems on the network you can use the Beaconbutton to help identify the unit that you wish to configure. Select a device in the list and click Beacon. Thelights on the front of the selected HP StorageWorks D2D Backup System will flash.

To configure the network settings of a device1. Select the device in the list and click Configure.

12 Discovery

Page 13: Linux Configuration Guide

2. Enter the network details and click Configure to send the details to the HP StorageWorks D2DBackup System. The list of available HP StorageWorks D2D Backup System on the network will bedisplayed 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 berequired during iSCSI configuration.

D2D Backup System 13

Page 14: Linux Configuration Guide

14 Discovery

Page 15: Linux Configuration Guide

3 Configuring the iSCSI initiator

OverviewThe HP D2D Backup System is an iSCSI device. This means that the HP D2D Backup System plugs directlyinto your network, but it presents devices as directly-attached SCSI autoloaders to host machines. Inorder 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 configure 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 module1. Open the Software Management tool from within YaST Control Center.

2. Select and install the open-iscsi module.

How to configure the Open-ISCSI module using the command lineThe command line tool for configuring the Open-iSCSI package is iscsiadm. Detailed instructions foriscsiadm can be found in the iscsiadm(8) man documents. The following instructions provide theminimum 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 thefollowing, where x.x.x.x is the IP address of the HP StorageWorks D2D Backup System:

localhost:~ $ iscsiadm --mode discovery --type sendtargets --portalx.x.x.x

The response from the HP StorageWorks D2D Backup System will be two iSCSI Qualified Names(IQN). The first IQN will correspond to the autoloader robotics and the second will correspond to theautoloader tape drive. For example:

[3a034e] x.x.x.x:3260,1 iqn.1986-03.com.hp:storage.D2DBS.cr20352eeb.4a287d842ad99057.autoloader1.robotics[f173d0] x.x.x.x:3260,1 iqn.1986-03.com.hp:storage.D2DBS.cr20352eeb.4e13b26a7a4e3a06.autoloader1.drive

D2D Backup System 15

Page 16: Linux Configuration Guide

NOTE:Note: If iscsiadm does not return a list of iSCSI targets, ensure that port 3260 is openin any running firewalls.

2. To use the autoloader device, the Linux machine must now log in to each iSCSI target device. Thisis done using the following two commands, where the IQN value matches those returned by theiscsiadm discovery command above:

localhost:~ $ iscsiadm --mode node --targetname iqn.1986-03.com.hp:storage.D2DBS.cr20352eeb.4a287d842ad99057.autoloader1.robotics --portal x.x.x.x:3260 --login

localhost:~ $ iscsiadm --mode node --targetname iqn.1986-03.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 configured SCSI devices on the system, includingthe 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 RRev: kn77Type: Medium Changer ANSI SCSI revision: 03

Host: scsi11 Channel: 00 Id: 00 Lun: 00Vendor: HP Model: Ultrium 2-SCSI Rev: kn77Type: Sequential-Access ANSI SCSI revision: 03

4. To enable the iSCSI target devices to remain persistent across system reboots, the open-iscsi servicemust be configured to run at system startup. This can be done by issuing the following command:

localhost:~ $ chkconfig open-iscsi on

5. To verify that this configuration change has been accepted, use the following command:

localhost:~ $ chkconfig –-list open-iscsiopen-iscsi 0:off 1:off 2:off 3:on 4:off 5:on 6:off

6. In addition the iSCSI nodes must also be configured to log in automatically on system startup. Theconfiguration settings are modified as follows:

localhost:~ $ iscsiadm --mode node --targetname iqn.1986-03.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.1986-03.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, usethe following command after a reboot:

localhost:~ $ cat /proc/scsi/scsi

The output of this command will again be a list of all the configured SCSI devices on the system,including the HP StorageWorks D2D Backup System autoloader.

16 Configuring the iSCSI initiator

Page 17: Linux Configuration Guide

How to configure the Open-ISCSI module using the GUIThe Open-iSCSI module can also be configured through the YaST Control Center, by selecting iSCSIInitiator in the menu. You need to know the IP address of the HP StorageWorks D2D Backup System inorder to set up an iSCSI connection.

If the iSCSI Initiator option is not available within the YaST control Center, it can be added using theSoftware 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 moduleUse the Package Manager tool to select and install the iscsi-initiator-utils package.

How to configure Open-iSCSI moduleThe command line tool for configuring the Open-iSCSI package is iscsiadm. Detailed instructions foriscsiadm can be found in the iscsiadm(8) man documents. The following instructions provide theminimum 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 thefollowing, where x.x.x.x is the IP address of the HP StorageWorks D2D Backup System:

localhost:~ $ iscsiadm --mode discovery --type sendtargets --portalx.x.x.x

The response from the HP StorageWorks D2D Backup System will be two iSCSI Qualified Names(IQN). The first IQN will correspond to the autoloader robotics and the second will correspond tothe autoloader tape drive.

[3a034e] x.x.x.x:3260,1 iqn.1986-03.com.hp:storage.D2DBS.cr20352eeb.4a287d842ad99057.autoloader1.robotics[f173d0] x.x.x.x:3260,1 iqn.1986-03.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. Thisis done using the following two commands, where the IQN value matches those returned by thediscovery command above:

localhost:~ $ iscsiadm --mode node --targetname iqn.1986-03.com.hp:storage.D2DBS.cr20352eeb.4a287d842ad99057.autoloader1.robotics --portal x.x.x.x:3260 --login

localhost:~ $ iscsiadm --mode node --targetname iqn.1986-03.com.hp:storage.D2DBS.cr20352eeb.4e13b26a7a4e3a06.autoloader1.drive --portal x.x.x.x:3260 –-login

D2D Backup System 17

Page 18: Linux Configuration Guide

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 configured SCSI devices on the system, includingthe 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: kn77Type: Medium Changer ANSI SCSI revision: 03

Host: scsi11 Channel: 00 Id: 00 Lun: 00Vendor: HP Model: Ultrium 2-SCSI Rev: kn77Type: Sequential-Access ANSI SCSI revision: 03

4. To enable the iSCSI target devices to remain persistent across system reboots, the open-iscsi servicemust be configured to run at system startup. This can be done by issuing the following command:

localhost:~ $ chkconfig iscsi on

5. To verify that this configuration change has been accepted, use the following command:

localhost:~ $ chkconfig –-list iscsiiscsi 0:off 1:off 2:off 3:on 4:on 5:on 6:off

6. In addition the iSCSI nodes must also be configured to log in automatically on system startup. Theconfiguration settings are modified as follows:

localhost:~ $ iscsiadm --mode node --targetname iqn.1986-03.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.1986-03.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, usethe following command after a reboot:

localhost:~ $ cat /proc/scsi/scsi

The output of this command will again be a list of all the configured SCSI devices on the system,including the HP StorageWorks D2D Backup System autoloader.

18 Configuring the iSCSI initiator

Page 19: Linux Configuration Guide

4 Controlling an HP StorageWorksD2D Backup System

The HP StorageWorks D2D Backup System appears to the Linux operating system as a 1x8 G2 autoloaderand Ultrium 2 tape drive. The robotics within the autoloader can be controlled from the console using acommand 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 D2DBackup 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 autoloaderThe robotics of a 1x8 G2 autoloader will be assigned a generic SCSI device file. Typically the devicefile 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: HPB3Type: Direct-Access ANSI SCSI revision: 03

Host: scsi9 Channel: 00 Id: 00 Lun: 00Vendor: HP Model: 1x8 G2 AUTOLDR Rev: kn77Type: Medium Changer ANSI SCSI revision: 03

Host: scsi11 Channel: 00 Id: 00 Lun: 00Vendor: HP Model: Ultrium 2-SCSI Rev: kn77Type: Sequential-Access ANSI SCSI revision: 03

These three SCSI devices each have a unique ID starting with 0 (zero) for the first device, 1 for the secondand 2 for the third, therefore giving this 1x8 G2 autoloader an ID of 1. Concatenating the ID of the1x8 G2 autoloader to the generic SCSI device file (sg), gives a device file name of sg1. The 1x8 G2autoloader can therefore be accessed using the device file /dev/sg1.

To verify the device file for the autoloaderTo verify the correct device file 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 ChangerVendor ID: ‘HP ‘Product ID: ‘1x8 G2 AUTOLDR ‘

D2D Backup System 19

Page 20: Linux Configuration Guide

Revision: ‘kn77’Attached Changer: No

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

To verify the tape device file for the tape driveThe tape drive of the 1x8 G2 autoloader will also be assigned a device file in the same way as therobotics. In the example above this would be /dev/sg2. In addition the tape drive will also be assigneda SCSI tape device file. Typically the first tape device attached to Linux system is given the tape devicefile of /dev/st0.

To verify the tape device file 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 file is valid but no media is loaded into the drive.

Reviewing the media in a 1x8 G2 autoloaderTo verify the contents of the media slots within a 1x8 G2 autoloader, the following command should beused:

localhost:~ $ mtx –f /dev/sg1 status

The output for a 1x8 G2 autoloader with 8 cartridges configured 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=64258F41Storage Element 2:Full :VolumeTag=64258F42Storage Element 3:Full :VolumeTag=64258F43Storage Element 4:Full :VolumeTag=64258F44Storage Element 5:Full :VolumeTag=64258F45Storage Element 6:EmptyStorage Element 7:EmptyStorage Element 8:EmptyStorage Element 9 IMPORT/EXPORT:Empty

The data transfer element is the Ultrium tape drive within the 1x8 G2 autoloader. Storage elements 1to 8 refer to the 8 configured slots within the 1x8 G2 autoloader. Storage element 9 refers to theimport/export slot of the 1x8 G2 autoloader, also known as the Mail Slot in the HP StorageWorksD2D Backup System Web Management Interface.

In the example above, slots 1 to 5 contain media and slots 6 to 8 are empty. The default autoloadercreated 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 driveTo load a cartridge into the tape drive, the mtx load command should be used. For example, to movea 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 driveTo unload a cartridge from the tape drive and return it to its original storage slot, the mtx unloadcommand should be used:

20 Controlling an HP StorageWorks D2D Backup System

Page 21: Linux Configuration Guide

localhost:~ $ mtx –f /dev/sg1 unload

To unload a cartridge and place it in a different storage slot, the mtx unload command may bepassed an additional slot number. For example, to unload a cartridge and place it in to storage slot7, the command would be:

localhost:~ $ mtx –f /dev/sg1 unload 7

Moving a cartridge to the Mail SlotTo move a cartridge to the mail slot for exporting to an attached tape drive, the mtx command transfershould be used. For example, to move the cartridge in slot 1 to the mail slot 9, the following commandshould be used:

localhost:~ $ mtx –f /dev/sg1 transfer 1 9

Moving a cartridge from the Mail SlotTo move a cartridge from the mail slot following an import from an attached tape drive, the mtxcommand should be:

localhost:~ $ mtx –f /dev/sg1 transfer 9 1

NOTE:If more than 8 storage slots have been configured for the 1x8 G2 autoloader then the ID of the mail slotwill change. The ID of the mail slot will be equal to the number of storage slots plus 1. Therefore, a 1x8G2 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 first move thecartridge to a storage slot and then move it to the tape drive.

D2D Backup System 21

Page 22: Linux Configuration Guide

22 Controlling an HP StorageWorks D2D Backup System

Page 23: Linux Configuration Guide

5 Backup and restore files usingTAR

IntroductionThis section describes how to perform a simple backup and recovery of files to an HP StorageWorks D2DBackup System using the console applications; MTX and TAR. In the examples, the autoloader robotics iscontrolled using generic SCSI device file sg1 and the autoloader tape drive uses tape device file st0.The file to be backed up and restored is the Linux kernel.

Back up the Linux kernel1. 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=64258F41Storage Element 2:Full :VolumeTag=64258F42Storage Element 3:Full :VolumeTag=64258F43Storage Element 4:Full :VolumeTag=64258F44Storage Element 5:Full :VolumeTag=64258F45Storage Element 6:EmptyStorage Element 7:EmptyStorage Element 8:EmptyStorage 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 kernel1. 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 templocalhost:~ $ cd /temp

3. Restore the Linux kernel to the temporary folder.

localhost:~ $ tar xvf /dev/st0

D2D Backup System 23

Page 24: Linux Configuration Guide

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 files, no message will be displayed.

24 Backup and restore files using TAR