Content-type: text/html
mkfdmn - creates a new file domain
/sbin/mkfdmn [-F] [-l num_pages] [-o] [-p num_pages] [-r] [-t type] [-x num_pages] special domain
Ignores overlapping partition or block warnings. Sets the number of pages in the log file. AdvFS rounds this number up to a multiple of four. Overwrites an existing file domain, allowing you to recreate the domain structure. Specifies the file domain as the root domain. This prevents multiple volumes in the root domain. AdvFS supports only one volume in the root domain. Enables you to define the disk type of the initial volume. This action is necessary only if the disk has not already been labeled with the disklabel utility. Sets the number of pages by which the bitfile metadata table (BMT) extent size grows. The default is 128 pages. Sets the number of pages to preallocate for the bitfile metadata table (BMT). The default is 0 (zero) pages.
The options -x num_pages and -p num_pages will be retired in a future release of the operating system. Users should plan to migrate away from the use of these options. The use of these options was necessary in previous releases to manipulate contiguous storage for bitfile metadata table (BMT) operations. In this release, storage for BMT operations is managed internally by the operating system.
Specifies the block special device name, such
as
/dev/rz1c, of the initial volume that you use to create
the file domain.
Specifies the name of the file domain.
The mkfdmn command creates a file domain, which is a logical construct containing both physical volumes (disks or disk partitions) and filesets. When you create a file domain, you must specify one volume. If the new file domain will overlap mounted file system(s), swap areas, or reserved partitions, you are given the choice of continuing or aborting the command.
Existing data on the volume you assign to a new file domain is destroyed when the file domain is created.
If you try to add a volume that would cause partitions to overlap with any other file system, including LSM, BSD, and AdvFS, or that would overlap with blocks that are in use, the system displays a message asking if you wish to continue. The message for an AdvFS volume is the following: Partition(s) which overlap /dev/rrz10a are marked in use. If you continue with the operation you can possibly destroy existing data. CONTINUE? [y/n] y
Use the -F option to disable testing for overlap.
The mkfdmn command does not create a file system that you can mount. In order to mount an AdvFS, the file domain must contain one or more filesets.
After you run the mkfdmn command, you must run the mkfset command to create at least one fileset within the new file domain. You can access the file domain as soon as you mount one or more filesets. For more information about creating filesets, see the mkfset(8) reference page.
To remove a file domain, dismount all filesets in the domain you want to remove. Then use the rmfdmn command to remove the file domain.
You can also remove the definition of the domain by removing the defining directory and all links under it in the /etc/fdmns directory. To accomplish this, execute the following command line: # rm -rf /etc/fdmns/domain_name
Although you can use the advscan command to re-create a file domain, it is good practice to maintain a current hardcopy record of each volume you have. You must have the names of all the volumes in the domain to re-create the /etc/fdmns directory by hand.
Systems with file domains that contain very large numbers of files can use more BMT extents (similar to inodes in UFS) than normal. By default, AdvFS attempts to grow the BMT by 128 pages each time additional BMT extents are needed. Frequent requests by the system to increase the BMT cause the metadata to become very fragmented, which can result in an ``out of disk space'' error.
You can reduce the amount of metadata fragmentation in one of two ways: by increasing the number of pages the system attempts to grow the BMT each time more space is needed or by preallocating all of the space for the BMT when the file domain is created.
To preallocate all of the BMT space you expect the file domain to need, use the mkfdmn command with the -p option set to specify the number of pages to preallocate. Space that is preallocated for the BMT cannot be deallocated, so do not preallocate more space than you need for it. The table below provides BMT page number estimates for numbers of files.
To set the BMT to grow by more than 128 pages each time additional metadata extents are needed, use the mkfdmn command with the -x option set to specify a number of pages greater than 128. You can increase the number of pages to any value; the following table shows suggested guidelines.
Number of Files | Suggested BMT Extent Size in pages | BMT Size in pages |
Less than 50,000 | default (128) | 3,600 |
100,000 | 256 | 7,200 |
200,000 | 512 | 14,400 |
300,000 | 768 | 21,600 |
400,000 | 1024 | 28,800 |
800,000 | 2048 | 57,600 |
If you make a file domain using the -p or -x options to increase the BMT extent allocations, you must use the same option with the same number of pages when you add a volume to the file domain with the addvol command. See addvol(8) for information about adding a volume to a file domain. The addvol reference page is available only when the POLYCENTER Advanced Utilities are installed.
Use a value in the -x num_pages argument that maintains the following ratio between the BMT extent size (the number of pages for the -x parameter) and the log file size (the number of pages for the -l parameter):
BMT extent size <= (log file size * 8184) / 4
It takes about one minute to process 5000 BMT extent size pages with
the
-x
option. A process that initiates a BMT extent size
operation must take into account that very large values for
-x
will take a long time to complete.
You must be the root user to use this command.
You cannot have more than 255 active file domains at one time. A file domain is active when at least one fileset is mounted.
Each file domain must have a unique name of up to 31 characters. All
white space characters (tab, line feed, space, etc.) and the
/ #
: * ?
characters are invalid for file domain names.
The following example creates the accounts_dmn file domain with the special device /dev/rz1c as the initial volume: # mkfdmn /dev/rz1c accounts_dmn
Until you create and mount a fileset for the
accounts_dmn
file domain, you cannot access the file system.
Contains file domain names and devices.
advfs(4), addvol(8), fdmns(4), mkfset(8), mount(8), rmfdmn(8), showfdmn(8)