United States-English |
|
|
HP-UX Reference > Mmkfs_hfs(1M)HP-UX 11i Version 3: February 2007 |
|
NAMEmkfs_hfs: mkfs — construct an HFS file system SYNOPSIS/usr/sbin/mkfs [-F hfs] [-d] [-L|-S] [-V] [-o specific_options] special [size [nsect ntrack blksize fragsize ncpg minfree rps nbpi]] /usr/sbin/mkfs [-d] [-F hfs] [-L|-S] [-V] [-o specific_options] special [proto [nsect ntrack blksize fragsize ncpg minfree rps nbpi]] /usr/sbin/mkfs [-F hfs] [-m] [-V] special DESCRIPTIONThe mkfs command constructs an HFS file system by writing on the special file special. The mkfs command builds the file system with a root directory and a lost+found directory (see fsck_hfs(1M)). The FS_CLEAN magic number for the file system is stored in the superblock. The mkfs command creates the file system with a rotational delay value of zero (see tunefs(1M)). Optionsmkfs recognizes the following options:
Argumentsmkfs recognizes the following arguments:
One of the following arguments can be included after special:
The following optional arguments allow fine-tune control over file system parameters:
Prototype File StructureA prototype file describes the initial file structure of a new file system. The file contains tokens separated by spaces or newline characters. It cannot contain comments. The first token is the name of a file to be copied onto block zero as the bootstrap program (usually /etc/BOOT). If the file name is "", no bootstrap code is placed on the device. The second token is a number specifying the number of DEV_BSIZE blocks in the file system. The next three tokens specify the mode, user ID, and group ID of the root directory of the new file system, followed by the initial contents of the root directory in the format described for a directory file below, and terminated with a $ token. A file specification consists of four tokens giving the name, mode, user ID, and group ID, and an initial contents field. The syntax of the initial contents field depends on the mode. A name token is a file name that is valid for the file system. The root directory does not have a name token. A mode token is a 6-character string. The first character specifies the type of the file. It can be one of the following characters:
The second character of a mode token is either u or - to specify set-user-ID mode or not. The third character of a mode token is either g or - to specify the set-group-ID mode or not. The rest of a mode token is a three-digit octal number giving the owner, group, and other read, write, and execute permissions (see chmod(1)). The user-ID and group-ID tokens define the owner of the file. These values can be specified numerically or with symbolic names that appear in the current password and group databases. Regular file. The initial contents field is the path name of an existing file in the current file system whose contents and size are copied to the new file. Block or character special file. The initial contents field is two numeric tokens that specify the major and minor device numbers. Directory file. The initial contents field is a list of file specifications for the entries in the directory. The list is terminated with a $ token. Directories can be nested. For each directory, the mkfs command automatically makes the . and .. entries. Symbolic link. The initial contents field is a path name that is used as the path to which the symbolic link should point. Hard link. The initial contents field is a path name that is used as the name of a file within the new file system to which the entry should be linked. The mode, user-ID and group-ID tokens of this entry are ignored; they are taken from the target of the link. The target of the link must be listed before the entry specifying the link. Hard links to directories are not permitted. With the exception of the permissions field of the mode token (which is always an octal number), all numeric fields can be specified in hexadecimal (using a leading 0x), octal (using a leading 0), or decimal. Here is a sample prototype specification. The indentation clarifies the directory recursion. /etc/BOOT 12288 d--555 bin bin sbin d--755 bin bin init ---555 bin bin /sbin/init savecore ---555 bin bin /sbin/savecore $ dev d--555 bin bin b0 b--640 root sys 0 0x0e0000 c0 c--640 root sys 4 0x0e0000 $ etc d--755 bin bin init l--777 bin bin /sbin/init passwd ---444 bin bin /etc/passwd group ---444 bin bin /etc/group $ usr d--755 bin bin bin d--755 bin bin sh ---555 bin bin /usr/bin/sh rsh L--555 bin bin /usr/bin/sh su -u-555 root bin /usr/bin/su mailq l--777 bin bin /usr/sbin/sendmail $ sbin d--755 bin bin sendmail -ug555 root mail /usr/sbin/sendmail $ $ $ Access Control ListsEvery file with one or more optional ACL entries consumes an extra (continuation) inode. If you anticipate significant use of ACLs on a new file system, you can allocate more inodes by reducing the value of nbpi appropriately. The small default value typically causes allocation of many more inodes than are actually necessary, even with ACLs. To evaluate your need for extra inodes, run the bdf -i command on existing file systems. For more information on access control lists, see acl(5). EXAMPLESExecute the mkfs command to create a 32MB HFS file system on the non-LVM disk /dev/dsk/c1t2d0: mkfs -F hfs /dev/dsk/c1t2d0 32768 Display the command that was used to construct the file system on /dev/dsk/c1t2d0: mkfs -F hfs -m /dev/dsk/c1t2d0 Create an HFS file system within a logical volume /dev/vg01/my_lvol of a size equal to the size of my_lvol: mkfs -F hfs /dev/vg01/my_lvol WARNINGSThe old -F option, from prior releases of mkfs(1M), is no longer supported. mkfs_hfs(1M) cannot be executed specifying creation of a file system on a whole disk if that disk was previously used as an LVM disk. If you wish to do this, use mediainit(1) to reinitialize the disk first. The -o largefile option should be used with care, since older applications will not react correctly when confronted with large files. FILES
SEE ALSOchmod(1), bdf(1M), df(1M), fsadm_hfs(1M), fsck(1M), fsck_hfs(1M), fsclean(1M), mkfs(1M), mount_hfs(1M), newfs(1M), newfs_hfs(1M), dir(4), fstab(4), group(4), passwd(4), symlink(4), acl(5). |
Printable version | ||
|