175 lines
10 KiB
HTML
175 lines
10 KiB
HTML
|
<?xml version="1.0" encoding="UTF-8"?>
|
||
|
<!DOCTYPE html
|
||
|
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||
|
<html lang="en-us" xml:lang="en-us">
|
||
|
<head>
|
||
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||
|
<meta name="security" content="public" />
|
||
|
<meta name="Robots" content="index,follow" />
|
||
|
<meta http-equiv="PICS-Label" content='(PICS-1.1 "http://www.icra.org/ratingsv02.html" l gen true r (cz 1 lz 1 nz 1 oz 1 vz 1) "http://www.rsac.org/ratingsv01.html" l gen true r (n 0 s 0 v 0 l 0) "http://www.classify.org/safesurf/" l gen true r (SS~~000 1))' />
|
||
|
<meta name="DC.Type" content="topic" />
|
||
|
<meta name="DC.Title" content="Save and restore hosted Linux files to and from the host's shared tape drive" />
|
||
|
<meta name="abstract" content="To save hosted Linux data to a shared tape drive and restore the data from the tape drive, you can use either the Linux tar command or the i5/OS Save Object (SAV) and Restore Object (RST) commands." />
|
||
|
<meta name="description" content="To save hosted Linux data to a shared tape drive and restore the data from the tape drive, you can use either the Linux tar command or the i5/OS Save Object (SAV) and Restore Object (RST) commands." />
|
||
|
<meta name="copyright" content="(C) Copyright IBM Corporation 1998, 2006" />
|
||
|
<meta name="DC.Rights.Owner" content="(C) Copyright IBM Corporation 1998, 2006" />
|
||
|
<meta name="DC.Format" content="XHTML" />
|
||
|
<meta name="DC.Identifier" content="rzalmsaverestore" />
|
||
|
<meta name="DC.Language" content="en-us" />
|
||
|
<!-- All rights reserved. Licensed Materials Property of IBM -->
|
||
|
<!-- US Government Users Restricted Rights -->
|
||
|
<!-- Use, duplication or disclosure restricted by -->
|
||
|
<!-- GSA ADP Schedule Contract with IBM Corp. -->
|
||
|
<link rel="stylesheet" type="text/css" href="./ibmdita.css" />
|
||
|
<link rel="stylesheet" type="text/css" href="./ic.css" />
|
||
|
<title>Save and restore hosted Linux files to and from the host's shared tape
|
||
|
drive</title>
|
||
|
</head>
|
||
|
<body id="rzalmsaverestore"><a name="rzalmsaverestore"><!-- --></a>
|
||
|
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
|
||
|
<h1 class="topictitle1">Save and restore hosted Linux files to and from the host's shared tape
|
||
|
drive</h1>
|
||
|
<div><p>To save hosted Linux data to a shared tape drive and restore the
|
||
|
data from the tape drive, you can use either the Linux tar command or the i5/OS<sup>®</sup> Save
|
||
|
Object (SAV) and Restore Object (RST) commands.</p>
|
||
|
<p>If you use tar to save data, the only way you can restore that data is
|
||
|
by using tar again. Similarly, if you use SAV to save data, the only way you
|
||
|
can restore that data is by using RST. The two methods of backing up and restoring
|
||
|
data are not compatible.</p>
|
||
|
<p>The following restrictions apply:</p>
|
||
|
<ul><li>The names of the tape drives in <span>RedHat</span> and <span>Suse</span> are stored in /dev/iseries/vt0,
|
||
|
vt1, etc. <span>TurboLinux</span> has its
|
||
|
own naming convention.</li>
|
||
|
<li>To use the tape device from Linux, you must vary the tape off under i5/OS.
|
||
|
To use the i5/OS SAV
|
||
|
or RST command to save or restore the NWSD, Linux must be inactive (that is,
|
||
|
the NWSD must be varied off).</li>
|
||
|
<li>Saving the storage space is typically much faster than saving using tar,
|
||
|
but it does not provide file-level backup and recovery.</li>
|
||
|
<li>Linux does not support switching tapes in a library device. You can only
|
||
|
use the tape that is currently in the device.</li>
|
||
|
<li>You cannot save i5/OS data and tar data on the same tape volume.</li>
|
||
|
</ul>
|
||
|
<div class="section"><h4 class="sectiontitle">Save and restore hosted Linux files by using Linux tar</h4><p>Backups
|
||
|
using Linux tar are file-level backups. They save only the files and directories
|
||
|
that the tar command specifies. Therefore, you cannot use tar to save Linux
|
||
|
data that is not in the fileserver. For example, you cannot save a kernel
|
||
|
residing in the PReP start partition by using the tar command.</p>
|
||
|
</div>
|
||
|
<div class="section"><h4 class="sectiontitle">Save files by using Linux tar</h4><p>The Linux command
|
||
|
to save hosted Linux files to the host's shared tape drive is the following:</p>
|
||
|
<blockquote><pre>tar -b 40 -c -f /dev/iseries/vt0 files</pre>
|
||
|
</blockquote>
|
||
|
<p>where</p>
|
||
|
|
||
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" frame="void" border="1" rules="all"><tbody><tr><td valign="top" width="16.666666666666664%">tar</td>
|
||
|
<td valign="top" width="83.33333333333334%">= command name (contraction of "tape archive")</td>
|
||
|
</tr>
|
||
|
<tr><td valign="top" width="16.666666666666664%">-b 40</td>
|
||
|
<td valign="top" width="83.33333333333334%">= block size in sectors</td>
|
||
|
</tr>
|
||
|
<tr><td valign="top" width="16.666666666666664%">-c</td>
|
||
|
<td valign="top" width="83.33333333333334%">= command action (create) </td>
|
||
|
</tr>
|
||
|
<tr><td valign="top" width="16.666666666666664%">-f /dev/iseries/vt0</td>
|
||
|
<td valign="top" width="83.33333333333334%">= virtual tape device and number</td>
|
||
|
</tr>
|
||
|
<tr><td valign="top" width="16.666666666666664%">files</td>
|
||
|
<td valign="top" width="83.33333333333334%">= names of files to be saved</td>
|
||
|
</tr>
|
||
|
</tbody>
|
||
|
</table>
|
||
|
</div>
|
||
|
<p>Linux normally treats tape as a "character device" that it can
|
||
|
quickly read from or write to in long streams of data, but cannot quickly
|
||
|
access to find specific data. By contrast, Linux treats a disk or CD as a
|
||
|
"block device" that it can read from or write to quickly at any point on the
|
||
|
device, making it suitable for the mount command. The -b 40 argument specifies
|
||
|
that Linux should write the archive stream in blocks of 40 sectors (20 kilobytes).
|
||
|
If you do not specify a value for this argument, the default value is 20 sectors
|
||
|
(10 kilobytes), which does not perform as well over virtual tape as a value
|
||
|
of 40 does.</p>
|
||
|
<p>The -c argument specifies that the tar command creates a
|
||
|
new archive or overwrites an old one (as opposed to restoring files from an
|
||
|
archive or adding individual files to an existing archive).</p>
|
||
|
<p>The -f /dev/iseries/vt0
|
||
|
argument specifies that the command uses virtual tape 0 on the <span>iSeries™</span> server.
|
||
|
After the tar command runs, Linux closes the tape device and rewinds the tape.
|
||
|
If you want to save more than one archive on the tape, you must keep the tape
|
||
|
from rewinding after each use, and you must position the tape to the next
|
||
|
file marker. To do this, specify the nvt0 (nonrewinding virtual tape) device
|
||
|
instead of vt0.</p>
|
||
|
<p>The files argument specifies the names of the files
|
||
|
and directories that you want to save.</p>
|
||
|
</div>
|
||
|
<div class="section"><h4 class="sectiontitle">Restore files by using Linux tar</h4><p>The Linux command
|
||
|
to restore hosted Linux files from the host's shared tape drive is the following:</p>
|
||
|
<blockquote><pre>tar -b 40 -x -f /dev/iseries/vt0 files</pre>
|
||
|
</blockquote>
|
||
|
<p>where the -x (extract) argument replaces the -c (create) argument
|
||
|
in the tar command used to save files to tape.</p>
|
||
|
</div>
|
||
|
<div class="section"><h4 class="sectiontitle">Save and restore hosted Linux data by using i5/OS SAV and
|
||
|
RST</h4><p>Backups of hosted Linux data from i5/OS are drive-level. This means that
|
||
|
Linux backs up the entire contents of a virtual disk or network storage space,
|
||
|
rather than individual Linux files. Thus, the correct SAV command backs up
|
||
|
any information on the drive, including a kernel in the PReP start partition.</p>
|
||
|
</div>
|
||
|
<div class="section"><h4 class="sectiontitle">Save Linux hosted data by using i5/OS SAV</h4><p>On i5/OS your
|
||
|
data is in a network server storage space. The i5/OS commands to save hosted Linux files
|
||
|
to the host's shared tape drive include the following:</p>
|
||
|
<ol><li>Save Object (SAV), where you save the network server storage space to
|
||
|
the save file. On the Save Object display, enter the following parameter values:<ul><li>In the Device field, enter the associated i5/OS device description. For example,
|
||
|
if your tape device is named TAP01, enter <kbd class="userinput">/qsys.lib/tap01.devd</kbd>.
|
||
|
To save to a save file in a library like QGPL, enter <kbd class="userinput">/qsys.lib/qgpl.lib/myfile.file</kbd>.</li>
|
||
|
<li>In the Objects: Name field, enter the IFS location of the network server
|
||
|
storage space. For example, if your network server storage space is named
|
||
|
TEST1, enter <kbd class="userinput">/qfpnwsstg/test1</kbd>.</li>
|
||
|
</ul>
|
||
|
</li>
|
||
|
<li>Display Saved Objects - Save File (DSPSAVF) to verify that the changed
|
||
|
save file exists. In the Option field to left of the new save file name, enter <kbd class="userinput">5=Display</kbd> objects
|
||
|
in subdirectory. You see a list of the stream files in the save file.</li>
|
||
|
</ol>
|
||
|
</div>
|
||
|
<div class="section"><h4 class="sectiontitle">Restore Linux hosted data by using i5/OS RST</h4><p>The i5/OS command
|
||
|
to restore hosted Linux files from the host's shared tape drive is Restore
|
||
|
Object (RST). On the Restore Object display, enter the following parameter
|
||
|
values:</p>
|
||
|
<ul><li>To restore from a real tape device, enter the associated i5/OS device
|
||
|
description in the Device field. For example, if your tape device is named
|
||
|
TAP01, enter <kbd class="userinput">/qsys.lib/tap01.devd</kbd>. To restore from
|
||
|
a save file in a library like QGPL, enter <kbd class="userinput">/qsys.lib/qgpl.lib/myfile.file</kbd>.</li>
|
||
|
<li>In the Objects: Name field, enter the IFS location of the network server
|
||
|
storage space, for example, /qfpnwsstg/test1.</li>
|
||
|
</ul>
|
||
|
</div>
|
||
|
<div class="section"><h4 class="sectiontitle">Troubleshooting Linux virtual tape</h4><p>If errors occur
|
||
|
while you access Linux virtual tape, examine the file /proc/iSeries/viotape.
|
||
|
It describes the mapping between i5/OS device names and Linux device names
|
||
|
and records the last error for each tape device. Common errors and recovery
|
||
|
scenarios include the following:</p>
|
||
|
<blockquote><dl><dt class="dlterm">Device unavailable</dt>
|
||
|
<dd>Make sure the device is varied off under i5/OS.</dd>
|
||
|
</dl>
|
||
|
<dl><dt class="dlterm">Not ready</dt>
|
||
|
<dd>Retry the operation. If the operation still fails with the same description
|
||
|
in /proc/iSeries/viotape, verify that the correct medium is in the tape drive.</dd>
|
||
|
</dl>
|
||
|
<dl><dt class="dlterm">Load failure or Cleaning cartridge found</dt>
|
||
|
<dd>Verify that the correct medium is in the tape drive.</dd>
|
||
|
</dl>
|
||
|
<dl><dt class="dlterm">Data check or Equipment check</dt>
|
||
|
<dd>Verify that you are using a supported block size to read or write the
|
||
|
tape. All known IBM-supported tape devices can use a block size of 20 kilobytes
|
||
|
(supplied by the -b 40 argument to tar).</dd>
|
||
|
</dl>
|
||
|
<dl><dt class="dlterm">Internal error</dt>
|
||
|
<dd>Contact your service representative.</dd>
|
||
|
</dl>
|
||
|
</blockquote>
|
||
|
</div>
|
||
|
</div>
|
||
|
|
||
|
</body>
|
||
|
</html>
|