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

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

Revision 1.2, Tue Apr 25 00:26:32 2000 UTC (17 years, 5 months ago) by cattelan
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +1 -1 lines

Make the body white

<html>
<head>
<meta name="Content-Style" content="text/css">
</head>
<body bgcolor="white">
<a href="#NAME">NAME</a><br>
<a href="#SYNOPSIS">SYNOPSIS</a><br>
<a href="#DESCRIPTION">DESCRIPTION</a><br>
<a href="#SEE ALSO">SEE ALSO</a><br>
<a href="#BUGS">BUGS</a><br>
<!-- Creator     : groff version 1.15  -->
<!-- CreationDate: Mon Apr 24 10:40:29 2000
 -->
<!-- Total number of pages: 4 -->
<!-- Page: 1 -->
<!-- left  margin: 100 -->
<!-- right margin: 750 -->
<a name="NAME"></a><h2>NAME</h2><p><font size=3>mkfs_xfs - construct an XFS filesystem</p>
<a name="SYNOPSIS"></a><h2>SYNOPSIS</h2><p><font size=3><B>mkfs_xfs</B> <font size=3>[ <font size=3><B>-b</B> <font size=3>subopt=value ] [ <font size=3><B>-d</B> <font size=3>subopt[=value] ] [ <font size=3><B>-i</B> <font size=3>subopt=value ]</p>

<table width="100%"  rules="none"  frame="none"  cols="3">
<tr valign="top" align="left">
<td valign="top" align="left"  width="7.6923%">
</td>
<td valign="top" align="left"  width="56.3077%">
<p><font size=3>[ <font size=3><B>-l</B> <font size=3>subopt[=value] ] [ <font size=3><B>-n</B> <font size=3>subopt[=value] ] [ <font size=3><B>-p</B> <font size=3>protofile ] [ <font size=3><B>-q</B> <font size=3>]<br>
[ <font size=3><B>-r</B> <font size=3>subopt[=value] ] [ <font size=3><B>-C</B> <font size=3>] device</p>
</td>
<td valign="top" align="left"  width="36.0000%">
</td>
</tr>
</table>
<br>
<a name="DESCRIPTION"></a><h2>DESCRIPTION</h2><p><font size=3><I>mkfs_xfs</I> <font size=3>constructs an XFS filesystem by writing on a special file using the values found in the arguments of the command line. It is invoked automatically by <font size=3><I>mkfs</I><font size=3>(1M) when <font size=3><I>mkfs</I> <font size=3>is given the <font size=3><B>-t xfs</B> <font size=3>option, options that are spe- cific to XFS, or no options that are specific to EFS.</p>
<p><font size=3>In its simplest (and most commonly used form), the size of the filesystem is determined from the disk driver. As an example, to make a filesystem on partition 7 (all of the useable portion of an option drive, normally) on drive 7 on SCSI bus 0, with an internal log, use: mkfs_xfs /dev/dsk/dks0d7s7</p>
<p><font size=3>XFS filesystems are composed of a data section, a log section, and optionally a real-time section. This separation can be accomplished using the XLV volume manager to create a multi-subvolume volume, or by embedding an <font size=3><I>internal</I> <font size=3>log section in the data section. In the former case, the <font size=3><I>device</I> <font size=3>name is supplied as the final argument. In the latter case a disk partition or XLV logical volume without a log subvolume can contain the XFS filesystem, which is named by the <font size=3><B>-d name=</B><font size=3><I>special</I> <font size=3>option or by the final argument.</p>
<p><font size=3>Each of the <font size=3><I>subopt=value</I> <font size=3>elements in the argument list above can be given as multiple comma-separated <font size=3><I>sub- opt=value</I> <font size=3>suboptions if multiple suboptions apply to the same option. Equivalently, each main option can be given multiple times with different suboptions. For example, <font size=3><B>-l internal,size=1000b</B> <font size=3>and <font size=3><B>-l internal -l size=1000b</B> <font size=3>are equivalent.</p>
<p><font size=3>In the descriptions below, sizes are given in bytes, blocks, kilobytes, or megabytes. Sizes are treated as hexadeci- mal if prefixed by 0x or 0X, octal if prefixed by 0, or decimal otherwise. If suffixed with <font size=3><B>b</B> <font size=3>then the size is con- verted by multiplying it by the filesystem's block size. If suffixed with <font size=3><B>k</B> <font size=3>then the size is converted by multiplying it by 1024. If suffixed with <font size=3><B>m</B> <font size=3>then the size is converted by multiplying it by If suffixed with <font size=3><B>g</B> <font size=3>then the size is con- verted by multiplying it by 1073741824 (1024 * 1024 * 1024).</p>

