| Skip Navigation Links | |
| Exit Print View | |
|
Sun QFS and Sun Storage Archive Manager 5.3 Reference Manual Sun QFS and Sun Storage Archive Manager 5.3 Information Library |
1. User Commands (Man Pages Section 1)
2. Maintenance Commands (Man Pages Section 1M)
3. Library Functions (Man Pages Section 3)
4. Library Functions (Man Pages Section 3X)
5. File Formats (Man Pages Section 4)
NAME
setfa - Sets file attributes
SYNOPSIS
setfa [-A allocahead[k|m|g]] [-B] [-d] [-D] [-f]
[-g stripe_group] [-l length[k|m|g]] [-L length[k|m|g]]
[-q] [-r dirname] [-s stripe] [-V] filename ...
AVAILABILITY
SUNWsamfs
DESCRIPTION
The setfa command sets attributes for a new or existing
file. The file is created if it does not already exist.
When file attributes are set on a directory, files and
directories subsequently created in that directory inherit
those attributes.
OPTIONS
This command accepts the following options:
-A allocahead
Specifies the number of bytes to be allocated
ahead of a write to the file. The n must be an
integer and must be greater than or equal to one
kilobyte and less than 4 terabytes. The n is
rounded down to units of kilobytes. The integer
specified may be followed by k (for kilobytes), m
(for megabytes), or g (for gigabytes). For
example:
-A 1m
This option is only valid for a regular file. This
option should be used when writing large files
where more sequential allocation is desired. Note,
when the file is closed the blocks are reset to
the size of the file.
-B Permanently clears the direct I/O attribute for
this file. This means that data is transferred
indirectly between the user's buffer and disk
through the system's buffer cache.
For more information, see the directio(3C) man
page. The SAM-QFS buffered I/O attribute is
persistent, remaining until the attribute is reset
or the file is destroyed.
-d Resets all file attributes to the default
attributes. When -d is specified, attributes are
first reset to the default, then other
attribute-setting options are processed.
-D Permanently sets the direct I/O attribute for this
file. This means that data is transferred
directly between the user's buffer and disk. This
attribute should only be set for large,
block-aligned, sequential I/O. The default I/O
mode is buffered (uses the page cache). Direct
I/O is not used if the file is currently memory
mapped.
For more information, see the directio(3C) man
page. The SAM-QFS direct I/O attribute is
persistent, remaining until the attribute is reset
or the file is destroyed.
-f Supresses errors.
-g stripe_group
Specifies the number of the striped group in which
the file is to be allocated first. For
stripe_group, specify a number such that
0 < stripe_group < 127 and is a stripe group
defined in the file system. If round-robin is set
(see the -s option), the file is completely
allocated on the designated stripe group.
Note that the stripe_group attribute is inherited.
It is possible to create a directory and set a
stripe group for that directory. Then, all files
created in that directory are allocated on the
specified stripe group. In the following example,
files created in audio are allocated on striped
group 0, and files created in video are allocated
on stripe group 1:
setfa -g 0 -s 0 audio
setfa -g 1 -s 0 video
-l length Specifies the number of bytes to be preallocated
to the file. This can be specified only for a
file with no disk blocks assigned. This option is
ignored for a directory. If an I/O event attempts
to extend a preallocated file, the caller receives
an ENXIO error. If an attempt is made to
preallocate a file with disk blocks assigned, or a
segmented file, the caller receives an EINVAL
error.
-L length Specifies the number of bytes to be preallocated
to the file. The n must be an integer. The
integer specified may be followed by k (for
kilobytes), m (for megabytes), or g (for
gigabytes). For example:
-L 1g
This option is only valid for a regular file. The
L option allocates using standard allocation. This
means striping is supported. This also means the
file can be extended. The L and l options are
mutually exclusive.
-q Specifies that this file will be linked to the
pseudo character device driver, samaio, for the
purpose of issuing async I/O. Note, this option
also sets Direct I/O and qwrite. Setting this
option may result in greater performance. This
option is not valid when applied against certain
system files and directories such as lost+found.
-r dirname
Recursively performs the operation (setting file
attributes) for any files contained in the
specified dirname or its subdirectories. If no
filename is specified, a -r dirname must be
specified.
-s stripe Specifies the number of allocation units to be
allocated before changing to the next unit. If
stripe is 1, the file is striped across all units
with 1 disk allocation unit (DAU) allocated per
unit. If stripe is 0, the file is allocated on
one unit until that unit has no space. The
default stripe is specified when the file system
is mounted. For more information, see
mount_samfs(1M)).
An Invalid argument message is generated if a
stripe > 0 is specified and mismatched stripe
groups exist. A stripe group is said to be
mismatched if all striped groups do not have the
same number of partitions. Striping across
mismatched stripe groups is not allowed.
-V Enables the verbose display. A message is written
for each file on which attributes are set.
filename Specifies the file for which attributes are being
set. If no -r dirname is specified, a filename
must be specified. If -r dirname is specified, a
filename specification is optional.
SEE ALSO
archive(1), release(1), ssum(1), stage(1).
mount_samfs(1M).
directio(3C).