]> git.saurik.com Git - apple/hfs.git/blame - newfs_hfs/newfs_hfs.8
hfs-366.1.1.tar.gz
[apple/hfs.git] / newfs_hfs / newfs_hfs.8
CommitLineData
51e135ce
A
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]
558d2836 36.Op Fl D Ar journal-device
51e135ce
A
37.Op Fl n Ar node-size-list
38.Op Fl v Ar volume-name
39.Ar special
40.Nm newfs_hfs
41.Fl N Ar partition-size
42.Op Fl U Ar uid
43.Op Fl G Ar gid
44.Op Fl M Ar mask
45.Op Fl P
46.Op Fl h | w
47.Op Fl s
48.Op Fl b Ar block-size
49.Op Fl c Ar clump-size-list
50.Op Fl i Ar first-cnid
51.Op Fl J Ar [journal-size]
558d2836 52.Op Fl D Ar journal-device
51e135ce
A
53.Op Fl n Ar node-size-list
54.Op Fl v Ar volume-name
55.Sh DESCRIPTION
56.Nm Newfs_hfs
57builds an HFS Plus file system on the specified special device.
58Before running
59.Nm newfs_hfs
60the disk should be partitioned using the
61.Em Disk Utility
62application or
63.Xr pdisk 8 .
64.Pp
65The file system default parameters are calculated based on
66the size of the disk partition. Typically the defaults are
67reasonable, however
68.Nm newfs_hfs
69has several options to allow the defaults to be selectively overridden.
70The options are as follows:
71.Bl -tag -width Fl
72.It Fl N Ar [partition-size]
73Causes the file system parameters to be printed out
74without really creating the file system.
75If the argument following the
76.Fl N
77starts with a decimal digit, it is assumed to be a partition size.
78The paritition size may be given in decimal, octal (with leading `0'),
79or hexadecimal (with leading `0x').
80The partition size argument can be specified in 512-byte blocks (with a `b' suffix),
81petabytes (`p' suffix), terabytes (`t' suffix), gigabytes
82(`g' suffix), megabytes (`m' suffix), or kilobytes
83(`k' suffix). All suffixes indicate binary, not decimal,
84multipliers (e.g., `1k' is 1024 bytes). If no suffix is
85specified, the value is assumed to be in bytes; if an illegal
86suffix is specified, it results in a size of 0 bytes.
87.Pp
88If the partition size is given, then no special device argument shall be provided.
89If no partition size is given, then the size of the given special device
90is used instead, and the special device will not be written to.
91.It Fl U Ar uid
92Set the owner of the file system's root directory to
93.Pa uid .
94.It Fl G Ar gid
95Set the group of the file system's root directory to
96.Pa gid .
97.It Fl M Ar mask
98Specify the octal access permissions mask for the file system's root
99directory.
100.It Fl P
101Set kHFSContentProtectionBit in the volume's attributes, which will cause the
102volume to be mounted with the "protect" option if the kernel supports it.
103.It Fl s
104Creates a case-sensitive HFS Plus filesystem. By
105default a case-insensitive filesystem is created.
106Case-sensitive HFS Plus file systems require a Mac OS X
107version of 10.3 (Darwin 7.0) or later.
108.It Fl b Ar block-size
109The allocation block size of the file system.
110The default value is 4096.
111.It Fl c Ar clump-size-list
112This specifies the
113.Em clump
114and/or
115.Em initial
116sizes, in allocation
117blocks, for the various metadata files.
118.Em Clump
119sizes are specified with the
120.Fl c
121option followed by a comma
122separated list of the form arg=blocks.
123.Pp
124Example: -c c=5000,e=500
125.Bl -tag -width Fl
126.It Em a=blocks
127Set the attribute file clump size.
128.It Em b=blocks
129Set the allocation bitmap file clump size.
130.It Em c=blocks
131Set the catalog file clump size.
132.It Em d=blocks
133Set the data fork clump size.
134.It Em e=blocks
135Set the extent overflow file clump size.
136.It Em r=blocks
137Set the resource fork clump size.
138.El
139.It Fl i Ar first-cnid
140This specifies the initial catalog node ID for user files
141and directories. The default value is 16.
c7ca4fb3
A
142.It Fl I Ar initial-size-list
143This specifies the
144.Em initial
145size, in allocation
146blocks, for the various metadata files.
147.Em Initial
148sizes are specified with the
149.Fl I
150option followed by a comma
151separated list of the form arg=blocks.
152.Pp
153Example: -I c=5000,e=500
154.Bl -tag -width Fl
155.It Em a=blocks
156Set the initial attribute file size.
157.It Em c=blocks
158Set the initial catalog file size.
159.It Em e=blocks
160Set the initial extent overflow file size.
161.El
51e135ce
A
162.It Fl J Ar [journal-size]
163Creates a journaled HFS+ volume.
164The default journal size varies, based on the size of the volume. Appending an 'M' to the
165journal size implies megabytes (i.e. 64M is 64 megabytes).
166The maximum journal size is 1024 megabytes.
558d2836
A
167.It Fl D Ar journal-device
168Creates the journal on special device
169.Em journal-device.
51e135ce
A
170.It Fl n Ar node-size-list
171This specifies the b-tree
172.Em node
173sizes, in bytes,
174for the various b-tree files.
175.Em Node
176sizes are specified with the
177.Fl n
178option followed by a comma separated list of
179the form arg=bytes. The
180.Em node
181size must be a power of two and no larger than
18232768 bytes.
183.Pp
184Example: -n c=8192,e=4096
185.Bl -tag -width Fl
186.It Em a=bytes
187Set the attribute b-tree node size.
188.It Em c=bytes
189Set the catalog b-tree node size.
190.It Em e=bytes
191Set the extent overflow b-tree node size.
192.El
193.It Fl v Ar volume-name
194Volume name (file system name) in ascii or UTF-8 format.
195.El
196.Sh SEE ALSO
197.Xr mount 8 ,
198.Xr pdisk 8
199.Sh HISTORY
200The
201.Nm
202command appeared in Mac OS X Server 1.0 . As of Mac OS X 10.6, this utility no longer generates HFS standard file systems.