NFS掛載
mount -o rw,bg,hard,nointr,rsize=32768,vers=3,proto=tcp,timeo=600 172.0.78.205:/NFSshare /nfs
mount -o rw,bg,hard,intr,vers=2,proto=tcp,timeo=600 172.0.78.205:/NFSshare /nfs
rw :
mount -o rw,bg,hard,intr,vers=2,proto=tcp,timeo=600 172.0.78.205:/NFSshare /nfs
rw :
read/write accessible
bg:
Attempts mount in background if first attempt is unsuccessful. The default value is fg.
hard:
Retries a request until server responds. The option is the default value.重試請求到伺服器響應
nointr:
Specifies no keyboard interrupts allowed on hard mounts.
intr:
Allows keyboard interrupts on hard mounts.
rsize:
Sets the read buffer size to n bytes. Beginning with AIX Version 6.1, the default value is 65536 when using Version 3 and Version 4 of the NFS protocol.
vers:
Specifies NFS version. The default is the version of NFS protocol used between the client and server and is the highest one available on both
systems. If the NFS server does not support NFS Version 3, the NFS mount will use NFS Version 2. Use the vers=[2|3|4] option to select the NFS
version. By default, the NFS mount will never use NFS Version 4 unless specified. The vers=4 only applies to AIX 5.3 or later.
proto:
Specifies the transport protocol. The default is tcp. Use the proto=[udp|tcp] option to override the default.
timeo:
Sets the Network File System (NFS) time out period to n tenths of a second. For TCP mounts, the default timeout is 100, which equals 10 seconds.
For UDP mounts, the default timeout is 11, which equals 1.1 seconds, but varies depending on the NFS operation taking place. For UDP mounts, the
timeout will increase for each failed transmission, with a maximum value of 20 seconds. Each transmission will be attempted twice, after which the
timeout value is updated. The timeo option does not apply to communication from the NFS client to the rpc.mountd service on NFS servers. A timeout
of 30 seconds is used when making calls to rpc.mountd.
aix6.1.0.8下mount命令詳解
mount Command
Purpose
Makes a file system available for use.
Syntax
mount [ -f ] [ -n node ] [ -o options ] [ -p ] [ -r ] [ -v vfsname ] [ -t type | [ device | node:directory ] directory | all | -a ] [-V [generic_options]
special_mount_points ]
Description
The mount command instructs the operating system to make a file system available for use at a specified location (the mount point). In addition, you can use
the mount command to build other file trees made up of directory and file mounts. The mount command mounts a file system expressed as a device using the
device or node:directory parameter on the directory specified by the directory parameter. After the mount command has finished, the directory specified
becomes the root directory of the newly mounted file system.
Only users with root authority or are members of the system group and have write access to the mount point can issue file or directory mounts. The file or
directory may be a symbolic link. The mount command uses the real user ID, not the effective user ID, to determine if the user has appropriate access. System
group members can issue device mounts, provided they have write access to the mount point and those mounts specified in the /etc/file systems file. Users with
root user authority can issue any mount command.
Users can mount a device provided they belong to the system group and have appropriate access. When mounting a device, the mount command uses the device
parameter as the name of the block device and the directory parameter as the directory on which to mount the file system.
If you enter the mount command without flags, the command displays the following information for the mounted file systems:
* the node (if the mount is remote)
* the object mounted
* the mount point
* the virtual-file-system type
* the time mounted
* any mount options
If you specify only the directory or node:directory parameter, the mount command takes it to be the name of the directory or file on which a file system,
directory, or file is usually mounted (as defined in the /etc/file systems file). The mount command looks up the associated device, directory, or file and
mounts it. This is the most convenient way of using the mount command, because it does not require you to remember what is normally mounted on a directory or
file. You can also specify only the device. In this case, the command obtains the mount point from the /etc/file systems file.
The /etc/file systems file should include a stanza for each mountable file system, directory, or file. This stanza should specify at least the name of the
file system and either the device on which it resides or the directory name. If the stanza includes a mount attribute, the mount command uses the associated
values. It recognizes five values for the mount attributes: automatic, true, false, removable, and readonly.
The mount all command causes all file systems with the mount=true attribute to be mounted in their normal places. This command is typically used during system
initialization, and the corresponding mount operations are referred to as automatic mount operations.
By default, the mount command runs the wlmcntrl command to refresh the current assignment rules in the kernel after mounting the file system. In some
situations (such as when many file systems are mounted at once, or when a rule for an inaccessible remote mount is present in the workload manager
configuration), calling wlmcntrl automatically after mount might be undesirable.
If you wish to override this behavior, set the environment variable MOUNT_WLMCNTRL_SELFMANAGE to any value. This will avoid calling the wlmcntrl command
during the mount operation. You must manually run wlmcntrl -u -d "" to refresh the current assignment rules in the kernel. For more information, see wlmcntrl
command.
Note:
1 If the cdromd CD and DVD automount daemon is enabled, those devices will be automatically mounted as specified in the /etc/cdromd.conf file. Use the
cdumount or cdeject command to unmount an automatically mounted CD or DVD. Use stopsrc -s cdromd to disable the CD/DVD automount daemon.
2 For CacheFS, the remote file system that is to be cached locally must be exported such that the root ID of the local system is not remapped on the remote
host to nobody (or the ID that the remote host uses as the anonymous user). For example, if host A were to export a file system /F, which would be
mounted with CacheFS on host B, then the /etc/exports on host A would need to have an entry similar to:
/F -rw,root=B
or
/F -ro,root=B
depending on the mount options used for the local CacheFS mount.
3 Mounting a JFS file system on a read-only logical volume is not supported.
4 Mounting a JFS2 file system with EAv1 on Trusted AIX system converts the file system to EAv2.
Using mount on a JFS2 File System
The mount command can also be used to access a snapshot of a JFS2 file system as a directory tree. The snapshot on device is mounted read-only at directory. A
snapshot can only be mounted once. When mounting a JFS2 file system with snapshots, the snapshots are activated.
You can use the File Systems application in Web-based System Manager (wsm) to run this command. You could also use the System Management Interface Tool (SMIT)
smit mount fast path to run this command.
Note: If the mount command encounters a Journaled File System (JFS) or Enhanced Journaled File System (JFS2) which was not unmounted before reboot, a replay
of any JFS or JFS2 log records is attempted. In order to move a compatible JFS file system to a system running an earlier release of the operating system, the
file system must always be unmounted cleanly prior to its movement. Failure to unmount first may result in an incompatible JFS log device. If the movement
results in an unknown log device, the file system should be returned to the system running the latter operating system release, and fsck should be run on the
file system.
Flags
Item
Description
-a
Mounts all file systems in the /etc/file systems file with stanzas that contain the true mount attribute.
all
Same as the -a flag.
-f
Requests a forced mount during system initialization to enable mounting over the root file system.
-n node
Specifies the remote node that holds the directory to be mounted. The node can be specified as a colon-separated IPv6 address. If this is done with the
node:directory format, the colon-separated IPv6 address must be enclosed in square brackets.
-p
Mounts a file system as a removable file system. While open files are on it, a removable mounted file system behaves the same as a normally mounted file
system. However, when no files are open (and no process has a current directory on the file system), all of the file system disk buffers in the file
system are written to the medium, and the operating system forgets the structure of the file system.
-r
Mounts a file system as a read-only file system, regardless of its previous specification in the /etc/file systems file or any previous command-line
options.
-t type
Mounts all stanzas in the /etc/file systems file that contain the type=type attribute and are not mounted. The type parameter specifies the name of the
group.
-v vfsname
Specifies that the file system is defined by the vfsname parameter in the /etc/vfs file.
File System Specific Options
Item
Description
-o options
Specifies options. Options entered on the command line should be separated only by a comma. The following file system-specific options do not apply to
all virtual file system types:
atime
Turns on access-time updates. If neither atime nor noatime is specified, atime is the default value.
bsy
Prevents the mount operation if the directory to be mounted over is the current working directory of a process.
cio
Specifies the file system to be mounted for concurrent readers and writers. I/O on files in this file system will behave as if they had been
opened with O_CIO specified in the open() system call. Using this option will prevent access in any manner other than CIO. It is impossible to use
cached I/O on a file system mounted with the cio option. This means that mapping commands such as mmap() and shmat() will fail with EINVAL when
used on any file in a file system mounted with the cio option. One side-effect of this is that it is impossible to run binaries out of a cio
mounted file system, since the loader may use mmap().
dev
Specifies that you can open devices from this mount. If neither dev nor nodev is specified, dev is the default value.
dio
Specifies that I/O on the file system will behave as if all the files had been opened with O_DIRECT specified in the open() system call.
Note: Using the -odio or -ocio flags can help performance on certain workloads, but users should be aware that using these flags will prevent file
caching for these file systems. Because readahead is disabled for these file systems, this may decrease performance for large sequential reads.
fmode=octal
Specifies the mode for a file and directory. The default is 755.
gid=gid
Specifies the GID that is assigned to files in the mount. The default is bin.
log=lvname
Specifies the full path name of the file system logging logical volume name where the following file-system operations are logged.
log=NULL
Turns off logging for JFS2 file systems. JFS2 depends on the log for metadata consistency, so if the system abnormally stops during JFS2 metadata
operations, the file system cannot be recovered to a consistent state upon reboot. In these cases, the file system must be recreated. Attention:
Because of the risk of data loss, use this flag with caution.
maxpout=value
Specifies the pageout level for files on this file system at which threads should be slept. If maxpout is specified, minpout must also be
specified. Value must be non-negative and greater than minpout. The default is the kernel maxpout level.
minpout=value
Specifies the pageout level for files on this file system at which threads should be readied. If minpout is specified, maxpout must also be
specified. Value must be non-negative. The default is the kernel minpout level.
noatime
Turns off access-time updates. Using this option can improve performance on file systems where a large number of files are read frequently and
seldom updated. If you use the option, the last access time for a file cannot be determined. If neither atime nor noatime is specified, atime is
the default value.
nocase
Turns-off case mapping. This is useful for CDROMs using the ISO 9660:1998/HSG standard.
nodev
Specifies that you cannot open devices from this mount. This option returns a value of ENXIO if a failure occurs. If neither dev nor nodev is
specified, dev is the default value.
noguard
Mount the filesystem regardless of the current mountguard setting which would otherwise guard the filesystem against unsupported concurrent mounts
in a PowerHA or other clustering environment. If mountguard is enabled by the chfs or crfs command, the filesystem cannot be mounted if it appears
to be mounted on another node or system. Specifying the noguard option temporarily overrides the mountguard setting.
norbr
Mounts the file system without the release-behind-when-reading capability. If none of the release-behind options are specified, norbrw is the
default value.
norbrw
Mounts the file system without both the release-behind-when-reading and release-behind-when-writing capabilities. If none of the release-behind
options are specified, norbrw is the default value.
norbw
Mounts the file system without the release-behind-when-writing capability. If none of the release-behind options are specified, norbrw is the
default value.
nosuid
Specifies that execution of setuid and setgid programs by way of this mount is not allowed. This option returns a value of EPERM if a failure
occurs. If neither suid nor nosuid is specified, suid is the default value.
rbr
Mount file system with the release-behind-when-reading capability. When sequential reading of a file in this file system is detected, the real
memory pages used by the file will be released once the pages are copied to internal buffers. If none of the release-behind options are specified,
norbrw is the default.
Note: When rbr is specified, the D_RB_READ flag is ultimately set in the _devflags field in the pdtentry structure.
rbw
Mount file system with the release-behind-when-writing capability. When sequential writing of a file in this file system is detected, the real
memory pages used by the file will be released once the pages written to disk. If none of the release-behind options are specified, norbrw is the
default.
Note: When rbw is specified, the D_RB_WRITE flag is set.
rbrw
Mount file system with both release-behind-when-reading and release-behind-when-writing capabilities. If none of the release-behind options are
specified, norbrw is the default.
Note: If rbrw is specified, both the D_RB_READ and the D_RB_WRITE flags are set.
remount
Changes the mount options of a mounted file system. For JFS2 file systems, you can specify the following mount options with the remount option to
change the settings of a mounted file system. For any mount options not specified, no change is made to the current corresponding settings of the
file system.
atime, noatime; dev, nodev; maxpout, minpout; rbr, norbr; rbw, norbw; rbrw, norbrw, rw, ro, rox; suid, nosuid.
Note:
1 External-snapshot mounted file systems cannot be remounted to read-write file systems.
2 You cannot use the rw and ro remount options on a file system that is managed by data management application programming interface (DMAPI).
For NFS, there are three types of mount requests.
duplicate mount
If the node, object, mount point, and the options that are specified in the mount command are the same as those for an existing mount, the
mount command returns information about a successful mount, but a new mount is not created.
new mount
If the remount option is not specified, the mount command creates a new mount. If the node, object, mount point, or the constant options
that are specified in the mount command are different than those for the existing mounts, the mount command fails if the remount option is
specified.
remount
If the node, object, and mount point are the same as those for a top-most mount, but the remount options are different, the remount
operation modifies the mount options of an existing mount. In this case, NFS performs the remount operation.
A top-most mount does not have another mount on top of it. For remount requests, the following options can be modified: acdirmax, acdirmin,
acregmax, acregmin, actimeo, fastattr, grpid, hard, intr, noac, nocto, nodev, nointr, nosuid, posix, retrans, ro, rsize, rw, secure, sec,
soft, timeo, wsize, biods, extraattr, nodircache, prefer, otwattr, maxgroups, and proto. Other options are classified as constant options.
ro
Specifies that the mounted file is read-only, regardless of its previous option specification in the /etc/file systems file or any previous
command-line options. The default value is rw.
rw
Specifies that the mounted file is read/write accessible, regardless of its previous option specification in the /etc/file systems file or any
previous command-line options. The default value is rw.
snapshot
Specifies the device to be mounted is a snapshot. The snapped file system for the specified snapshot must already be mounted or an error message
will display.
snapto=snapshot
Specifies the location to start a snapshot with the value of snapshot when mounting the specified JFS2 file system. The snapshot parameter
specifies the name of an internal snapshot if the snapshot parameter does not included a forward slash (/), that is, no path information.
suid
Specifies that execution of setuid and setgid programs by way of this mount is allowed. If neither suid nor nosuid is specified, suid is the
default value.
upcase
Changes case mapping from default lowercase to uppercase. This is useful for CDROMs using the ISO 9660:1998/HSG standard.
uid=uid
Specifies the UID that is assigned to files in the mount, the default is bin.
wrkgrp=workgroup
Specifies the workgroup that the SMB server belongs.
NFS Specific Options
Item
Description
-o options
Specifies options. Options you enter on the command line should be separated only by a comma, not a comma and a space. The following NFS-specific options
do not apply to all virtual file system types:
acdirmax=n
Holds cached attributes for no more than n seconds after directory update. The default is 60 seconds.
acdirmin=n
Holds cached attributes for at least n seconds after directory update. The default is 30 seconds.
acl
Requests using the Access Control List RPC program for this NFS mount. If the acl option is used, the ACL RPC program is used only if the NFS
server provides it. The default is noacl.
acregmax=n
Holds cached attributes for no longer that n seconds after file modification. The default is 60 seconds.
acregmin=n
Holds cached attributes for at least n seconds after file modification. The default is 30 seconds.
actimeo=n
Sets minimum and maximum times for regular files and directories to n seconds. If this option is set, it overrides any settings for the acregmin,
acregmax, acdirmin, and acdirmax options.
bg
Attempts mount in background if first attempt is unsuccessful. The default value is fg.
biods=n
Sets the maximum number of biod threads that perform asynchronous I/O RPC requests for an NFS mount. The maximum value that can be set is 128.
Values greater than 128 are limited to 128 within the NFS client. The NFS client dynamically manages the number of running biod threads up to the
maximum based on activity. The default maximums for the different NFS protocols are 7 for NFS version 2 and 32 for NFS version 3 and NFS version
4. These defaults are subject to change in future releases.
cio
Specifies the file system to be mounted for concurrent readers and writers. I/O on files in this file system will behave as if they had been
opened with O_CIO specified in the open() system call. Using this option will prevent access in any manner other than CIO. It is impossible to use
cached I/O on a file system mounted with the cio option. This means that mapping commands such as mmap() and shmat() will fail with EINVAL when
used on any file in a file system mounted with the cio option. One side-effect of this is that it is impossible to run binaries out of a cio
mounted file system, since the loader may use mmap().
cior
Specifies to allow read-only files to open in the file system. I/O on files in this file system will behave as if they had been opened with O_CIO
| O_CIOR specified in the open() system call. Using this option will prevent access in any manner other than O_CIO | O_CIOR and read-only. An
attempt to open with O_CIO only will also fail. This option can only be used in conjunction with cio.
dio
Specifies that I/O on the file system will behave as if all the files had been opened with O_DIRECT specified in the open() system call.
Note: Using the -odio or -ocio flags can help performance on certain workloads, but users should be aware that using these flags will prevent file
caching for these file systems. Because readahead is disabled for these file systems, this may decrease performance for large sequential reads.
fastattr
Bypasses the requirement that files currently being written will be sent to the server before the attributes of the file is read. This option is
to be used with caution, since it will cause the client to assume that the file data that has not yet reached the server will be written without
problem. In case of write errors, the client and server will have different opinions on what the size of the file really is. Likewise, a client
will not be aware of attribute changes to the file being made by another client, so this option must not be used in environments where two clients
are writing to the same files.
fg
Attempts mount in foreground if first attempt is unsuccessful. fg is the default value.
grpid
Directs any file or directory created on the file system to inherit the group ID of the parent directory.
hard
Retries a request until server responds. The option is the default value.
intr
Allows keyboard interrupts on hard mounts.
llock
Requests that files lock locally at the NFS client. NFS network file locking requests are not sent to the NFS server if the llock option is used.
maxgroups=n
Indicates that NFS RPC calls using AUTH_UNIX may include up to n member groups of information. Using this option to increase the number of member
groups beyond the RPC protocol standard of 16 will only work against servers that support more than 16 member groups. Otherwise, the client will
experience errors.
Values below 16 or greater than 64 will be ignored. By default, the protocol standard maximum of 16 is adhered to. AIX NFS servers will accept and
process AUTH_UNIX credentials with up to 64 groups starting with AIX 5L Version 5.2 with the 5200-01 Recommended Maintenance package. The actual
number of member groups sent by the NFS client is dependent on the number of groups the involved user is a member of, and may be limited by the
length of the NFS client's hostname (which is included in the AUTH_UNIX information).
noac
Specifies that the mount command performs no attribute or directory caching. If you do not specify this option, the attributes (including
permissions, size, and timestamps) for files and directories are cached to reduce the need to perform over-the-wire NFSPROC_GETATTR Remote
Procedure Calls (RPCs). The NFSPROC_GETATTR RPC enables a client to prompt the server for file and directory attributes. The acregmin, acregmax,
acdirmin, and acdirmax options control the length of time for which the cached values are retained.
noacl
Specifies not to use the Access Control List RPC program for this NFS mount request. The default is noacl.
nointr
Specifies no keyboard interrupts allowed on hard mounts.
port=n
Sets server Internet Protocol (IP) port number to n. The default value is the 2049.
posix
Requests that pathconf information be exchanged and made available on an NFS Version 2 mount. Requires a mount Version 2 rpc.mountd at the NFS
server.
proto=[udp|tcp]
Specifies the transport protocol. The default is tcp. Use the proto=[udp|tcp] option to override the default.
proto=udp cannot be specified if vers=4.
retrans=n
Sets the number of NFS transmissions to n. The default value is 5. The retrans setting determines how many times the NFS client retransmits a
given UDP RPC request to an NFS server for file system operations. The retrans setting is not used during communication with the NFS server
rpc.mountd service when processing NFS version 2 and 3 mounts. Retries to rpc.mountd are controlled with the retry mount option.
retry=n
Sets the number of times the mount is attempted to n; the default value is 1000. When the retry value is 0, the system makes 10,000 attempts.
rsize=n
Sets the read buffer size to n bytes. Beginning with AIX Version 6.1, the default value is 65536 when using Version 3 and Version 4 of the NFS
protocol.
secure
Specifies that the mount command uses Data Encryption Standard (DES) for NFS transactions. Data Encryption Standard (DES) is not supported in NFS
Version 4, use krb5 instead.
sec=flavor[:flavor...]
Specifies a list of security methods that may be used to access files under the mount point. Allowable flavor values are:
sys
UNIX authentication. This is the default method.
dh
DES authentication. Data Encryption Standard (DES) is not supported in NFS Version 4, use krb5 instead.
krb5
Kerberos. Authentication only.
krb5i
Kerberos. Authentication and integrity.
krb5p
Kerberos. Authentication, integrity, and privacy.
The secure option may be specified, but not in conjunction with a sec option. The secure option is deprecated and may be eliminated in a
future release. Use sec=dh instead.
sec=[flavor1:...:flavorn]
The sec option specifies the security flavor list for the NFS mount. The available flavors are des, unix, sys, krb5, krb5i, and krb5p. This option
only applies to AIX 5.3 or later.
shortdev
Specifies that you are mounting a file system from a host that does not support 32-bit device special files.
soft
Returns an error if the server does not respond. The default value is hard.
timeo=n
Sets the Network File System (NFS) time out period to n tenths of a second. For TCP mounts, the default timeout is 100, which equals 10 seconds.
For UDP mounts, the default timeout is 11, which equals 1.1 seconds, but varies depending on the NFS operation taking place. For UDP mounts, the
timeout will increase for each failed transmission, with a maximum value of 20 seconds. Each transmission will be attempted twice, after which the
timeout value is updated. The timeo option does not apply to communication from the NFS client to the rpc.mountd service on NFS servers. A timeout
of 30 seconds is used when making calls to rpc.mountd.
vers=[2|3|4]
Specifies NFS version. The default is the version of NFS protocol used between the client and server and is the highest one available on both
systems. If the NFS server does not support NFS Version 3, the NFS mount will use NFS Version 2. Use the vers=[2|3|4] option to select the NFS
version. By default, the NFS mount will never use NFS Version 4 unless specified. The vers=4 only applies to AIX 5.3 or later.
wsize=n
Sets the write buffer size to n bytes. Beginning with AIX Version 6.1, the default value is 65536 when using Version 3 and Version 4 of the NFS
protocol.
CacheFS Specific Options
The CacheFS-specific version of the mount command mounts a cached file system; if necessary, it NFS-mounts its back file system. It also provides a number of
CacheFS-specific options for controlling the caching process.
To mount a CacheFS file system, use the mount command with the -V flag followed by the argument. The following mount flags are available.
The following arguments to the -o flag are specifically for CacheFS mounts. Options you enter on the command line should be separated only by a comma, not a
comma and a space.
Note: The backfstype argument must be specified.
Item
Description
-o
Specifies options.
acdirmax=n
Specifies that cached attributes are held for no more than n seconds after directory update. Before n seconds, CacheFS checks to see if the
directory modification time on the back file system has changed. If it has, all information about the directory is purged from the cache and new
data is retrieved from the back file system. The default value is 60 seconds.
acdirmin=n
Specifies that cached attributes are held for at least n seconds after directory update. After n seconds, CacheFS checks to see if the directory
modification time on the back file system has changed. If it has, all information about the directory is purged from the cache and new data is
retrieved from the back file system. The default value is 30 seconds.
acregmax=n
Specifies that cached attributes are held for no more than n seconds after file modification. After n seconds, all file information is purged from
the cache. The default value is 30 seconds.
acregmin=n
Specifies that cached attributes are held for at least n seconds after file modification. After n seconds, CacheFS checks to see if the file
modification time on the back file system has changed. If it has, all information about the file is purged from the cache and new data is
retrieved from the back file system. The default value is 30 seconds.
actimeo=n
Sets acregmin, acregmax, acdirmin, and acdirmax to n.
backfstype=file_system_type
The file system type of the back file system (for example, nfs).
backpath=path
Specifies where the back file system is already mounted. If this argument is not supplied, CacheFS determines a mount point for the back file
system.
cachedir=directory
The name of the cache directory.
cacheid=ID
ID is a string specifying a particular instance of a cache. If you do not specify a cache ID, CacheFS will construct one.
demandconst
Enables maximum cache consistency checking. By default, periodic consistency checking is enabled. When you enable demandconst, it checks on every
read and write.
Note: If this option is used the first time a specific CacheFS is mounted, then the option must also be specified for subsequent mounts. There is
state information stored in the cache control files that enforces consistent use of this option.
local_access
Causes the front file system to interpret the mode bits used for access checking instead or having the back file system verify access permissions.
Do not use this argument with secure NFS.
noconst
Disables cache consistency checking. By default, periodic consistency checking is enabled. Specify noconst only when you know that the back file
system will not be modified. Trying to perform cache consistency check using cfsadmin-s will result in error. demandconst and noconst are mutually
exclusive.
Note: If this option is used the first time a specific CacheFS is mounted, then the option must also be specified for subsequent mounts. There is
state information stored in the cache control files that enforces consistent use of this option.
purge
Purges any cached information for the specified file system.
Note: If this option is used the first time a specific CacheFS is mounted, then the option must also be specified for subsequent mounts. There is
state information stored in the cache control files that enforces consistent use of this option.
rw | ro
Read-write (default) or read-only.
suid | nosuid
Allows (default) or disallows set-uid execution
write-around | non-shared
Writes modes for CacheFS. The write-around mode (the default) handles writes the same as NFS does; that is, writes are made to the back file
system, and the affected file is purged from the cache. You can use the non-shared mode when you are sure that no one else will be writing to the
cached file system.
Note: If this option is used the first time a specific CacheFS is mounted, then the option must also be specified for subsequent mounts. There is
state information stored in the cache control files that enforces consistent use of this option.
mfsid
Turns on global view. In NFS v4 system, you can traverse through the exported namespace on the server side. You need to specify this option to go
over the file system.
Restriction: mfsid is an option if the backend file system for CacheFS is NFS v4.
-V
Mounts a CacheFS file system.
Security
Attention RBAC users and Trusted AIX users: This command can perform privileged operations. Only privileged users can run privileged operations. For more
information about authorizations and privileges, see Privileged Command Database in Security. For a list of privileges and the authorizations associated with
this command, see the lssecattr command or the getcmdattr subcommand.
Examples
1 To list the mounted file systems, enter the following command:
mount
This command produces output similar to the following:
node mounted mounted over vfs date options
---- ------- ------------ --- ------------ -------------------
/dev/hd0 / jfs Dec 17 08:04 rw, log =/dev/hd8
/dev/hd3 /tmp jfs Dec 17 08:04 rw, log =/dev/hd8
/dev/hd1 /home jfs Dec 17 08:06 rw, log =/dev/hd8
/dev/hd2 /usr jfs Dec 17 08:06 rw, log =/dev/hd8
sue /home/local/src /usr/code nfs Dec 17 08:06 ro, log =/dev/hd8
For each file system, the mount command lists the node name, the device name, the name under which it is mounted, the virtual-file-system type, the date
and time it was mounted, and its options.
2 To mount all default file systems, enter the following command:
mount >all This command sequence mounts all standard file systems in the /etc/file systems file marked by the mount=true attribute.
3 To mount a remote directory, enter the following command:
mount >-n nodeA /home/tom.remote /home/tom.local This command sequence mounts the /home/tom.remote directory located on nodeA onto the local
/home/tom.local directory. It assumes the default VfsName parameter=remote, which must be defined in the /etc/vfs file.
4 To mount a file or directory from the /etc/file systems file with a specific type, enter the following command:
mount >-t remote This command sequence mounts all files or directories in the /etc/file systems file that have a stanza that contains the type=remote
attribute.
5 To CacheFS-mount the file system which is already NFS-mounted on /usr/abc, enter the following command:
mount -V cachefs -o backfstype=nfs,backpath=/usr/abc,
cachedir=/cache1 server1:/user2 /xyz
The lines similar to the following appear in the /etc/mnttab file after the mount command is executed:
server1:/user2 /usr/abc nfs
/usr/abc /cache1/xyz cachefs backfstype=nfs
6 To mount a snapshot, enter the following command:
mount -o snapshot /dev/snapsb /home/janet/snapsb
This command mounts the snapshot contained on the /dev/snapsb device onto the /home/janet/snapsb directory.
7 To mount a file system and create a snapshot, enter the following command:
mount -o snapto=/dev/snapsb /dev/sb /home/janet/sb
This command mounts the file system contained on the /dev/sbdevice onto the /home/janet/sb directory and creates a snapshot for the file system on the
/dev/snapsbdevice.
8 To access files on an SMB server as a local file system, enter the following command:
mount -v cifs -n pezman/user1/pass1 -o uid=201,fmode=750 /home /mnt
9 To remount the mounted read-only JFS2 file system to a read-write file system, enter the following command:
mount o remount,rw fsname
Files
Item
Description
/etc/file systems
Lists the known file systems and defines their characteristics.
/etc/vfs
Contains descriptions of virtual-file-system types.
xxxxxxxx
bg:
Attempts mount in background if first attempt is unsuccessful. The default value is fg.
hard:
Retries a request until server responds. The option is the default value.重試請求到伺服器響應
nointr:
Specifies no keyboard interrupts allowed on hard mounts.
intr:
Allows keyboard interrupts on hard mounts.
rsize:
Sets the read buffer size to n bytes. Beginning with AIX Version 6.1, the default value is 65536 when using Version 3 and Version 4 of the NFS protocol.
vers:
Specifies NFS version. The default is the version of NFS protocol used between the client and server and is the highest one available on both
systems. If the NFS server does not support NFS Version 3, the NFS mount will use NFS Version 2. Use the vers=[2|3|4] option to select the NFS
version. By default, the NFS mount will never use NFS Version 4 unless specified. The vers=4 only applies to AIX 5.3 or later.
proto:
Specifies the transport protocol. The default is tcp. Use the proto=[udp|tcp] option to override the default.
timeo:
Sets the Network File System (NFS) time out period to n tenths of a second. For TCP mounts, the default timeout is 100, which equals 10 seconds.
For UDP mounts, the default timeout is 11, which equals 1.1 seconds, but varies depending on the NFS operation taking place. For UDP mounts, the
timeout will increase for each failed transmission, with a maximum value of 20 seconds. Each transmission will be attempted twice, after which the
timeout value is updated. The timeo option does not apply to communication from the NFS client to the rpc.mountd service on NFS servers. A timeout
of 30 seconds is used when making calls to rpc.mountd.
aix6.1.0.8下mount命令詳解
mount Command
Purpose
Makes a file system available for use.
Syntax
mount [ -f ] [ -n node ] [ -o options ] [ -p ] [ -r ] [ -v vfsname ] [ -t type | [ device | node:directory ] directory | all | -a ] [-V [generic_options]
special_mount_points ]
Description
The mount command instructs the operating system to make a file system available for use at a specified location (the mount point). In addition, you can use
the mount command to build other file trees made up of directory and file mounts. The mount command mounts a file system expressed as a device using the
device or node:directory parameter on the directory specified by the directory parameter. After the mount command has finished, the directory specified
becomes the root directory of the newly mounted file system.
Only users with root authority or are members of the system group and have write access to the mount point can issue file or directory mounts. The file or
directory may be a symbolic link. The mount command uses the real user ID, not the effective user ID, to determine if the user has appropriate access. System
group members can issue device mounts, provided they have write access to the mount point and those mounts specified in the /etc/file systems file. Users with
root user authority can issue any mount command.
Users can mount a device provided they belong to the system group and have appropriate access. When mounting a device, the mount command uses the device
parameter as the name of the block device and the directory parameter as the directory on which to mount the file system.
If you enter the mount command without flags, the command displays the following information for the mounted file systems:
* the node (if the mount is remote)
* the object mounted
* the mount point
* the virtual-file-system type
* the time mounted
* any mount options
If you specify only the directory or node:directory parameter, the mount command takes it to be the name of the directory or file on which a file system,
directory, or file is usually mounted (as defined in the /etc/file systems file). The mount command looks up the associated device, directory, or file and
mounts it. This is the most convenient way of using the mount command, because it does not require you to remember what is normally mounted on a directory or
file. You can also specify only the device. In this case, the command obtains the mount point from the /etc/file systems file.
The /etc/file systems file should include a stanza for each mountable file system, directory, or file. This stanza should specify at least the name of the
file system and either the device on which it resides or the directory name. If the stanza includes a mount attribute, the mount command uses the associated
values. It recognizes five values for the mount attributes: automatic, true, false, removable, and readonly.
The mount all command causes all file systems with the mount=true attribute to be mounted in their normal places. This command is typically used during system
initialization, and the corresponding mount operations are referred to as automatic mount operations.
By default, the mount command runs the wlmcntrl command to refresh the current assignment rules in the kernel after mounting the file system. In some
situations (such as when many file systems are mounted at once, or when a rule for an inaccessible remote mount is present in the workload manager
configuration), calling wlmcntrl automatically after mount might be undesirable.
If you wish to override this behavior, set the environment variable MOUNT_WLMCNTRL_SELFMANAGE to any value. This will avoid calling the wlmcntrl command
during the mount operation. You must manually run wlmcntrl -u -d "" to refresh the current assignment rules in the kernel. For more information, see wlmcntrl
command.
Note:
1 If the cdromd CD and DVD automount daemon is enabled, those devices will be automatically mounted as specified in the /etc/cdromd.conf file. Use the
cdumount or cdeject command to unmount an automatically mounted CD or DVD. Use stopsrc -s cdromd to disable the CD/DVD automount daemon.
2 For CacheFS, the remote file system that is to be cached locally must be exported such that the root ID of the local system is not remapped on the remote
host to nobody (or the ID that the remote host uses as the anonymous user). For example, if host A were to export a file system /F, which would be
mounted with CacheFS on host B, then the /etc/exports on host A would need to have an entry similar to:
/F -rw,root=B
or
/F -ro,root=B
depending on the mount options used for the local CacheFS mount.
3 Mounting a JFS file system on a read-only logical volume is not supported.
4 Mounting a JFS2 file system with EAv1 on Trusted AIX system converts the file system to EAv2.
Using mount on a JFS2 File System
The mount command can also be used to access a snapshot of a JFS2 file system as a directory tree. The snapshot on device is mounted read-only at directory. A
snapshot can only be mounted once. When mounting a JFS2 file system with snapshots, the snapshots are activated.
You can use the File Systems application in Web-based System Manager (wsm) to run this command. You could also use the System Management Interface Tool (SMIT)
smit mount fast path to run this command.
Note: If the mount command encounters a Journaled File System (JFS) or Enhanced Journaled File System (JFS2) which was not unmounted before reboot, a replay
of any JFS or JFS2 log records is attempted. In order to move a compatible JFS file system to a system running an earlier release of the operating system, the
file system must always be unmounted cleanly prior to its movement. Failure to unmount first may result in an incompatible JFS log device. If the movement
results in an unknown log device, the file system should be returned to the system running the latter operating system release, and fsck should be run on the
file system.
Flags
Item
Description
-a
Mounts all file systems in the /etc/file systems file with stanzas that contain the true mount attribute.
all
Same as the -a flag.
-f
Requests a forced mount during system initialization to enable mounting over the root file system.
-n node
Specifies the remote node that holds the directory to be mounted. The node can be specified as a colon-separated IPv6 address. If this is done with the
node:directory format, the colon-separated IPv6 address must be enclosed in square brackets.
-p
Mounts a file system as a removable file system. While open files are on it, a removable mounted file system behaves the same as a normally mounted file
system. However, when no files are open (and no process has a current directory on the file system), all of the file system disk buffers in the file
system are written to the medium, and the operating system forgets the structure of the file system.
-r
Mounts a file system as a read-only file system, regardless of its previous specification in the /etc/file systems file or any previous command-line
options.
-t type
Mounts all stanzas in the /etc/file systems file that contain the type=type attribute and are not mounted. The type parameter specifies the name of the
group.
-v vfsname
Specifies that the file system is defined by the vfsname parameter in the /etc/vfs file.
File System Specific Options
Item
Description
-o options
Specifies options. Options entered on the command line should be separated only by a comma. The following file system-specific options do not apply to
all virtual file system types:
atime
Turns on access-time updates. If neither atime nor noatime is specified, atime is the default value.
bsy
Prevents the mount operation if the directory to be mounted over is the current working directory of a process.
cio
Specifies the file system to be mounted for concurrent readers and writers. I/O on files in this file system will behave as if they had been
opened with O_CIO specified in the open() system call. Using this option will prevent access in any manner other than CIO. It is impossible to use
cached I/O on a file system mounted with the cio option. This means that mapping commands such as mmap() and shmat() will fail with EINVAL when
used on any file in a file system mounted with the cio option. One side-effect of this is that it is impossible to run binaries out of a cio
mounted file system, since the loader may use mmap().
dev
Specifies that you can open devices from this mount. If neither dev nor nodev is specified, dev is the default value.
dio
Specifies that I/O on the file system will behave as if all the files had been opened with O_DIRECT specified in the open() system call.
Note: Using the -odio or -ocio flags can help performance on certain workloads, but users should be aware that using these flags will prevent file
caching for these file systems. Because readahead is disabled for these file systems, this may decrease performance for large sequential reads.
fmode=octal
Specifies the mode for a file and directory. The default is 755.
gid=gid
Specifies the GID that is assigned to files in the mount. The default is bin.
log=lvname
Specifies the full path name of the file system logging logical volume name where the following file-system operations are logged.
log=NULL
Turns off logging for JFS2 file systems. JFS2 depends on the log for metadata consistency, so if the system abnormally stops during JFS2 metadata
operations, the file system cannot be recovered to a consistent state upon reboot. In these cases, the file system must be recreated. Attention:
Because of the risk of data loss, use this flag with caution.
maxpout=value
Specifies the pageout level for files on this file system at which threads should be slept. If maxpout is specified, minpout must also be
specified. Value must be non-negative and greater than minpout. The default is the kernel maxpout level.
minpout=value
Specifies the pageout level for files on this file system at which threads should be readied. If minpout is specified, maxpout must also be
specified. Value must be non-negative. The default is the kernel minpout level.
noatime
Turns off access-time updates. Using this option can improve performance on file systems where a large number of files are read frequently and
seldom updated. If you use the option, the last access time for a file cannot be determined. If neither atime nor noatime is specified, atime is
the default value.
nocase
Turns-off case mapping. This is useful for CDROMs using the ISO 9660:1998/HSG standard.
nodev
Specifies that you cannot open devices from this mount. This option returns a value of ENXIO if a failure occurs. If neither dev nor nodev is
specified, dev is the default value.
noguard
Mount the filesystem regardless of the current mountguard setting which would otherwise guard the filesystem against unsupported concurrent mounts
in a PowerHA or other clustering environment. If mountguard is enabled by the chfs or crfs command, the filesystem cannot be mounted if it appears
to be mounted on another node or system. Specifying the noguard option temporarily overrides the mountguard setting.
norbr
Mounts the file system without the release-behind-when-reading capability. If none of the release-behind options are specified, norbrw is the
default value.
norbrw
Mounts the file system without both the release-behind-when-reading and release-behind-when-writing capabilities. If none of the release-behind
options are specified, norbrw is the default value.
norbw
Mounts the file system without the release-behind-when-writing capability. If none of the release-behind options are specified, norbrw is the
default value.
nosuid
Specifies that execution of setuid and setgid programs by way of this mount is not allowed. This option returns a value of EPERM if a failure
occurs. If neither suid nor nosuid is specified, suid is the default value.
rbr
Mount file system with the release-behind-when-reading capability. When sequential reading of a file in this file system is detected, the real
memory pages used by the file will be released once the pages are copied to internal buffers. If none of the release-behind options are specified,
norbrw is the default.
Note: When rbr is specified, the D_RB_READ flag is ultimately set in the _devflags field in the pdtentry structure.
rbw
Mount file system with the release-behind-when-writing capability. When sequential writing of a file in this file system is detected, the real
memory pages used by the file will be released once the pages written to disk. If none of the release-behind options are specified, norbrw is the
default.
Note: When rbw is specified, the D_RB_WRITE flag is set.
rbrw
Mount file system with both release-behind-when-reading and release-behind-when-writing capabilities. If none of the release-behind options are
specified, norbrw is the default.
Note: If rbrw is specified, both the D_RB_READ and the D_RB_WRITE flags are set.
remount
Changes the mount options of a mounted file system. For JFS2 file systems, you can specify the following mount options with the remount option to
change the settings of a mounted file system. For any mount options not specified, no change is made to the current corresponding settings of the
file system.
atime, noatime; dev, nodev; maxpout, minpout; rbr, norbr; rbw, norbw; rbrw, norbrw, rw, ro, rox; suid, nosuid.
Note:
1 External-snapshot mounted file systems cannot be remounted to read-write file systems.
2 You cannot use the rw and ro remount options on a file system that is managed by data management application programming interface (DMAPI).
For NFS, there are three types of mount requests.
duplicate mount
If the node, object, mount point, and the options that are specified in the mount command are the same as those for an existing mount, the
mount command returns information about a successful mount, but a new mount is not created.
new mount
If the remount option is not specified, the mount command creates a new mount. If the node, object, mount point, or the constant options
that are specified in the mount command are different than those for the existing mounts, the mount command fails if the remount option is
specified.
remount
If the node, object, and mount point are the same as those for a top-most mount, but the remount options are different, the remount
operation modifies the mount options of an existing mount. In this case, NFS performs the remount operation.
A top-most mount does not have another mount on top of it. For remount requests, the following options can be modified: acdirmax, acdirmin,
acregmax, acregmin, actimeo, fastattr, grpid, hard, intr, noac, nocto, nodev, nointr, nosuid, posix, retrans, ro, rsize, rw, secure, sec,
soft, timeo, wsize, biods, extraattr, nodircache, prefer, otwattr, maxgroups, and proto. Other options are classified as constant options.
ro
Specifies that the mounted file is read-only, regardless of its previous option specification in the /etc/file systems file or any previous
command-line options. The default value is rw.
rw
Specifies that the mounted file is read/write accessible, regardless of its previous option specification in the /etc/file systems file or any
previous command-line options. The default value is rw.
snapshot
Specifies the device to be mounted is a snapshot. The snapped file system for the specified snapshot must already be mounted or an error message
will display.
snapto=snapshot
Specifies the location to start a snapshot with the value of snapshot when mounting the specified JFS2 file system. The snapshot parameter
specifies the name of an internal snapshot if the snapshot parameter does not included a forward slash (/), that is, no path information.
suid
Specifies that execution of setuid and setgid programs by way of this mount is allowed. If neither suid nor nosuid is specified, suid is the
default value.
upcase
Changes case mapping from default lowercase to uppercase. This is useful for CDROMs using the ISO 9660:1998/HSG standard.
uid=uid
Specifies the UID that is assigned to files in the mount, the default is bin.
wrkgrp=workgroup
Specifies the workgroup that the SMB server belongs.
NFS Specific Options
Item
Description
-o options
Specifies options. Options you enter on the command line should be separated only by a comma, not a comma and a space. The following NFS-specific options
do not apply to all virtual file system types:
acdirmax=n
Holds cached attributes for no more than n seconds after directory update. The default is 60 seconds.
acdirmin=n
Holds cached attributes for at least n seconds after directory update. The default is 30 seconds.
acl
Requests using the Access Control List RPC program for this NFS mount. If the acl option is used, the ACL RPC program is used only if the NFS
server provides it. The default is noacl.
acregmax=n
Holds cached attributes for no longer that n seconds after file modification. The default is 60 seconds.
acregmin=n
Holds cached attributes for at least n seconds after file modification. The default is 30 seconds.
actimeo=n
Sets minimum and maximum times for regular files and directories to n seconds. If this option is set, it overrides any settings for the acregmin,
acregmax, acdirmin, and acdirmax options.
bg
Attempts mount in background if first attempt is unsuccessful. The default value is fg.
biods=n
Sets the maximum number of biod threads that perform asynchronous I/O RPC requests for an NFS mount. The maximum value that can be set is 128.
Values greater than 128 are limited to 128 within the NFS client. The NFS client dynamically manages the number of running biod threads up to the
maximum based on activity. The default maximums for the different NFS protocols are 7 for NFS version 2 and 32 for NFS version 3 and NFS version
4. These defaults are subject to change in future releases.
cio
Specifies the file system to be mounted for concurrent readers and writers. I/O on files in this file system will behave as if they had been
opened with O_CIO specified in the open() system call. Using this option will prevent access in any manner other than CIO. It is impossible to use
cached I/O on a file system mounted with the cio option. This means that mapping commands such as mmap() and shmat() will fail with EINVAL when
used on any file in a file system mounted with the cio option. One side-effect of this is that it is impossible to run binaries out of a cio
mounted file system, since the loader may use mmap().
cior
Specifies to allow read-only files to open in the file system. I/O on files in this file system will behave as if they had been opened with O_CIO
| O_CIOR specified in the open() system call. Using this option will prevent access in any manner other than O_CIO | O_CIOR and read-only. An
attempt to open with O_CIO only will also fail. This option can only be used in conjunction with cio.
dio
Specifies that I/O on the file system will behave as if all the files had been opened with O_DIRECT specified in the open() system call.
Note: Using the -odio or -ocio flags can help performance on certain workloads, but users should be aware that using these flags will prevent file
caching for these file systems. Because readahead is disabled for these file systems, this may decrease performance for large sequential reads.
fastattr
Bypasses the requirement that files currently being written will be sent to the server before the attributes of the file is read. This option is
to be used with caution, since it will cause the client to assume that the file data that has not yet reached the server will be written without
problem. In case of write errors, the client and server will have different opinions on what the size of the file really is. Likewise, a client
will not be aware of attribute changes to the file being made by another client, so this option must not be used in environments where two clients
are writing to the same files.
fg
Attempts mount in foreground if first attempt is unsuccessful. fg is the default value.
grpid
Directs any file or directory created on the file system to inherit the group ID of the parent directory.
hard
Retries a request until server responds. The option is the default value.
intr
Allows keyboard interrupts on hard mounts.
llock
Requests that files lock locally at the NFS client. NFS network file locking requests are not sent to the NFS server if the llock option is used.
maxgroups=n
Indicates that NFS RPC calls using AUTH_UNIX may include up to n member groups of information. Using this option to increase the number of member
groups beyond the RPC protocol standard of 16 will only work against servers that support more than 16 member groups. Otherwise, the client will
experience errors.
Values below 16 or greater than 64 will be ignored. By default, the protocol standard maximum of 16 is adhered to. AIX NFS servers will accept and
process AUTH_UNIX credentials with up to 64 groups starting with AIX 5L Version 5.2 with the 5200-01 Recommended Maintenance package. The actual
number of member groups sent by the NFS client is dependent on the number of groups the involved user is a member of, and may be limited by the
length of the NFS client's hostname (which is included in the AUTH_UNIX information).
noac
Specifies that the mount command performs no attribute or directory caching. If you do not specify this option, the attributes (including
permissions, size, and timestamps) for files and directories are cached to reduce the need to perform over-the-wire NFSPROC_GETATTR Remote
Procedure Calls (RPCs). The NFSPROC_GETATTR RPC enables a client to prompt the server for file and directory attributes. The acregmin, acregmax,
acdirmin, and acdirmax options control the length of time for which the cached values are retained.
noacl
Specifies not to use the Access Control List RPC program for this NFS mount request. The default is noacl.
nointr
Specifies no keyboard interrupts allowed on hard mounts.
port=n
Sets server Internet Protocol (IP) port number to n. The default value is the 2049.
posix
Requests that pathconf information be exchanged and made available on an NFS Version 2 mount. Requires a mount Version 2 rpc.mountd at the NFS
server.
proto=[udp|tcp]
Specifies the transport protocol. The default is tcp. Use the proto=[udp|tcp] option to override the default.
proto=udp cannot be specified if vers=4.
retrans=n
Sets the number of NFS transmissions to n. The default value is 5. The retrans setting determines how many times the NFS client retransmits a
given UDP RPC request to an NFS server for file system operations. The retrans setting is not used during communication with the NFS server
rpc.mountd service when processing NFS version 2 and 3 mounts. Retries to rpc.mountd are controlled with the retry mount option.
retry=n
Sets the number of times the mount is attempted to n; the default value is 1000. When the retry value is 0, the system makes 10,000 attempts.
rsize=n
Sets the read buffer size to n bytes. Beginning with AIX Version 6.1, the default value is 65536 when using Version 3 and Version 4 of the NFS
protocol.
secure
Specifies that the mount command uses Data Encryption Standard (DES) for NFS transactions. Data Encryption Standard (DES) is not supported in NFS
Version 4, use krb5 instead.
sec=flavor[:flavor...]
Specifies a list of security methods that may be used to access files under the mount point. Allowable flavor values are:
sys
UNIX authentication. This is the default method.
dh
DES authentication. Data Encryption Standard (DES) is not supported in NFS Version 4, use krb5 instead.
krb5
Kerberos. Authentication only.
krb5i
Kerberos. Authentication and integrity.
krb5p
Kerberos. Authentication, integrity, and privacy.
The secure option may be specified, but not in conjunction with a sec option. The secure option is deprecated and may be eliminated in a
future release. Use sec=dh instead.
sec=[flavor1:...:flavorn]
The sec option specifies the security flavor list for the NFS mount. The available flavors are des, unix, sys, krb5, krb5i, and krb5p. This option
only applies to AIX 5.3 or later.
shortdev
Specifies that you are mounting a file system from a host that does not support 32-bit device special files.
soft
Returns an error if the server does not respond. The default value is hard.
timeo=n
Sets the Network File System (NFS) time out period to n tenths of a second. For TCP mounts, the default timeout is 100, which equals 10 seconds.
For UDP mounts, the default timeout is 11, which equals 1.1 seconds, but varies depending on the NFS operation taking place. For UDP mounts, the
timeout will increase for each failed transmission, with a maximum value of 20 seconds. Each transmission will be attempted twice, after which the
timeout value is updated. The timeo option does not apply to communication from the NFS client to the rpc.mountd service on NFS servers. A timeout
of 30 seconds is used when making calls to rpc.mountd.
vers=[2|3|4]
Specifies NFS version. The default is the version of NFS protocol used between the client and server and is the highest one available on both
systems. If the NFS server does not support NFS Version 3, the NFS mount will use NFS Version 2. Use the vers=[2|3|4] option to select the NFS
version. By default, the NFS mount will never use NFS Version 4 unless specified. The vers=4 only applies to AIX 5.3 or later.
wsize=n
Sets the write buffer size to n bytes. Beginning with AIX Version 6.1, the default value is 65536 when using Version 3 and Version 4 of the NFS
protocol.
CacheFS Specific Options
The CacheFS-specific version of the mount command mounts a cached file system; if necessary, it NFS-mounts its back file system. It also provides a number of
CacheFS-specific options for controlling the caching process.
To mount a CacheFS file system, use the mount command with the -V flag followed by the argument. The following mount flags are available.
The following arguments to the -o flag are specifically for CacheFS mounts. Options you enter on the command line should be separated only by a comma, not a
comma and a space.
Note: The backfstype argument must be specified.
Item
Description
-o
Specifies options.
acdirmax=n
Specifies that cached attributes are held for no more than n seconds after directory update. Before n seconds, CacheFS checks to see if the
directory modification time on the back file system has changed. If it has, all information about the directory is purged from the cache and new
data is retrieved from the back file system. The default value is 60 seconds.
acdirmin=n
Specifies that cached attributes are held for at least n seconds after directory update. After n seconds, CacheFS checks to see if the directory
modification time on the back file system has changed. If it has, all information about the directory is purged from the cache and new data is
retrieved from the back file system. The default value is 30 seconds.
acregmax=n
Specifies that cached attributes are held for no more than n seconds after file modification. After n seconds, all file information is purged from
the cache. The default value is 30 seconds.
acregmin=n
Specifies that cached attributes are held for at least n seconds after file modification. After n seconds, CacheFS checks to see if the file
modification time on the back file system has changed. If it has, all information about the file is purged from the cache and new data is
retrieved from the back file system. The default value is 30 seconds.
actimeo=n
Sets acregmin, acregmax, acdirmin, and acdirmax to n.
backfstype=file_system_type
The file system type of the back file system (for example, nfs).
backpath=path
Specifies where the back file system is already mounted. If this argument is not supplied, CacheFS determines a mount point for the back file
system.
cachedir=directory
The name of the cache directory.
cacheid=ID
ID is a string specifying a particular instance of a cache. If you do not specify a cache ID, CacheFS will construct one.
demandconst
Enables maximum cache consistency checking. By default, periodic consistency checking is enabled. When you enable demandconst, it checks on every
read and write.
Note: If this option is used the first time a specific CacheFS is mounted, then the option must also be specified for subsequent mounts. There is
state information stored in the cache control files that enforces consistent use of this option.
local_access
Causes the front file system to interpret the mode bits used for access checking instead or having the back file system verify access permissions.
Do not use this argument with secure NFS.
noconst
Disables cache consistency checking. By default, periodic consistency checking is enabled. Specify noconst only when you know that the back file
system will not be modified. Trying to perform cache consistency check using cfsadmin-s will result in error. demandconst and noconst are mutually
exclusive.
Note: If this option is used the first time a specific CacheFS is mounted, then the option must also be specified for subsequent mounts. There is
state information stored in the cache control files that enforces consistent use of this option.
purge
Purges any cached information for the specified file system.
Note: If this option is used the first time a specific CacheFS is mounted, then the option must also be specified for subsequent mounts. There is
state information stored in the cache control files that enforces consistent use of this option.
rw | ro
Read-write (default) or read-only.
suid | nosuid
Allows (default) or disallows set-uid execution
write-around | non-shared
Writes modes for CacheFS. The write-around mode (the default) handles writes the same as NFS does; that is, writes are made to the back file
system, and the affected file is purged from the cache. You can use the non-shared mode when you are sure that no one else will be writing to the
cached file system.
Note: If this option is used the first time a specific CacheFS is mounted, then the option must also be specified for subsequent mounts. There is
state information stored in the cache control files that enforces consistent use of this option.
mfsid
Turns on global view. In NFS v4 system, you can traverse through the exported namespace on the server side. You need to specify this option to go
over the file system.
Restriction: mfsid is an option if the backend file system for CacheFS is NFS v4.
-V
Mounts a CacheFS file system.
Security
Attention RBAC users and Trusted AIX users: This command can perform privileged operations. Only privileged users can run privileged operations. For more
information about authorizations and privileges, see Privileged Command Database in Security. For a list of privileges and the authorizations associated with
this command, see the lssecattr command or the getcmdattr subcommand.
Examples
1 To list the mounted file systems, enter the following command:
mount
This command produces output similar to the following:
node mounted mounted over vfs date options
---- ------- ------------ --- ------------ -------------------
/dev/hd0 / jfs Dec 17 08:04 rw, log =/dev/hd8
/dev/hd3 /tmp jfs Dec 17 08:04 rw, log =/dev/hd8
/dev/hd1 /home jfs Dec 17 08:06 rw, log =/dev/hd8
/dev/hd2 /usr jfs Dec 17 08:06 rw, log =/dev/hd8
sue /home/local/src /usr/code nfs Dec 17 08:06 ro, log =/dev/hd8
For each file system, the mount command lists the node name, the device name, the name under which it is mounted, the virtual-file-system type, the date
and time it was mounted, and its options.
2 To mount all default file systems, enter the following command:
mount >all This command sequence mounts all standard file systems in the /etc/file systems file marked by the mount=true attribute.
3 To mount a remote directory, enter the following command:
mount >-n nodeA /home/tom.remote /home/tom.local This command sequence mounts the /home/tom.remote directory located on nodeA onto the local
/home/tom.local directory. It assumes the default VfsName parameter=remote, which must be defined in the /etc/vfs file.
4 To mount a file or directory from the /etc/file systems file with a specific type, enter the following command:
mount >-t remote This command sequence mounts all files or directories in the /etc/file systems file that have a stanza that contains the type=remote
attribute.
5 To CacheFS-mount the file system which is already NFS-mounted on /usr/abc, enter the following command:
mount -V cachefs -o backfstype=nfs,backpath=/usr/abc,
cachedir=/cache1 server1:/user2 /xyz
The lines similar to the following appear in the /etc/mnttab file after the mount command is executed:
server1:/user2 /usr/abc nfs
/usr/abc /cache1/xyz cachefs backfstype=nfs
6 To mount a snapshot, enter the following command:
mount -o snapshot /dev/snapsb /home/janet/snapsb
This command mounts the snapshot contained on the /dev/snapsb device onto the /home/janet/snapsb directory.
7 To mount a file system and create a snapshot, enter the following command:
mount -o snapto=/dev/snapsb /dev/sb /home/janet/sb
This command mounts the file system contained on the /dev/sbdevice onto the /home/janet/sb directory and creates a snapshot for the file system on the
/dev/snapsbdevice.
8 To access files on an SMB server as a local file system, enter the following command:
mount -v cifs -n pezman/user1/pass1 -o uid=201,fmode=750 /home /mnt
9 To remount the mounted read-only JFS2 file system to a read-write file system, enter the following command:
mount o remount,rw fsname
Files
Item
Description
/etc/file systems
Lists the known file systems and defines their characteristics.
/etc/vfs
Contains descriptions of virtual-file-system types.
xxxxxxxx
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/16163290/viewspace-1654133/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- AIX掛載NFSAINFS
- C++ NFS掛載C++NFS
- nfs掛載及開啟自動掛載NFS
- 如何使用 autofs 掛載 NFS 共享NFS
- NFS的常用掛載引數NFS
- Linux下NFS掛載NAS方式LinuxNFS
- CentOS 6 NFS 共享檔案與掛載CentOSNFS
- Oracle RAC NFS掛載檔案系統OracleNFS
- macOS 下NFS 檔案系統掛載MacNFS
- 配置基於LINUX的NFS掛載LinuxNFS
- 關於開發板的nfs掛載NFS
- Solaris10(SPARC)下掛載NFS空間出錯:nfs mount: Not ownerNFS
- 【AIX】AIX 開機自動掛載NFS共享AINFS
- nfs 掛載目錄 root 許可權不夠 ?NFS
- 目標板掛載NFS方法及錯誤解決NFS
- 【Linux】在多臺linux 之間掛載nfsLinuxNFS
- linux-掛載NFS網路檔案系統教程LinuxNFS
- 【linux】NFS伺服器設定及mount命令掛載LinuxNFS伺服器
- NFS-mount 如何進行跨伺服器檔案掛載NFS伺服器
- 遠端掛載NFS共享目錄引發當機問題NFS
- RAC環境歸檔NFS掛載方式RMAN備份錯誤NFS
- 【linux 】伺服器異常down 機 NFS掛載失敗Linux伺服器NFS
- 【linux】伺服器異常down機NFS掛載失敗Linux伺服器NFS
- WINDOWS2016想要使用NFS掛載,但是沒有NFS服務,無法使用mount命令WindowsNFS
- NFS奇怪問題1 - NFS無法工作,服務重啟失敗,掛載目錄變成問號。NFS
- VFS: Cannot open root device “nfs“ or unknown-block(2,0): error -6 NFS掛載不上,核心配置問題devNFSBloCError
- 無線多作業系統啟動之uInitrd階段NFS掛載篇作業系統UINFS
- 作業八-實現DR跨網段模式和nfs自動掛載模式NFS
- NFS掛載時出現”access denied by server while mounting”的解決方法NFSServerWhile
- Redhat Linux兩臺主機之間設定NFS掛載的步驟RedhatLinuxNFS
- 阿里雲伺服器Ubuntu 14.04.2和centos7.5實現nfs掛載阿里伺服器UbuntuCentOSNFS
- AIX 下NFS掛載出錯解決 : 1831-011 access deniedAINFS
- centos6.x 多伺服器資料夾掛載共享伺服器nfs配置教程CentOS伺服器NFS
- linux系統之間透過nfs網路檔案系統掛載設定方法LinuxNFS
- Linux掛載--什麼是掛載Linux
- linux下掛載(mount)光碟映象檔案、行動硬碟、U盤、Windows和NFS網路共享Linux硬碟WindowsNFS
- Docker 掛載Docker
- CentOS7.X磁碟掛載及取消掛載CentOS