以 PDF 格式下载本书 (9688 KB)
mount_smbfs(1M)Name | Synopsis | Description | Options | File Attributes | Specifying Values for Attribute Cache Duration Options | Examples | Files | Attributes | See Also | Authors | Notes Name
Synopsis/sbin/mount [-F smbfs] [generic-options] [-o name=value] [-O] resource /sbin/mount [-F smbfs] [generic-options] [-o name=value] [-O] mount-point
/sbin/mount [-F smbfs] [generic-options] [-o name=value]
[-O] resource mount-point
/sbin/umount [-F smbfs] [generic-options] mount-point Description
The mount utility attaches a named resource, resource, to the file system hierarchy at the path name location, mount-point, which must already exist. If mount-point has any contents prior to the mount operation, those contents remain hidden until the resource is unmounted. An authorized user with the SYS_MOUNT privilege can perform a mount operation. Also, a user can perform SMBFS mount operations on a directory the user owns. If the resource is listed in the /etc/vfstab file, you can specify either resource or mount-point as the mount command will consult the /etc/vfstab file for more information. If the -F option is omitted, mount takes the file system type from the entry in the /etc/vfstab file. If the resource is not listed in the /etc/vfstab file, the command line must specify both resource and mount-point. The umount utility detaches a mounted file system from the file system hierarchy. An authorized user with the SYS_MOUNT privilege can perform a umount operation. Also, a user can perform SMBFS unmount operations on a directory the user owns. The network/smb/client service must be enabled to successfully mount a CIFS share. This service is enabled, by default. To enable the service, enter the following svcadm(1M) command:
OperandsThe mount command supports the following operands: Options
See the mount(1M) man page for the list of supported generic-options. File AttributesTo improve smbfs performance, file attributes are cached. File modification times get updated whenever any local modifications occur. However, file access times can be temporarily out-of-date until the cache gets refreshed. The attribute cache retains file attributes on the client. Attributes for a file are assigned a time to be flushed. If the file is modified before the flush time, then the flush time is extended by the time since the last modification (under the assumption that files that changed recently are likely to change soon). There is a minimum and maximum flush time extension for regular files and for directories. Setting actimeo=n sets flush time to n seconds for both regular files and directories. Setting actimeo=n disables attribute caching on the client. This means that every reference to attributes is satisfied directly from the server. While this guarantees that the client always has the latest file attributes from the server, it has an adverse effect on performance through additional latency, network load, and server load. Setting the noac option also disables attribute caching. When smbfs is enhanced to support write caching, this option will have the further effect of disabling that write caching. Specifying Values for Attribute Cache Duration OptionsThe attribute cache duration options are acdirmax, acdirmin, acregmax, acregmin, and actimeo, as described under OPTIONS, above. A value specified for actimeo sets the values of all attribute cache duration options except for any of these options specified following actimeo on a mount command line. For example, consider the following command:
Because actimeo is the last duration option in the command line, its value (1000) becomes the setting for all of the duration options, including acdirmax. Now consider:
Because the acdirmax option follows actimeo on the command line, it is assigned the value specified (10). The remaining duration options are set to the value of actimeo (1000). Examples
Example 1 Mounting an SMBFS ShareThe following example shows how to mount the /tmp share from the nano server in the SALES workgroup on the local /mnt mount point. You must supply the password for the root user to successfully perform the mount operation.
Example 2 Verifying That an SMBFS File System Is MountedThe following example shows how to mount the /tmp share from the nano server on the local /mnt mount point. You must supply the password for the root user to successfully perform the mount operation.
You can verify that the share is mounted in the following ways: Obtain information about the mounted share by viewing the output of the df -k /mnt command.
Example 3 Unmounting a CIFS ShareThis example assumes that a CIFS share has been mounted on the /mnt mount point. The following command line unmounts the share from the mount point.
Files
AttributesSee the attributes(5) man page for descriptions of the following attributes:
See Alsosmbutil(1), mount(1M), mountall(1M), svcadm(1M), acl(2), fcntl(2), link(2), mknod(2), mount(2), stat(2), symlink(2), umount(2), mnttab(4), nsmbrc(4), vfstab(4), attributes(5), pcfs(7FS), smbfs(7FS) AuthorsThis manual page contains material originally authored by Boris Popov, bpATbutya.kz, bpATFreeBSD.org. NotesThe Solaris CIFS client always attempts to use gethostbyname() to resolve host names. If the host name cannot be resolved, the CIFS client uses NetBIOS name resolution (NBNS). By default, the Solaris CIFS client permits the use of NBNS to enable Solaris CIFS clients in Windows environments to work without additional configuration. Since NBNS has been exploited in the past, you might want to disable it. To disable NBNS, set the nbns-enabled service management facility property to false. By default, nbns-enabled is set to true. If the directory on which a file system is to be mounted is a symbolic link, the file system is mounted on the directory to which the symbolic link refers, rather than being mounted on top of the symbolic link itself. Name | Synopsis | Description | Options | File Attributes | Specifying Values for Attribute Cache Duration Options | Examples | Files | Attributes | See Also | Authors | Notes |
|||||||||||||||||