admfilesystem(1M) DG/UX 5.4R3.00 admfilesystem(1M)
NAME
admfilesystem - manage file systems
SYNOPSIS
admfilesystem -o create [ -b block_count ] [ -p mkfs-options ] [ -q ]
virtual-disk
admfilesystem -o add -f fs-source [ -p fstab-options ] [ -d dump-freq
] [ -k fsck-pass ] [ -t type ] [ -e [ -P export-options
] ] [ -xq ] mount-directory
admfilesystem -o expand [ -B ] -a physical-disk-name:{starting-
block|*}:block-count mount-directory
admfilesystem -o expand [ -B ] -b block-count mount-directory
admfilesystem -o shrink -b block-count [ -M percentage-free-blocks ]
[ -F percentage-free-inodes ] mount-directory
admfilesystem -o modify [ -f fs-source ] [ -p fstab-options ] [ -d
dump-freq ] [ -k fsck-pass ] [ -t type ] [ -n new-
mount-dir ] [ { -u | [ -e ] [ -P export-options ] }
] [ -xqE ] mount-directory
admfilesystem -o delete [ -xqE ] mount-directory ...
admfilesystem -o mount|export|unexport mount-directory ...
admfilesystem -o unmount [ -E ] mount-directory ...
admfilesystem -o list [ -qvlrme ] [ mount-directory ... ]
admfilesystem -o check [ -p fsck-options ] [ mount-directory ]
DESCRIPTION
admfilesystem provides operations for manipulating entries in the
fstab(4) and exports(4) databases as well as a number of other
operations commonly needed for the management of file systems.
Operations
create Create a file system on virtual-disk. Optionally create
the virtual disk before creating a file system on it.
add Add a file system to the fstab file and, if -e is
specified, to the exports file.
expand Expand the file system, using the physical disk area or
block count specified. Only local file systems of type
dg/ux may be expanded. Only file systems that reside upon
certain types of virtual disks may be expanded (see
admvdisk(1M)).
shrink Shrink the file system by the number of blocks specified.
Only local file systems of type dg/ux may be shrunk. Only
Licensed material--property of copyright holder(s) 1
admfilesystem(1M) DG/UX 5.4R3.00 admfilesystem(1M)
file systems that reside upon certain types of virtual
disks may be shrunk (see admvdisk(1M)). Mounted file
systems cannot be shrunk.
modify Modify a file system's fstab or exports entry. If -e is
specified and there is no entry in exports for mount-
directory, an entry will be added. If -u (unexportable) is
specified, the exports entry for mount-directory is deleted
(if one exists).
delete Delete a file system from the fstab file and from the
exports file.
mount Mount a file system. An entry for mount-directory must
exist in fstab.
unmount Unmount a file system.
export Export a file system, making it available for mounting by
remote users. An entry for mount-directory must exist in
exports(4); admfilesystem -o modify -e can be used to
accomplish this.
unexport Unexport a file system making it unavailable for mounting
by remote users. This operation does NOT delete the file
system's entry from the exports file.
list List information about file systems to stdout. If neither
options nor a mount-directory is specified, all file
systems from fstab are listed. If mount-directory is
specified, only information about that file system will be
displayed.
check Check file system and correct inconsistencies. This
operation performs the fsck(1M) command for the file system
specified by mount-directory. If mount-directory is not
specified, file systems are checked according to the pass
numbers specified in fstab.
Options
Options for the create operation:
-b blockcount
Causes virtual-disk to be created, with the specified size.
Appropriate physical disk area(s) are chosen automatically.
Virtual-disk must not already exist. See admvdisk(1M).
-p mkfs-options
Options to be passed to the mkfs command. See mkfs(1M) for
a list of valid mkfs command-line options.
Options for the add and modify operations:
Licensed material--property of copyright holder(s) 2
admfilesystem(1M) DG/UX 5.4R3.00 admfilesystem(1M)
-d dump-freq
Dump frequency entry for fstab file. The value for dump-
freq should be one of {dwmx} (d=daily, w=weekly, m=monthly,
x=no dump). The default dump-freq value for add operations
is "d" for dg/ux file systems, "x" for NFS file systems.
For modify operations, the dump frequency value in fstab
remains unchanged if -d dump-freq is not specified.
-e Exportable. This option indicates that an entry for the
file system is to be added to the exports file, if one does
not already exist.
-f fs-source
File system source. For local file systems, name of block
special device (e.g. /dev/dsk/usr). Usually this would be
a virtual disk that is a volume. For remote file systems,
hostname and path on server (e.g. your_host:/usr). For
modify operations, the file system source in fstab remains
unchanged if -f fs-source is not specified.
-k fsck-pass
Fsck pass number (a non-negative integer). The default
fsck-pass value for add operations is 1 for dg/ux file
systems, 0 for NFS file systems. For modify operations,
the fsck pass value in fstab remains unchanged if -k fsck-
pass is not specified.
-n new-mount-dir
New mount directory. Change the mount directory for the
file system to new-mount-dir.
-p fstab-options
Comma-separated list of options which are to be included in
the fstab entry (e.g. "rw,hard,bg"). If -p fstab-options
is not specified, the default fstab-options value will be
used. The default fstab-options value for add operations
is "rw" for dg/ux file systems, "rw,hard,bg" for NFS file
systems. For modify operations, the option list in fstab
remains unchanged if -p fstab-options is not specified.
-P export-options
Comma-separated list of options for the exports file entry
(e.g. "access=host1:host2,secure"). An empty option list
is the default if -P export-options is not specified.
-t type Type of file system (e.g. dg/ux, nfs). If this option is
not specified on an add operation, the default value for
type is determined from fs-source. If fs-source contains a
colon, type defaults to "nfs"; otherwise, type defaults to
"dg/ux". For modify operations, the type in fstab remains
unchanged if -t type is not specified.
-u Unexportable. If this option is specified with the modify
operation, the exports file entry for the file system (if
Licensed material--property of copyright holder(s) 3
admfilesystem(1M) DG/UX 5.4R3.00 admfilesystem(1M)
one exists) will be deleted.
Options for the expand operation:
-B Bootable. Instructs admfilesystem to make sure that the
changes to the underlying virtual disk will not result in
being unable to boot an image (such as /dgux or
/usr/stand/sysadm) from the file system (virtual disk).
This option is implied when expanding /, /usr, or any file
system which resides upon a virtual disk named root or usr.
See admvdisk(1M).
-a physical-disk-name:starting-block:block-count
-a physical-disk-name:*:block-count
Area of a physical disk to add to the file system. With
the second form (with * in place of starting-block),
admfilesystem chooses an appropriate starting block.
-b block-count
Number of blocks by which to expand the file system.
Appropriate free space is chosen automatically.
Options for the shrink operation:
-b block-count
Number of blocks by which to shrink the file system. The
file system may be shrunk by more than this number of
blocks in order to accommodate internal requirements of the
file system.
-M percentage-free-blocks
Minimum percentage (from 0 to 99) of the blocks of each
Disk Allocation Region to maintain as free space. The
default percentage is 20.
-F percentage-free-inodes
Minimum percentage (from 0 to 99) of the inodes of each
Disk Allocation Region to preserve unused. The default
percentage is 20.
Option for the add, modify and delete operations:
-x Execute immediately. After modifying the appropriate
databases, the necessary combination of unexport, unmount,
mount, and export operations are performed to make the
specified changes take place immediately. If one of these
secondary operations fails (say, due to a file system being
not unmountable, due to its being in use), the
modifications will still have been made to the database
files.
Option for the create, add, modify, delete and list operations:
Licensed material--property of copyright holder(s) 4
admfilesystem(1M) DG/UX 5.4R3.00 admfilesystem(1M)
-q Quiet. Produce an unformatted listing (i.e. no headers,
fields delimited by a single space) when used with the list
operation. This option will also suppress confirmation
prompts when used with the create, add, modify, and delete
operations. This option should be specified if the command
is embedded in a shell script for which confirmation
messages are not desired.
Option for the delete, modify and unmount operations:
-E Expedite. With the -E flag set the umount is invoked with
the -e option which causes the command to not wait for
remote servers to respond when unmounting NFS-mounted file
systems. This is useful when a system needs to be shutdown
in a hurry.
Options for the list operation ( -l, -r and -e are mutually
exclusive):
-v Verbose. Produce a formatted listing with headers and
aligned columns. This option is enabled by default.
-l List only local file systems.
-r List only remote file systems.
-e List only exported file systems (from /etc/xtab).
-m List only mounted file systems (from /etc/mnttab).
Option for the check operation:
-p fsck-options
Options to be passed to the fsck command. See fsck(1M) for
a list of valid fsck command-line options.
EXAMPLE
For this example, assume that you wish to access a remote NFS file
system mounted /pdd/acct on remote host, div3. The file system is to
be soft-mounted locally for read-only access at directory /acct/div3.
The file system would be added to fstab using
admfilesystem -o add -f div3:/pdd/acct -p "ro,soft" /acct/div3
It could then be mounted using
admfilesystem -o mount /acct/div3
OUTPUT
The output produced by the list operation with the -e option lists
the mount directory and export options for each exported file system.
For other variations of the list operation, the following information
Licensed material--property of copyright holder(s) 5
admfilesystem(1M) DG/UX 5.4R3.00 admfilesystem(1M)
is reported: virtual disk, mount directory, file system type,
read/write permission, NFS mount type, dump cycle and fsck pass.
Information is printed in aligned columns with column headers. If
the -q option is specified, headers are suppressed, each entry is
printed on a separate line, and fields are delimited by a single
space.
FILES
/etc/fstab file system table
/etc/exports exported file system list
/etc/mnttab mounted file system list
DIAGNOSTICS
Warnings
- The exports file is inaccessible for an add or modify
operation.
Errors
- fs-source references an unregistered host.
- fs-source references a non-existent virtual disk.
- Attempt is made to add a remote file system whenever NFS
and/or the network package has not been set up.
- Attempt is made to add a file system entry that already exists
or reference a file system entry that doesn't exist.
- Attempt is made to delete or unmount either the root or the
usr file system.
Exit Codes
0 The operation was successful.
1 The operation was unsuccessful.
2 The operation failed due to access restrictions.
3 There was an error in the command line.
NOTES
Superuser privilege is required for all operations except list.
SEE ALSO
sysadm(1M), exportfs(1M), fsck(1M), mkfs(1M), mount(1M),
admpdisk(1M), admvdisk(1M), exports(4), fstab(4), mnttab(4), nfs(6P).
Licensed material--property of copyright holder(s) 6