<table width="100%"  rules="none"  frame="none"  cols="3">
<tr valign="top" align="left">
<td valign="top" align="left"  width="2.6154%">
<p><font size=3><B>-b</p>
</B></td>
<td valign="top" align="left"  width="17.3846%">
</td>
<td valign="top" align="left"  width="80.0000%">
<p><font size=3>Block size options.</p>
<p><font size=3>This option specifies the fundamental block size of the filesystem. The valid suboptions are: <font size=3><B>log=</B><font size=3><I>value</I> <font size=3>and <font size=3><B>size=</B><font size=3><I>value</I><font size=3>; only one can be supplied. The block size is specified either as a base two logarithm value with <font size=3><B>log=</B><font size=3>, or in bytes with <font size=3><B>size=</B><font size=3>. The default value is 4096 bytes (4 KB). The minimum value for block size is 512; the maximum is 65536 (64 KB).</p>
</td>
</tr>
<tr valign="top" align="left">
<td valign="top" align="left"  width="2.6154%">
<p><font size=3><B>-d</p>
</B></td>
<td valign="top" align="left"  width="17.3846%">
</td>
<td valign="top" align="left"  width="80.0000%">
<p><font size=3>Data section options.</p>
<p><font size=3>These options specify the location, size, and other parameters of the data section of the filesystem. The valid suboptions are: <font size=3><B>agcount=</B><font size=3><I>value</I><font size=3>, <font size=3><B>file</B><font size=3>[<font size=3><B>=</B><font size=3><I>value</I><font size=3>], <font size=3><B>name=</B><font size=3><I>value</I><font size=3>, <font size=3><B>size=</B><font size=3><I>value</I><font size=3>, <font size=3><B>sunit=</B><font size=3><I>value</I><font size=3>, <font size=3><B>swidth=</B><font size=3><I>value</I><font size=3>, and <font size=3><B>unwritten</B><font size=3>[<font size=3><B>=</B><font size=3><I>value</I><font size=3>].</p>
<p><font size=3>The <font size=3><B>agcount</B> <font size=3>suboption is used to specify the number of allocation groups. The data section of the filesystem is divided into allocation groups to improve the performance of XFS. More allocation groups imply that more parallelism can be achieved when allocating blocks and inodes. The minimum allocation group size is 16 MB; the maximum size is just under 4 GB. The data section of the filesystem is divided into <font size=3><I>agcount</I> <font size=3>allocation groups (default value 8, unless the filesystem is smaller than 128 MB or larger than 8 GB). Setting <font size=3><I>agcount</I> <font size=3>to a very large number should be avoided, since this causes an unreasonable amount of CPU time to be used when the filesystem is close to full.</p>
<p><font size=3>The <font size=3><B>name</B> <font size=3>suboption can be used to specify the name of the special file containing the filesystem. In this case, the log section must be specified as <font size=3><B>internal</B> <font size=3>(with a size, see the <font size=3><B>-l</B> <font size=3>option below) and there can be no real-time section. Either the block or character spe- cial device can be supplied. An XLV logical volume with a log subvolume cannot be sup- plied here. Note that the default log in this case is an internal log with at least 1000 blocks, actual size depending on the filesystem block size and the directory block size.</p>
<p><font size=3>The <font size=3><B>file</B> <font size=3>suboption is used to specify that the file given by the <font size=3><B>name</B> <font size=3>suboption is a regular file. The suboption value is either 0 or 1, with 1 signifying that the file is regular. This sub- option is used only to make a filesystem image (for instance, a miniroot image). If the value is omitted then 1 is assumed.</p>
<p><font size=3>The <font size=3><B>size</B> <font size=3>suboption is used to specify the size of the data section. This suboption is required if <font size=3><B>-d file[=1]</B> <font size=3>is given. Otherwise, it is only needed if the filesystem should occupy less space than the size of the special file.</p>
</td>
</tr>
</table>
<br>
<!-- Page: 2  -->
<!-- left  margin: 100 -->
<!-- right margin: 750 -->

