博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
nfs挂接命令参考
阅读量:2042 次
发布时间:2019-04-28

本文共 12887 字,大约阅读时间需要 42 分钟。

aix挂接linux参考:

mount -v nfs -o rw,bg,hard,rsize=32768,wsize=32768,vers=3,nointr,proto=tcp 192.168.1.1:/test /test

nfso -o -p nfs_use_reserved_ports=1

nfso -a|grep nfs_use_reserved_ports

linux挂接参考:

mount 192.168.1.1:/test /test
mount -t nfs -o rw,bg,hard,rsize=32768,wsize=32768,vers=3,nointr,proto=tcp 192.168.1.1:/test /test

linux挂windows共享
mount -t cifs -o user=xxx,password=xxx,rw,dir_mode=0777,file_mode=0777 //192.168.1.1:/test /test

windows挂接参考:
mount -o nolock -u:root -p:"xxx" 192.168.1.1:/test F:
mount -o nolock -u:administrator -p:"xxx" 192.168.1.1:/test F:

------------------------------------------------------------

RMAN Backups To NFS Slower After Applying Minimal Pack For Database Hosts (Doc ID 1398799.1)

Exadata Database Machine X2-2 Full Rack - Version All Versions and later

Oracle Exadata Storage Server Software - Version 11.2.1.2.0 and later
Oracle Database - Enterprise Edition - Version 11.2.0.2 and later
Oracle Database Cloud Schema Service - Version N/A and later
Oracle Database Exadata Cloud Machine - Version N/A and later
Information in this document applies to any platform.
***Checked for relevance on 04-Aug-2014***

SYMPTOMS

- Applicable to customers who backup via RMAN to an NFS mount.
- After applying a Minimal Pack for Database Hosts patch to Exadata notice that the RMAN backup rate to NFS is much slower.

CHANGES

- Noticed after applying a Minimal Pack for Database Hosts to Exadata.

CAUSE

- During the Minimal Pack for Database Hosts patch apply you are required to dismount any NFS filesystems ( as described in the patch README) but, after the patching is successfully completed check the NFS filesystem was mounted again with the correct NFS options for RMAN.

- Not mounting with the correct NFS options can cause the RMAN backup to NFS performance problem.

SOLUTION

- Remount the filesystem with the correct NFS mount options.

- The recommended options for 11.2.0.2 RMAN backups to NFS are :
 

# mount -o rsize=65536,wsize=65536,hard,actimeo=0,intr,nodev,nosuid -t nfs nodename:/filesystem

 

