Initializes a DCE LFS aggregate
Synopsis
newaggr -aggregate name -blocksize bytes -fragsize bytes [-initialempty blocks]
[-aggrsize
blocks] [-logsize blocks] [-overwrite] [-verbose] [-noaction] [-help]
Options
-aggregate name
Specifies the device name or aggregate name of the disk partition to be initialized as a DCE LFS aggregate. These names are specified in the first and
second fields of the entry for the aggregate in the dcelocal/var/dfs/dfstab file.
-blocksize bytes
Specifies the number of bytes to be available in DCE LFS blocks on the aggregate (also referred to as the blocking factor). The value provided must be
a power of two between 1024 and 65,536.
The number controls how disks are addressed in DCE LFS. No file larger than 2 to the 31st power blocks can be read or written. (Other considerations, chiefly I/O speed versus disk utilization, also constrain the maximum file size.)
-fragsize bytes
Specifies the number of bytes to be available in DCE LFS fragments on the aggregate. The value provided must be a power of two between 1024 and the
number of bytes specified with -blocksize.
The unit of storage allocation in DCE LFS is the fragment, so this value controls the granularity of storage allocated to files. In other words, it affects the amount of space lost due to fragmentation.
-initialempty blocks
Specifies the number of DCE LFS blocks that DCE LFS leaves empty at the beginning of the disk partition when it initializes the aggregate. The
value provided must be an integer between 0 (zero) and 65,536 divided by the number of bytes specified with -blocksize. For example, if the value provided with -blocksize is 2048,
the value provided with -initialempty cannot exceed 32 (65,536 divided by 2048).
The empty blocks reserved with this option are often used for a bootstrapping program. For this reason, the reserved blocks are often referred to as bootblocks.
If this option is omitted, one block is left empty at the beginning of the partition.
-aggrsize blocks
Specifies the total number of DCE LFS blocks to be available on the aggregate. Because this value cannot exceed the size of the disk partition, it can
be used only to restrict the size of the aggregate. It must be large enough to accommodate at least the log and any blocks left empty at the beginning of the partition.
If this option is omitted, the default is the total number of DCE LFS blocks on the disk partition being initialized as a DCE LFS aggregate.
-logsize blocks
Specifies the number of DCE LFS blocks to be reserved for the log on the aggregate. This value cannot exceed the number of DCE LFS blocks used for
-aggrsize, and it must contain at least enough blocks for the log to be initially created.
If this option is omitted, the default is 1% of the total number of DCE LFS blocks on the aggregate (the number of DCE LFS blocks used for -aggrsize).
-overwrite
Specifies that any existing file system found on the partition can be overwritten when the aggregate is initialized. If this option is specified, an existing file
system on the disk partition is automatically overwritten; the issuer is not prompted for confirmation.
If this option is omitted and an existing file system is found on the partition, the command displays a message informing the issuer that the -overwrite option must be used to overwrite an existing file system. It then terminates with an exit code of at least 16 without overwriting the existing file system.
-verbose
Directs the command to provide more information on its actions as it executes. The information is displayed on standard output (stdout) unless it is directed
elsewhere.
-noaction
Directs the command to display information about what it would do without actually modifying the partition. Include the other options as you would to actually execute
the command. The command displays the default values it would use for its options and informs the issuer if the disk partition already contains a file system.
-help
Prints the online help for this command. All other valid options specified with this option are ignored.
The help and apropos commands available with all command suites are also available with the newaggr command. See the bos help and bos apropos reference pages for examples using these commands.
Description
The newaggr command is used to initialize a partition on the local disk of a machine for use as an aggregate with DCE LFS. The partition to be initialized
as a DCE LFS aggregate is specified with the -aggregate option. The newaggr command formats the specified partition by creating the metadata structure used by DCE LFS for access
control list (ACL) support, logging, and multiple fileset operations. It also creates temporary space on the disk used by the DCE LFS log for faster restarts after system failures. The binary file
for the newaggr command resides in dcelocal/bin/newaggr.
An aggregate is a collection of DCE LFS disk blocks made up of the space available on the partition on which it resides. Each disk block on an aggregate has a fixed size specified with the -blocksize option. The -blocksize option specifies the number of bytes in each DCE LFS block. The value specified with this option must be a power of two between 1024 (1 kilobyte) and 65,536 (64 kilobytes).
Each block can be further decomposed into fragments. Each fragment on an aggregate has a fixed size specified with the -fragsize option. The -fragsize option specifies the number of bytes in each fragment. The value specified with this option must be a power of two between 1024 (1 kilobyte) and the value specified with the -blocksize option.
DCE LFS manages blocks and fragments as variable-length containers for the storage of user and system data. It manages filesets created on the aggregate as logically independent collections of data. Each fileset consists of a hierarchical collection of files residing entirely within a single aggregate. DCE LFS obtains blocks for each fileset from a common allocation pool. As a result, filesets can share blocks (if the blocks are copy-on-write or if each fileset uses only a fragment of the block).
The -initialempty option can be used to reserve a number of empty blocks at the beginning of a partition. The empty blocks are referred to as bootblocks because they are often used for bootstrapping programs. The value provided with the -initialempty option must be an integer between 0 (zero) and 65,536 divided by the value specified with the -blocksize option. By default, one block is left empty.
The -aggrsize option can be used to restrict the number of DCE LFS blocks in the aggregate. By default, all of the blocks available on the disk partition to be initialized are used in the aggregate. The value specified with the -aggrsize option cannot exceed the size of the partition being initialized. It must be large enough to accommodate at least the log and any blocks left empty at the beginning of the partition.
The -logsize option can be used to specify the number of DCE LFS blocks to be reserved for the log on the aggregate. By default, 1% of the total number of DCE LFS blocks on the aggregate is reserved for the log. The value specified with the -logsize option cannot exceed the number of DCE LFS blocks used for the -aggrsize option, and it must specify at least enough blocks for the log to be initially created.
DCE LFS also reserves a variable amount of disk space on the aggregate. By default, DCE LFS reserves 2 megabytes of disk space on an aggregate. However, no less than 1% or no more than 10% of the total size of an aggregate is ever reserved; for example, only 1.5 megabytes are reserved on an aggregate whose total size is only 15 megabytes.
Reserved disk space is used for internal purposes. For example, the reserved space is used to avoid potential problems with routine administrative operations such as fileset moves and clones. The reserved space is not directly accessible to users and administrators. Use the fts aggrinfo command to display the total amount of disk space, including the amount of reserved disk space, on an aggregate.
If an existing file system on the disk partition being initialized is to be overwritten, include the -overwrite option with the command. The option instructs the command to overwrite any data found on the partition. To prevent an existing file system from being overwritten, omit the -overwrite option. If the command encounters an existing file system, it stops the initialization procedure without overwriting the existing file system and reports that it found a file system on the partition. It also instructs you to include the -overwrite option with the command to overwrite the resident file system.
Use the -noaction option to have the command report whether the partition already contains a file system or to display the values it calculates for the -aggrsize and -logsize options without actually overwriting a file system or initializing the partition. Specify all of the command's options as you would to actually execute the command, and include the -noaction option to display the results of the command without modifying the partition.
The newaggr command must be used to initialize a disk partition before the partition can contain DCE LFS filesets. After the disk partition is initialized as a DCE LFS aggregate with this command, an entry can be created for the aggregate in the dfstab file, and it can be exported to the DCE namespace with the dfsexport command. DCE LFS filesets can then be created on it with the fts create command and mounted in the global namespace with the fts crmount command.
Because the newaggr command overwrites all data on the partition being initialized, the partition must not be mounted locally and it should not contain data when the command is run. If the newaggr command is issued with the -overwrite option to create a DCE LFS aggregate on a disk partition that already contains a file system, the previous file system is destroyed. However, the command fails if it is run on an aggregate or partition that is currently exported to the DCE namespace, or if it is run on an aggregate that houses a locally mounted fileset. (If necessary, the dfsexport command can be used to detach an aggregate or partition from the namespace.)
In operating systems that support logical volumes, the command can be used to initialize a logical volume as a DCE LFS aggregate. In such cases, all of the command's functionality described here with respect to a disk partition applies to the logical volume.
Privilege Required
If the -noaction option is not included with the command, the issuer must have both the read and write permissions for the device (disk
partition) to be initialized as a DCE LFS aggregate; if the -noaction option is included with the command, the issuer needs only the read permission for the specified device. An issuer who
is logged in as root on the machine on which the specified device resides always has the necessary privilege to issue this command.
Cautions
Do not use the newaggr command to create non-LFS aggregates. Do not use the command on a partition that contains data you want to retain; the command destroys
all data on any partition it initializes. Do not use the command on a locally mounted partition; doing so causes the kernel to panic. Finally, do not use the command on a currently exported
aggregate or partition, or on an aggregate that houses a locally mounted fileset; the command fails in these cases.
Related Information
Commands: dfsexport(8dfs)
Files: dfstab(4dfs)