Next | Prev | Up | Top | Contents | Index

Filesystem Creation

To turn a disk partition or logical volume into a filesystem, the mkfs command must be used. It takes a disk partition or logical volume and divides it up into areas for data blocks, inodes, and free lists, and writes out the appropriate inode tables, superblocks, and block maps. It creates the filesystem's root directory and, for EFS filesystems only, a lost+found directory.

An example mkfs command for making an EFS filesystem is:

mkfs -t efs /dev/rdsk/dks0d2s7 
You can use the -n option to mkfs to specify the number of inodes created.

An example mkfs command for making an XFS filesystem with a 1 MB internal log section is:

mkfs -l size=1m /dev/rdsk/dks0d2s7 
An example mkfs command for making an XFS filesystem on a logical volume with log and data subvolumes is:

mkfs /dev/rdsk/xlv/a 
After using mkfs to create an EFS filesystem, run the fsck command to verify that the disk is consistent.

For more instructions on making filesystems see Chapter 4, "Creating and Growing Filesystems," and the mkfs(1M), mkfs_efs(1M), and mkfs_xfs(1M) reference pages.



Next | Prev | Up | Top | Contents | Index