<table width="100%"  rules="none"  frame="none"  cols="2">
<tr valign="top" align="left">
<td valign="top" align="left"  width="20.0000%">
</td>
<td valign="top" align="left"  width="80.0000%">
<p><font size=3>The <font size=3><B>sunit</B> <font size=3>suboption is used to specify the stripe unit for a RAID device or XLV striped vol- ume. The suboption value has to be specified in 512-byte block units. This suboption ensures that data allocations will be stripe unit aligned when the current end of file is being extended and the file size is larger than 512KB. Also inode allocations and the internal log will be stripe unit aligned.</p>
<p><font size=3>The <font size=3><B>swidth</B> <font size=3>suboption is used to specify the stripe width for a RAID device or XLV striped volume. The suboption value has to be specified in 512-byte block units. This suboption is required if <font size=3><B>-d sunit</B> <font size=3>has been specified and it has to be a multiple of the <font size=3><B>-d sunit</B> <font size=3>suboption. The stripe width will be the preferred iosize returned in the stat system call.</p>
<p><font size=3>The <font size=3><B>unwritten</B> <font size=3>suboption is used to specify whether unwritten extents are flagged as such, or not. The suboption value is either 0 or 1, with 1 signifying that unwritten extent flagging should occur. If the suboption is omitted, unwritten extent flagging is enabled. If unwritten extents are flagged, filesystem write performance will be negatively affected for preallo- cated file extents, since extra filesystem transactions are required to convert extent flags for the range of the file written. This suboption should be disabled if the filesystem needs to be used on operating system versions which do not support the flagging capability.</p>
</td>
</tr>
</table>