rw (read/write)
or
ro (read-only)
(default: rw)
Use rw for data that users need to modify. In order for you to mount a directory read/write, the NFS server must export it read/write.
Use ro for data you do not want users to change. A directory that is automounted from several servers should be read-only, to keep versions identical on all servers.
suid
or
nosuid
(default: suid)
Specify suid if you want to allow mounted programs that have setuid permission to run with the permissions of their owners, regardless of who starts them. If a program with setuid permission is owned by root, it will run with root permissions, regardless of who starts it.
Specify nosuid to protect your system against setuid programs that may run as root and damage your system.
hard
or
soft
(default: hard)
Specify hard if users will be writing to the mounted directory or running programs located in it. When NFS tries to access a hard-mounted directory, it keeps trying until it succeeds or someone interrupts its attempts. If the server goes down, any processes using the mounted directory hang until the server comes back up and then continue processing without errors. Interruptible hard mounts may be interrupted with CTRL-C or kill (see the intr option, later).
Specify soft if the server is unreliable and you want to prevent systems from hanging when the server is down. When NFS tries to access a soft-mounted directory, it gives up and returns an error message after trying retrans times (see the retrans option, later). Any processes using the mounted directory will return errors if the server goes down.
intr
or
nointr
(default: intr)
Specify intr if users are not likely to damage critical data by manually interrupting an NFS request. If a hard mount is interruptible, a user may press [CTRL]-C or issue the kill command to interrupt an NFS mount that is hanging indefinitely because a server is down.
Specify nointr if users might damage critical data by manually interrupting an NFS request, and you would rather have the system hang while the server is down than risk losing data between the client and the server.
fg (foreground)
or
bg (background)
(default: fg)
Specify fg for directories that are necessary for the client machine to boot or operate correctly. If a foreground mount fails, it is retried again in the foreground until it succeeds or is interrupted. All automounted directories are mounted in the foreground; you cannot specify the bg option with automounted directories.
Specify bg for mounting directories that are not necessary for the client to boot or operate correctly. Background mounts that fail are retried in the background, allowing the mount process to consider the mount complete and go on to the next one. If you have two machines configured to mount directories from each other, configure the mounts on one of the machines as background mounts. That way, if both systems try to boot at once, they will not become deadlocked, each waiting to mount directories from the other. The bg option cannot be used with automounted directories.
devs
or nodevs
(default: devs)
Specify devs if you are mounting device files from a server whose device files will work correctly on the client. The devs option allows you to use NFS-mounted device files to read and write to devices from the NFS client. It is useful for maintaining a standard, centralized set of device files, if all your systems are configured similarly.
Specify nodevs if device files mounted from a server will not work correctly for reading and writing to devices on the NFS client. The nodevs option generates an error if a process on the NFS client tries to read or write to an NFS-mounted device file.
timeo=n
(default=7)
The timeout, in tenths of a second, for NFS requests (read and write requests to mounted directories). If an NFS request times out, this timeout value is doubled, and the request is retransmitted. After the NFS request has been retransmitted the number of times specified by the retrans option (see below), a soft mount returns an error, and a hard mount retries the request. The maximum timeo value is 30 (3 seconds).
Try doubling the timeo value if you see several server not responding messages within a few minutes. This can happen because you are mounting directories across a gateway, because your server is slow, or because your network is busy with heavy traffic.
retrans=n
(default=4)
The number of times an NFS request (a read or write request to a mounted directory) is retransmitted after it times out. If the request does not succeed after n retransmissions, a soft mount returns an error, and a hard mount retries the request.
Increase the retrans value for a directory that is soft-mounted from a server that has frequent, short periods of down time. This gives the server sufficient time to recover, so the soft mount does not return an error.
retry=n
(default=1)
The number of times the NFS client attempts to mount a directory after the first attempt fails. If you specify intr, you can interrupt the mount before n retries. However, if you specify nointr, you must wait until n retries have been made, until the mount succeeds, or until you reboot the system.
If mounts are failing because your server is very busy, increasing the retry value may fix the problem.
rsize=n
(default=8192)
The number of bytes the NFS client requests from the NFS server in a single read request.
If packets are being dropped between the client and the server, decrease rsize to 4096 or 2048. To find out whether packets are being dropped, issue the nfsstat -rc command at the HP-UX prompt. If the timeout and retrans values returned by this command are high, but the badxid number is close to zero, then packets are being dropped somewhere in the network.
wsize=n
(default=8192)
The number of bytes the NFS client sends to the NFS server in a single write request.
If packets are being dropped between the client and the server, decrease wsize to 4096 or 2048. To find out whether packets are being dropped, issue the nfsstat -rc command at the HP-UX prompt. If the timeout and retrans values returned by this command are high, but the badxid number is close to zero, then packets are being dropped somewhere in the network.
O (Overlay mount)
default: not specified
Allows the file system to be mounted over an existing mount point, making the underlying file system inaccessible. If you attempt to mount a file system over an existing mount point without the -O option, the mount will fail with the error device busy.
Caution: Using the -O mount option can put your system in a confusing state. The -O option allows you to hide local data under an NFS mount point without receiving any warning. Local data hidden beneath an NFS mount point will not be backed up during regular system backups.
On HP-UX, the -O option is valid only for NFS-mounted file systems. For this reason, if you specify the -O option, you must also specify the -F nfs option to the mount command or the nfs file system type in the /etc/fstab file.
remount
default: not specified
If the file system is mounted read-only, this option remounts it read/write. This allows you to change the access permissions from read-only to read/write without forcing everyone to leave the mounted directory or killing all processes using it.
noac
(default: not specified)
If specified, this option prevents the NFS client from caching attributes for the mounted directory.
Specify noac for a directory that will be used frequently by many NFS clients. The noac option ensures that the file and directory attributes on the server are up to date, because no changes are cached on the clients. However, if many NFS clients using the same NFS server all disable attribute caching, the server may become overloaded with attribute requests and updates. You can also use the actimeo option to set all the caching timeouts to a small number of seconds, like 1 or 3.
If you specify noac, do not specify the other caching options
nocto
(default: not specified)
If specified, this option suppresses fresh attributes when opening a file.
Specify nocto for a file or directory that never changes, to decrease the load on your network.
acdirmax=n
(default=60)
The maximum number of seconds a directory's attributes are cached on the NFS client. When this timeout period expires, the client flushes its attribute cache, and if the attributes have changed, the client sends them to the NFS server.
For a directory that rarely changes or that is owned and modified by only one user, like a user's home directory, you can decrease the load on your network by setting acdirmax=120 or higher.
acdirmin=n
(default=30)
The minimum number of seconds a directory's attributes are cached on the NFS client. If the directory is modified before this timeout expires, the timeout period is extended by acdirmin seconds.
For a directory that rarely changes or that is owned and modified by only one user, like a user's home directory, you can decrease the load on your network by setting acdirmin=60 or higher.
acregmax=n
(default=60)
The maximum number of seconds a file's attributes are cached on the NFS client. When this timeout period expires, the client flushes its attribute cache, and if the attributes have changed, the client sends them to the NFS server.
For a file that rarely changes or that is owned and modified by only one user, like a file in a user's home directory, you can decrease the load on your network by setting acregmax=120 or higher.
actimeo=n
(no default)
Setting actimeo to n seconds is equivalent to setting acdirmax, acdirmin, acregmax, and acregmin to n seconds.
Set actimeo=1 or actimeo=3 for a directory that is used and modified frequently by many NFS clients. This ensures that the file and directory attributes are kept reasonably up to date, even if they are changed frequently from various client locations.
Set actimeo=120 or higher for a directory that rarely or never changes.
If you set the actimeo value, do not set the acdirmax, acdirmin, acregmax, or acregmin values.
vers=n
(default=3)
The version of the NFS protocol to use. By default, the local NFS client will attempt to mount the file system using NFS version 3. If the NFS server does not support version 3, the file system will be mounted using version 2.
If you know that the NFS server does not support version 3, specify vers=2, and you will save time during the mount, because the client will not attempt to use version 3 before using version 2.
grpid
default: not specified
Forces a newly created file in the mounted file system to inherit the group ID of the parent directory.
By default, a newly created file inherits the effective group ID of the calling process, unless the GID bit is set on the parent directory. If the GID bit is set, the new file inherits the group ID of the parent directory.

转载地址:http://cisof.baihongyu.com/

你可能感兴趣的文章
Java多线程问题总结
查看>>
js 失去焦点自动计算BMI 保留一位小数
查看>>
js Math.round()
查看>>
java内存中的堆栈、堆、静态区、常量池
查看>>
对接输入输出流;封装拷贝; 封装释放资源
查看>>
装饰器设计模式 :实现放大器对声音的放大动能
查看>>
p15 装饰器设计模式:模拟咖啡
查看>>
sax的解析流程
查看>>
SAX解析xml2
查看>>
简易版server服务器搭建
查看>>
进程和线程的关系与区别
查看>>
C++ STL priority_queue
查看>>
浅谈C++多态性
查看>>
c++(重载、覆盖、隐藏)
查看>>
虚函数的工作原理
查看>>
01背包、完全背包、多重背包问题分析
查看>>
一道位运算的算法题
查看>>
创建型模式之原型模式
查看>>
结构型模式之适配器模式(Adapter)
查看>>
结构型模式之桥接模式(Bridge)
查看>>