.\" Copyright (c) 2002-2003 Apple Computer, Inc. All rights reserved. .\" .\" The contents of this file constitute Original Code as defined in and .\" are subject to the Apple Public Source License Version 1.1 (the .\" "License"). You may not use this file except in compliance with the .\" License. Please obtain a copy of the License at .\" http://www.apple.com/publicsource and read it before using this file. .\" .\" This Original Code and all software distributed under the License are .\" distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER .\" EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, .\" INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, .\" FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the .\" License for the specific language governing rights and limitations .\" under the License. .\" .\" @(#)newfs_hfs.8 .Dd April 1, 2003 .Dt NEWFS_HFS 8 .Os "Mac OS X" .Sh NAME .Nm newfs_hfs .Nd construct a new HFS Plus file system .Sh SYNOPSIS .Nm newfs_hfs .Op Fl N Ar [partition-size] .Op Fl U Ar uid .Op Fl G Ar gid .Op Fl M Ar mask .Op Fl h | w .Op Fl s .Op Fl b Ar block-size .Op Fl c Ar clump-size-list .Op Fl i Ar first-cnid .Op Fl J Ar [journal-size] .Op Fl n Ar node-size-list .Op Fl v Ar volume-name .Ar special .Sh DESCRIPTION .Nm Newfs_hfs builds an HFS Plus file system on the specified special device. Before running .Nm newfs_hfs the disk should be partitioned using the .Em Disk Utility application or .Xr pdisk 8 . .Pp The file system default parameters are calculated based on the size of the disk partition. Typically the defaults are reasonable, however .Nm newfs_hfs has several options to allow the defaults to be selectively overridden. The options are as follows: .Bl -tag -width Fl .It Fl N Ar [partition-size] Causes the file system parameters to be printed out without really creating the file system. The optional .Ar partition-size argument can be specified in bytes (with a `b' suffix), petabytes (`p' suffix), terabytes (`t' suffix), gigabytes (`g' suffix), megabytes (`m' suffix), or kilobytes (`k' suffix). All suffixes indicate binary, not decimal, multipliers (e.g., `1k' is 1024 bytes). If no suffix is specified, the value is assumed to be in bytes; if an illegal suffix is specified, it results in a size of 0 bytes. .It Fl U Ar uid Set the owner of the file system's root directory to .Pa uid . .It Fl G Ar gid Set the group of the file system's root directory to .Pa gid . .It Fl M Ar mask Specify the octal access permissions mask for the file system's root directory. .It Fl h Creates a legacy HFS format filesystem. This option is not recomended for file systems that will be primarily used with Mac OS X or Darwin. .It Fl s Creates a case-sensitive HFS Plus filesystem. By default a case-insensitive filesystem is created. Case-sensitive HFS Plus file systems require a Mac OS X version of 10.3 (Darwin 7.0) or later. .It Fl w Adds an HFS wrapper around the HFS Plus file system. This wrapper is required if the file system will be used to boot natively into Mac OS 9. .It Fl b Ar block-size The allocation block size of the file system. The default value is 4096. .It Fl c Ar clump-size-list This specifies the .Em clump and/or .Em initial sizes, in allocation blocks, for the various metadata files. .Em Clump sizes are specified with the .Fl c option followed by a comma separated list of the form arg=blocks. .Pp Example: -c c=5000,e=500 .Bl -tag -width Fl .It Em a=blocks Set the attribute file clump size. .It Em b=blocks Set the allocation bitmap file clump size. .It Em c=blocks Set the catalog file clump size. .It Em d=blocks Set the data fork clump size. .It Em e=blocks Set the extent overflow file clump size. .It Em g=blocks Set the maximum growable size of the hfs wrapper. .It Em r=blocks Set the resource fork clump size. .El .It Fl i Ar first-cnid This specifies the initial catalog node ID for user files and directories. The default value is 16. .It Fl J Ar [journal-size] Creates a journaled HFS+ volume. The default journal size is 8MB. Appending an 'M' to the journal size implies megabytes (i.e. 64M is 64 megabytes). The maximum journal size is 512 megabytes. .It Fl n Ar node-size-list This specifies the b-tree .Em node sizes, in bytes, for the various b-tree files. .Em Node sizes are specified with the .Fl n option followed by a comma separated list of the form arg=bytes. The .Em node size must be a power of two and no larger than 32768 bytes. .Pp Example: -n c=8192,e=4096 .Bl -tag -width Fl .It Em a=bytes Set the attribute b-tree node size. .It Em c=bytes Set the catalog b-tree node size. .It Em e=bytes Set the extent overflow b-tree node size. .El .It Fl v Ar volume-name Volume name (file system name) in ascii or UTF-8 format. .El .Sh SEE ALSO .Xr mount 8 , .Xr pdisk 8 .Sh HISTORY The .Nm command appeared in Mac OS X Server 1.0 .