<table width="100%"  rules="none"  frame="none"  cols="3">
<tr valign="top" align="left">
<td valign="top" align="left"  width="2.0000%">
<p><font size=3><B>-i</p>
</B></td>
<td valign="top" align="left"  width="18.0000%">
</td>
<td valign="top" align="left"  width="80.0000%">
<p><font size=3>Inode options.</p>
<p><font size=3>This option specifies the inode size of the filesystem, and other inode allocation parameters. The XFS inode contains a fixed-size part and a variable-size part. The variable-size part, whose size is affected by this option, can contain: directory data, for small directories; attribute data, for small attribute sets; symbolic link data, for small symbolic links; the extent list for the file, for files with a small number of extents; and the root of a tree describ- ing the location of extents for the file, for files with a large number of extents.</p>
<p><font size=3>The valid suboptions for specifying inode size are: <font size=3><B>log=</B><font size=3><I>value</I><font size=3>, <font size=3><B>perblock=</B><font size=3><I>value</I><font size=3>, and <font size=3><B>size=</B><font size=3><I>value</I><font size=3>; only one can be supplied. The inode size is specified either as a base two loga- rithm value with <font size=3><B>log=</B><font size=3>, in bytes with <font size=3><B>size=</B><font size=3>, or as the number fitting in a filesystem block with <font size=3><B>perblock=</B><font size=3>. The mininum (and default) value is 256 bytes. The maximum value is 2048 (2 KB) subject to the restriction that the inode size cannot exceed one half of the filesystem block size.</p>
<p><font size=3>The option <font size=3><B>maxpct=</B><font size=3><I>value</I> <font size=3>specifies the maximum percentage of space in the filesystem that can be allocated to inodes. The default value is 25%. Setting the value to 0 means that essentially all of the filesystem can become inode blocks.</p>
<p><font size=3>The option <font size=3><B>align[=</B><font size=3><I>value</I><font size=3><B>]</B> <font size=3>is used to specify that inode allocation is or is not aligned. The value is either 0 or 1, with 1 signifying that inodes are allocated aligned. If the value is omit- ted, 1 is assumed. The default is that inodes are aligned. Aligned inode access is normally more efficient than unaligned access; alignment must be established at the time the filesys- tem is created, since inodes are allocated at that time. This option can be used to turn off inode alignment when the filesystem needs to be mountable by a version of IRIX that does not have the inode alignment feature (any release of IRIX before 6.2, and IRIX 6.2 without XFS patches).</p>
</td>
</tr>
<tr valign="top" align="left">
<td valign="top" align="left"  width="2.0000%">
<p><font size=3><B>-l</p>
</B></td>
<td valign="top" align="left"  width="18.0000%">
</td>
<td valign="top" align="left"  width="80.0000%">
<p><font size=3>Log section options.</p>
<p><font size=3>These options specify the location, size, and other parameters of the log section of the filesystem. The valid suboptions are: <font size=3><B>internal[=</B><font size=3><I>value</I><font size=3><B>]</B> <font size=3>and <font size=3><B>size=</B><font size=3><I>value</I><font size=3>.</p>
<p><font size=3>The <font size=3><B>internal</B> <font size=3>suboption is used to specify that the log section is a piece of the data section instead of being a separate part of an XLV logical volume. The suboption value is either 0 or 1, with 1 signifying that the log is internal. If the value is omitted, 1 is assumed.</p>
<p><font size=3>The <font size=3><B>size</B> <font size=3>suboption is used to specify the size of the log section. This suboption is required if <font size=3><B>-l internal[=1]</B> <font size=3>is given. Otherwise, it is only needed if the log section of the filesystem should occupy less space than the size of the special file. The size is specified in bytes or blocks, with a <font size=3><B>b</B> <font size=3>suffix meaning multiplication by the filesystem block size, as described above. The overriding minimum value for size is 512 blocks. With some combinations of filesystem block size, inode size, and directory block size, the minimum log size is larger than 512 blocks.</p>
<p><font size=3>For a filesystem which is not contained in an XLV logical volume with a log subvolume, the default is to make an internal log 1000 blocks long, or longer with some combinations of filesystem block size, inode size, and directory block size.</p>
</td>
</tr>
</table>
<br>
<!-- Page: 3  -->
<!-- left  margin: 100 -->
<!-- right margin: 750 -->
<p><span style=" text-indent: 1.3000in;"></span><font size=3>For a filesystem which is contained in a XLV striped logical volume, the default internal log<br>
<span style=" text-indent: 1.3000in;"></span>size is rounded up to a multiple of the stripe unit size. In this case, the user specified <font size=3><B>size<br>
<span style=" text-indent: 1.3000in;"></span></B>value must be a multiple of the stripe unit size.</p>

