MKLFS — User Commands
NAME
mklfs − Create an empty LFS file system on a disk partition.
SYNOPSIS
mklfs [options] deviceName [prefix]
OPTIONS
deviceNameThe device on which the file system should be created. This device should be a disk partition complete with a disk label that specifies its size. WARNING: THE CONTENTS OF THIS DEVICE ARE OVERWRITTEN BY MKLFS.
prefixName of the file system (its prefix). You only need to specify this prefix if you wish to have the file system automatically mounted by fsmount during the boot sequence. You can manually mount the file system under any name you want via the prefix command.
−maxNumCacheBlocks NumCacheBlocks
NumCacheBlocks is the maximum number of file cache blocks available on the machine. This number defaults to the maximum number on the machine running the program.
−maxCacheBlocksCleaned NumCacheBlocks
NumCacheBlocks is the maximum number of file cache files that will be reserved for cleaning. A negative value causes mklfs to compute this number based on the segment and file cache size.
−spriteID idid is the Sprite hostname id specified in the superblock. This id is used to inform a machine of its name at boot time. It defaults to the Sprite ID of the machine running mklfs.
−maxUtilization Utilization
Utilization is the maximum fraction of the disk space usable by the file system.
−maxDesc NumDesc
NumDesc is the maximum number of descriptors available in the file system. A negative value causes mklfs to compute this number based on the disk size.
−segAlignment Alignment
Alignment is the alignment in bytes where the first segment should start.
−blockSize size
size is block size of the file system in bytes. The block size is the minimum unit of allocation and should be a multiple of the device’s sector size.
−segmentSize size
size is the segment size of the file system in bytes. The segment size should be a multiple of the block size.
−numSegments NumSegments
NumSegments is the number of segments to use on the file system. A negative value causes mklfs to compute the number of segments based on the size of the disk.
−descBlockSize size
size is the size in bytes of the blocks used to store file descriptors in the log. This number should be a multiple of the block size.
−descMapBlockSize size
size is the block size in byte used for the descriptor map data structure. This number should be a multiple of the block size.
−usageArrayBlockSize size
size is the block size in byte used for the segment usage array data structure. This number should be a multiple of the block size.
−verbosePrint the values used for the parameters.
DESCRIPTION
Mklfs will create an empty Sprite LFS filesystem on a disk partition. The filesystem is created to use the entire disk partition and initialized to look like an Sprite LFS file system containing a root directory with a lost+found directory. Care should be taken because anything already present on the partition will be overwritten.
Mklfs has a large number of options that control the maximum limits of various file system data structures, the characteristic of the machine that will the device for the file system, and the disk layout format the file system. All options except the deviceName specifier are optional and default to reasonable values if not specified. If the program is being run on a machine other than the one that the machine to which the disk will be attached from, the options that describe the machine characteristic will need to be specified.
KEYWORDS
filesystem, LFS, sprite
Sprite version 1.0 — September 07, 1992