EFS is mainly used for swapping.
Each mount point of EFS uses a single local disk partition, much like other file systems. EFS uses the first 8192 bytes of the partition as the metadata region. The metadata records what files are located where. Since the size of metadata is fixed, the maximum number of files on a partition is also fixed. All the files occupy contiguous blocks on the disk, and although EFS supports file resizing, it is very inefficient. So you might want to fix the size of a file right after it is created.
mount extentdev efs directoryIn the above, extentdev is an extent device name that is created beforehand. directory is a path that points to a preexisting directory. Below is an example.
extent mkdev rz3a efsextent -size 167772160 newfs efs efsextent mkdir /efs mount efs efsextent /efs touch /efs/swap mkfile /efs/swap 8388608
The read/write position and size must be multiple of the disk block size(usually 512 bytes).
The overhead of file system methods versas direct extent manipulation is
just one procedure call, so you usually don't have to care about it.
However, if you want to save that teeny overhead, use
getExtent method defined on
EFS.T object, which is a subtype of
File.T.
yasushi@cs.washington.edu