<table width="100%"  rules="none"  frame="none"  cols="3">
<tr valign="top" align="left">
<td valign="top" align="left"  width="10.9231%">
<p><font size=3><B>-n</p>
</B></td>
<td valign="top" align="left"  width="9.0769%">
</td>
<td valign="top" align="left"  width="80.0000%">
<p><font size=3>Naming options.</p>
<p><font size=3>These options specify the version and size parameters for the naming (directory) area of the filesystem. The valid suboptions are: <font size=3><B>log=</B><font size=3><I>value</I><font size=3>, <font size=3><B>size=</B><font size=3><I>value</I><font size=3>, and <font size=3><B>version=</B><font size=3><I>value</I><font size=3>. The naming (directory) version is 1 or 2, defaulting to 1 if unspecified. With version 2 directo- ries, the directory block size can be any power of 2 size from the filesystem block size up to 65536. The block size is specified either as a base two logarithm value with <font size=3><B>log=</B><font size=3>, or in bytes with <font size=3><B>size=</B><font size=3>. The default size value for version 2 directories is 4096 bytes (4 KB), unless the filesystem block size is larger than 4096, in which case the default value is the filesystem block size. For version 1 directories the block size is the same as the filesystem block size.</p>
</td>
</tr>
<tr valign="top" align="left">
<td valign="top" align="left"  width="10.9231%">
<p><font size=3><B>-p</B> <font size=3><I>protofile</p>
</I></td>
<td valign="top" align="left"  width="9.0769%">
</td>
<td valign="top" align="left"  width="80.0000%">
<p><font size=3>If the optional <font size=3><B>-p</B> <font size=3><I>protofile</I> <font size=3>argument is given, <font size=3><I>mkfs_xfs</I> <font size=3>uses <font size=3><I>protofile</I> <font size=3>as a prototype file and takes its directions from that file. The blocks and inodes specifiers in the <font size=3><I>protofile</I> <font size=3>are provided for backwards compatibility, but are otherwise unused. The prototype file con- tains tokens separated by spaces or newlines. A sample prototype specification follows (line numbers have been added to aid in the explanation):</p>
<p><span style=" text-indent: 0.6500in;"></span><font size=3><I>1 /stand/diskboot<br>
<span style=" text-indent: 0.6500in;"></span>2 4872 110<br>
<span style=" text-indent: 0.6500in;"></span>3 d--777 3 1<br>
<span style=" text-indent: 0.6500in;"></span>4 usr d--777 3 1<br>
<span style=" text-indent: 0.6500in;"></span>5 sh ---755 3 1 /bin/sh<br>
<span style=" text-indent: 0.6500in;"></span>6 ken d--755 6 1<br>
<span style=" text-indent: 0.6500in;"></span>7 $<br>
<span style=" text-indent: 0.6500in;"></span>8 b0 b--644 3 1 0 0<br>
<span style=" text-indent: 0.6500in;"></span>9 c0 c--644 3 1 0 0<br>
<span style=" text-indent: 0.6500in;"></span>10 fifo p--644 3 1<br>
<span style=" text-indent: 0.6500in;"></span>11 slink l--644 3 1 /a/symbolic/link<br>
<span style=" text-indent: 0.6500in;"></span>12 : This is a comment line<br>
<span style=" text-indent: 0.6500in;"></span>13 $<br>
<span style=" text-indent: 0.6500in;"></span>14 $</p>
</I><p><font size=3>Line 1 is a dummy string. (It was formerly the bootfilename.) It is present for backward compatibility; boot blocks are not used on SGI systems.</p>
<p><font size=3>Note that some string of characters must be present as the first line of the proto file to cause it to be parsed correctly; the value of this string is immaterial since it is ignored.</p>
<p><font size=3>Line 2 contains two numeric values (formerly the numbers of blocks and inodes). These are also merely for backward compatibility: two numeric values must appear at this point for the proto file to be correctly parsed, but their values are immaterial since they are ignored.</p>
<p><font size=3>Lines 3-11 tell <font size=3><I>mkfs_xfs</I> <font size=3>about files and directories to be included in this filesystem. Line 3 specifies the root directory. Lines 4-6 and 8-10 specifies other directories and files. Note the special symbolic link syntax on line 11.</p>
<p><font size=3>The <font size=3><B>$</B> <font size=3>on line 7 tells <font size=3><I>mkfs_xfs</I> <font size=3>to end the branch of the filesystem it is on, and continue from the next higher directory. It must be the last character on a line. The colon on line 12 intro- duces a comment; all characters up until the following newline are ignored. Note that this means you cannot have a file in a prototype file whose name contains a colon. The <font size=3><B>$</B> <font size=3>on lines 13 and 14 end the process, since no additional specifications follow.</p>
<p><font size=3>File specifications give the mode, the user ID, the group ID, and the initial contents of the file. Valid syntax for the contents field depends on the first character of the mode.</p>
<p><font size=3>The mode for a file is specified by a 6-character string. The first character specifies the type of the file. The character range is <font size=3><B>-bcdpl</B> <font size=3>to specify regular, block special, character special, directory files, named pipes (fifos), and symbolic links, respectively. The second character of the mode is either <font size=3><B>u</B> <font size=3>or <font size=3><B>-</B> <font size=3>to specify setuserID mode or not. The third is <font size=3><B>g</B> <font size=3>or <font size=3><B>-</B> <font size=3>for the setgroupID mode. The rest of the mode is a three digit octal number giving the owner, group, and other read, write, execute permissions (see <font size=3><I>chmod</I><font size=3>(1)).</p>
</td>
</tr>
</table>
<br>
<!-- Page: 4  -->
<!-- left  margin: 100 -->
<!-- right margin: 750 -->

