[BACK]Return to xfs_copy.html CVS log [TXT][DIR] Up to [Development] / xfs-website.orig / manpages

File: [Development] / xfs-website.orig / manpages / xfs_copy.html (download) (as text)

Revision 1.4, Thu Jan 25 19:55:30 2001 UTC (16 years, 9 months ago) by xfs
Branch: MAIN
CVS Tags: HEAD
Changes since 1.3: +27 -21 lines

Man pages update.

<html>
<head>
<meta name="Content-Style" content="text/css">
</head>
<body>
<a href="#NAME">NAME</a><br>
<a href="#SYNOPSIS">SYNOPSIS</a><br>
<a href="#DESCRIPTION">DESCRIPTION</a><br>
<a href="#DIAGNOSTICS">DIAGNOSTICS</a><br>
<a href="#BUGS">BUGS</a><br>
<a href="#SEE ALSO">SEE ALSO</a><br>
<!-- Creator     : groff version 1.16.1  -->
<!-- CreationDate: Wed Jan 24 01:42:51 2001
 -->
<!-- Total number of pages: 2 -->
<!-- Page: 1 -->
<!-- left  margin: 220 -->
<!-- right margin: 750 -->
<a name="NAME"></a><h2>NAME</h2><p style="margin-left: 18%"><font size=3>xfs_copy - copy the contents of an XFS filesystem</font></p>
<a name="SYNOPSIS"></a><h2>SYNOPSIS</h2><p style="margin-left: 18%"><font size=3><B>xfs_copy</B></font> <font size=3>[</font> <font size=3><B>-d</B></font> <font size=3>] device|file device1 [ device2 device3 ... ]<br>
<B>xfs_copy</B></font> <font size=3>[</font> <font size=3><B>-d</B></font> <font size=3>] device|file file1</font></p>
<a name="DESCRIPTION"></a><h2>DESCRIPTION</h2><p style="margin-left: 18%"><font size=3><I>xfs_copy</I></font> <font size=3>copies an XFS filesystem to one or more targets in parallel (see</font> <font size=3><I>xfs</I></font><font size=3>(8)). The first (source) argument must be the pathname of the device or file containing the XFS filesystem. The remaining arguments specify one or more target devices or a filename. If the pathnames specify devices, a copy of the source XFS filesystem is created on each device. If any of the source or target device names specify devices that are not raw devices,</font> <font size=3><I>xfs_copy</I></font> <font size=3>attempts to locate the raw device corresponding to the specified device and use the raw device instead.</font></p>
<p style="margin-left: 18%"><font size=3>If there is only one target, that target can be the name of a regular file in which case an image of the source XFS filesystem is created in that file. If the file does not exist,</font> <font size=3><I>xfs_copy</I></font> <font size=3>creates the file. The length of the resulting file is equal to the size of the source filesystem. However, if the file is created on an XFS filesystem, the file consumes roughly the amount of space actually used in the source filesystem by the filesystem and the XFS log. The space saving is because</font> <font size=3><I>xfs_copy</I></font> <font size=3>seeks over free blocks instead of copying them and the XFS filesystem supports sparse files efficiently.</font></p>
<p style="margin-left: 18%"><font size=3><I>xfs_copy</I></font> <font size=3>can only be used to copy unmounted filesystems. Otherwise, the generated filesystem(s) would be inconsistent or corrupt. Some versions of</font> <font size=3><I>xfs_copy</I></font> <font size=3>may print a message that they have detected a mounted filesystem, but are continuing the attempt to copy, and then issue a message that they are aborting. This is misleading, but not incorrect. Unmount the filesystem and then issue the command. This means that if you want to copy the root (/) filesystem, you must first load the miniroot, then unmount the root with the</font> <font size=3><I>inst</I></font> <font size=3>command admin umount /root and then do the copy.</font></p>
<p style="margin-left: 18%"><font size=3><I>xfs_copy</I></font> <font size=3>does not alter the source filesystem in any way. Each new (target) filesystem is identical to the original filesystem except that new filesystems each have a new unique filesystem identifier (UUID). Therefore, if both the old and new filesystems will be used as separate distinct filesystems,</font> <font size=3><I>xfs_copy</I></font> <font size=3>or</font> <font size=3><I>xfsdump</I></font><font size=3>/</font><font size=3><I>xfsrestore</I></font> <font size=3>should be used to generate the new filesystem(s) instead of</font> <font size=3><I>dd</I></font><font size=3>(1) or other programs that do block&shy;by&shy;block disk copying.</font></p>
<p style="margin-left: 18%"><font size=3>The</font> <font size=3><B>-d</B></font> <font size=3>(duplicate) option can be used if a true clone is desired. This should be done only if the new filesystem will be used as a replacement for the original filesystem (such as in the case of disk replacement).</font></p>
<p style="margin-left: 18%"><font size=3><I>xfs_copy</I></font> <font size=3>uses synchronous writes to ensure that write errors are detected.</font> <font size=3><I>xfs_copy</I></font> <font size=3>also uses</font> <font size=3><I>sproc</I></font><font size=3>s (see</font> <font size=3><I>sproc</I></font><font size=3>(2)) to perform simultaneous parallel writes. Therefore,</font> <font size=3><I>ps</I></font><font size=3>(1) reports multiple copies of</font> <font size=3><I>xfs_copy</I></font> <font size=3>while the copy is in progress.</font> <font size=3><I>xfs_copy</I></font> <font size=3>creates one additional</font> <font size=3><I>sproc</I></font> <font size=3>for each target to be written. All</font> <font size=3><I>sproc</I></font><font size=3>s die if</font> <font size=3><I>xfs_copy</I></font> <font size=3>terminates or aborts.</font></p>
<p style="margin-left: 18%"><font size=3><I>xfs_copy</I></font> <font size=3>does not copy XFS filesystems that have a real&shy;time section or XFS filesystems with external logs. In both cases,</font> <font size=3><I>xfs_copy</I></font> <font size=3>aborts with an error message.</font></p>
<a name="DIAGNOSTICS"></a><h2>DIAGNOSTICS</h2><p style="margin-left: 18%"><font size=3><I>xfs_copy</I></font> <font size=3>reports errors to both stderr and in more detailed form to a generated log file whose name is of the form</font> <font size=3><I>/usr/tmp/xfs_copy.log.??????.</I></font> <font size=3>If</font> <font size=3><I>xfs_copy</I></font> <font size=3>detects a write error on a target, the copy of that one target is aborted and an error message is issued to both stderr and the logfile, but the rest of the copies continue. When</font> <font size=3><I>xfs_copy</I></font> <font size=3>terminates, all aborted targets are reported to both stderr and the logfile. In some cases,</font> <font size=3><I>xfs_copy</I></font> <font size=3>may report the message xfs_copy: couldn't initialize simulation library following another error message. This message is sometimes of use when debugging problems, and should normally be ignored.</font></p>
<p style="margin-left: 18%"><font size=3>If all targets abort or if there is an error reading the source filesystem,</font> <font size=3><I>xfs_copy</I></font> <font size=3>immediately aborts.</font></p>
<p style="margin-left: 18%"><font size=3><I>xfs_copy</I></font> <font size=3>returns an exit code of 0 if all targets are successfully copied and an exit code of 1 if any target fails.</font></p>
<a name="BUGS"></a><h2>BUGS</h2><p style="margin-left: 18%"><font size=3>When moving filesystems from one disk to another, if the original filesystem is less than 4 Gbytes long and the new filesystem will larger, we recommend that</font> <font size=3><I>mkfs</I></font> <font size=3>and</font> <font size=3><I>xfsdump/xfsrestore</I></font> <font size=3>be used instead of using</font> <font size=3><I>xfs_copy</I></font> <font size=3>and</font> <font size=3><I>xfs_growfs.</I></font> <font size=3>The filesystem layout</font><br>
</p>

<!-- Page: 2  -->
<!-- left  margin: 220 -->
<!-- right margin: 750 -->
<p style="margin-left: 18%"><font size=3>resulting from using</font> <font size=3><I>xfs_copy/xfs_growfs</I></font> <font size=3>is almost always worse than the result of using</font> <font size=3><I>mkfs/xfsdump/xfsrestore</I></font> <font size=3>but in the case of small filesystems, the differences can have a significant performance impact.</font></p>
<p style="margin-left: 18%"><font size=3><I>xfs_copy</I></font> <font size=3>does not copy XFS filesystems with real&shy;time partitions or external logs.</font></p>
<p style="margin-left: 18%"><font size=3>If the source filesystem is bigger than the target partition, the copy may succeed if the blocks at the end of the source filesystem are not in use but the generated copy will not be a valid filesystem.</font></p>
<a name="SEE ALSO"></a><h2>SEE ALSO</h2><p style="margin-left: 18%"><font size=3>mkfs.xfs(8), xfsdump(8), xfsrestore(8), xfs(5).</font><br>
</p>
</body>
</html>