]> git.saurik.com Git - hfs.git/blob - newfs_hfs/newfs_hfs.8
hfs-226.1.1.tar.gz
[hfs.git] / newfs_hfs / newfs_hfs.8
1 .\" Copyright (c) 2002-2003 Apple Computer, Inc. All rights reserved.
2 .\"
3 .\" The contents of this file constitute Original Code as defined in and
4 .\" are subject to the Apple Public Source License Version 1.1 (the
5 .\" "License"). You may not use this file except in compliance with the
6 .\" License. Please obtain a copy of the License at
7 .\" http://www.apple.com/publicsource and read it before using this file.
8 .\"
9 .\" This Original Code and all software distributed under the License are
10 .\" distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
11 .\" EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
12 .\" INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
13 .\" FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the
14 .\" License for the specific language governing rights and limitations
15 .\" under the License.
16 .\"
17 .\" @(#)newfs_hfs.8
18 .Dd June 19, 2008
19 .Dt NEWFS_HFS 8
20 .Os "Mac OS X"
21 .Sh NAME
22 .Nm newfs_hfs
23 .Nd construct a new HFS Plus file system
24 .Sh SYNOPSIS
25 .Nm newfs_hfs
26 .Op Fl N
27 .Op Fl U Ar uid
28 .Op Fl G Ar gid
29 .Op Fl M Ar mask
30 .Op Fl P
31 .Op Fl s
32 .Op Fl b Ar block-size
33 .Op Fl c Ar clump-size-list
34 .Op Fl i Ar first-cnid
35 .Op Fl J Ar [journal-size]
36 .Op Fl n Ar node-size-list
37 .Op Fl v Ar volume-name
38 .Ar special
39 .Nm newfs_hfs
40 .Fl N Ar partition-size
41 .Op Fl U Ar uid
42 .Op Fl G Ar gid
43 .Op Fl M Ar mask
44 .Op Fl P
45 .Op Fl h | w
46 .Op Fl s
47 .Op Fl b Ar block-size
48 .Op Fl c Ar clump-size-list
49 .Op Fl i Ar first-cnid
50 .Op Fl J Ar [journal-size]
51 .Op Fl n Ar node-size-list
52 .Op Fl v Ar volume-name
53 .Sh DESCRIPTION
54 .Nm Newfs_hfs
55 builds an HFS Plus file system on the specified special device.
56 Before running
57 .Nm newfs_hfs
58 the disk should be partitioned using the
59 .Em Disk Utility
60 application or
61 .Xr pdisk 8 .
62 .Pp
63 The file system default parameters are calculated based on
64 the size of the disk partition. Typically the defaults are
65 reasonable, however
66 .Nm newfs_hfs
67 has several options to allow the defaults to be selectively overridden.
68 The options are as follows:
69 .Bl -tag -width Fl
70 .It Fl N Ar [partition-size]
71 Causes the file system parameters to be printed out
72 without really creating the file system.
73 If the argument following the
74 .Fl N
75 starts with a decimal digit, it is assumed to be a partition size.
76 The paritition size may be given in decimal, octal (with leading `0'),
77 or hexadecimal (with leading `0x').
78 The partition size argument can be specified in 512-byte blocks (with a `b' suffix),
79 petabytes (`p' suffix), terabytes (`t' suffix), gigabytes
80 (`g' suffix), megabytes (`m' suffix), or kilobytes
81 (`k' suffix). All suffixes indicate binary, not decimal,
82 multipliers (e.g., `1k' is 1024 bytes). If no suffix is
83 specified, the value is assumed to be in bytes; if an illegal
84 suffix is specified, it results in a size of 0 bytes.
85 .Pp
86 If the partition size is given, then no special device argument shall be provided.
87 If no partition size is given, then the size of the given special device
88 is used instead, and the special device will not be written to.
89 .It Fl U Ar uid
90 Set the owner of the file system's root directory to
91 .Pa uid .
92 .It Fl G Ar gid
93 Set the group of the file system's root directory to
94 .Pa gid .
95 .It Fl M Ar mask
96 Specify the octal access permissions mask for the file system's root
97 directory.
98 .It Fl P
99 Set kHFSContentProtectionBit in the volume's attributes, which will cause the
100 volume to be mounted with the "protect" option if the kernel supports it.
101 .It Fl s
102 Creates a case-sensitive HFS Plus filesystem. By
103 default a case-insensitive filesystem is created.
104 Case-sensitive HFS Plus file systems require a Mac OS X
105 version of 10.3 (Darwin 7.0) or later.
106 .It Fl b Ar block-size
107 The allocation block size of the file system.
108 The default value is 4096.
109 .It Fl c Ar clump-size-list
110 This specifies the
111 .Em clump
112 and/or
113 .Em initial
114 sizes, in allocation
115 blocks, for the various metadata files.
116 .Em Clump
117 sizes are specified with the
118 .Fl c
119 option followed by a comma
120 separated list of the form arg=blocks.
121 .Pp
122 Example: -c c=5000,e=500
123 .Bl -tag -width Fl
124 .It Em a=blocks
125 Set the attribute file clump size.
126 .It Em b=blocks
127 Set the allocation bitmap file clump size.
128 .It Em c=blocks
129 Set the catalog file clump size.
130 .It Em d=blocks
131 Set the data fork clump size.
132 .It Em e=blocks
133 Set the extent overflow file clump size.
134 .It Em r=blocks
135 Set the resource fork clump size.
136 .El
137 .It Fl i Ar first-cnid
138 This specifies the initial catalog node ID for user files
139 and directories. The default value is 16.
140 .It Fl J Ar [journal-size]
141 Creates a journaled HFS+ volume.
142 The default journal size varies, based on the size of the volume. Appending an 'M' to the
143 journal size implies megabytes (i.e. 64M is 64 megabytes).
144 The maximum journal size is 1024 megabytes.
145 .It Fl n Ar node-size-list
146 This specifies the b-tree
147 .Em node
148 sizes, in bytes,
149 for the various b-tree files.
150 .Em Node
151 sizes are specified with the
152 .Fl n
153 option followed by a comma separated list of
154 the form arg=bytes. The
155 .Em node
156 size must be a power of two and no larger than
157 32768 bytes.
158 .Pp
159 Example: -n c=8192,e=4096
160 .Bl -tag -width Fl
161 .It Em a=bytes
162 Set the attribute b-tree node size.
163 .It Em c=bytes
164 Set the catalog b-tree node size.
165 .It Em e=bytes
166 Set the extent overflow b-tree node size.
167 .El
168 .It Fl v Ar volume-name
169 Volume name (file system name) in ascii or UTF-8 format.
170 .El
171 .Sh SEE ALSO
172 .Xr mount 8 ,
173 .Xr pdisk 8
174 .Sh HISTORY
175 The
176 .Nm
177 command appeared in Mac OS X Server 1.0 . As of Mac OS X 10.6, this utility no longer generates HFS standard file systems.