<table width="100%"  rules="none"  frame="none"  cols="2">
<tr valign="top" align="left">
<td valign="top" align="left"  width="20.0000%">
</td>
<td valign="top" align="left"  width="80.0000%">
<p><font size=3>Two decimal number tokens come after the mode; they specify the user and group IDs of the owner of the file.</p>
<p><font size=3>If the file is a regular file, the next token of the specification can be a pathname from which the contents and size are copied. If the file is a block or character special file, two decimal numbers follow that give the major and minor device numbers. If the file is a symbolic link, the next token of the specification is used as the contents of the link. If the file is a direc- tory, <font size=3><I>mkfs_xfs</I> <font size=3>makes the entries <font size=3><B>.</B> <font size=3>and <font size=3><B>..</B> <font size=3>and then reads a list of names and (recursively) file specifications for the entries in the directory. As noted above, the scan is terminated with the token <font size=3><B>$</B><font size=3>.</p>
</td>
</tr>
</table>

<table width="100%"  rules="none"  frame="none"  cols="3">
<tr valign="top" align="left">
<td valign="top" align="left"  width="2.9231%">
<p><font size=3><B>-q</p>
</B></td>
<td valign="top" align="left"  width="17.0769%">
</td>
<td valign="top" align="left"  width="80.0000%">
<p><font size=3>Quiet option.</p>
<p><font size=3>Normally <font size=3><I>mkfs_xfs</I> <font size=3>prints the parameters of the filesystem to be constructed; the <font size=3><B>-q</B> <font size=3>flag suppresses this.</p>
</td>
</tr>
<tr valign="top" align="left">
<td valign="top" align="left"  width="2.9231%">
<p><font size=3><B>-r</p>
</B></td>
<td valign="top" align="left"  width="17.0769%">
</td>
<td valign="top" align="left"  width="80.0000%">
<p><font size=3>Real-time section options.</p>
<p><font size=3>These options specify the location, size, and other parameters of the real-time section of the filesystem. The valid suboptions are: <font size=3><B>extsize=</B><font size=3><I>value</I> <font size=3>and <font size=3><B>size=</B><font size=3><I>value</I><font size=3>.</p>
<p><font size=3>The <font size=3><B>extsize</B> <font size=3>suboption is used to specify the size of the blocks in the real-time section of the filesystem. This size must be a multiple of the filesystem block size. The minimum allowed value is the filesystem block size or 4 KB (whichever is larger); the default value is the stripe width for striped volumes or 64 KB for non-striped volumes; the maximum allowed value is 1 GB. The real-time extent size should be carefully chosen to match the parame- ters of the physical media used.</p>
<p><font size=3>The <font size=3><B>size</B> <font size=3>suboption is used to specify the size of the real-time section. This suboption is only needed if the real-time section of the filesystem should occupy less space than the size of the XLV real-time subvolume.</p>
</td>
</tr>
<tr valign="top" align="left">
<td valign="top" align="left"  width="2.9231%">
<p><font size=3><B>-C</p>
</B></td>
<td valign="top" align="left"  width="17.0769%">
</td>
<td valign="top" align="left"  width="80.0000%">
<p><font size=3>Disable overlapping partition/volume checks.</p>
<p><font size=3>By default <font size=3><I>mkfs_xfs</I> <font size=3>checks to see if the destination partition or logical volume overlaps any mounted or reserved partitions in the system. If an overlap or mount conflict is found, the user will be notified and prevented from potentially corrupting the existing data. For sys- tems with a large number of disks, this additional checking may add noticable overhead to the command's execution time. For situations where command performance is necessary, this switch may be used to disable the safeguards. Due to the potential for user-error caus- ing corrupted filesystems or other on-disk data corruption, we strongly discourage use of this switch in normal operation.</p>
</td>
</tr>
<tr valign="top" align="left">
<td valign="top" align="left"  width="2.9231%">
</td>
<td valign="top" align="left"  width="17.0769%">
</td>
<td valign="top" align="left"  width="80.0000%">
</td>
</tr>
</table>
<br>
<a name="SEE ALSO"></a><h2>SEE ALSO</h2><p><font size=3>mkfs(1M), mkfs_efs(1M).</p>
<a name="BUGS"></a><h2>BUGS</h2><p><font size=3>With a prototype file, it is not possible to specify hard links.<br>
</p>
</body>
</html>