In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Network Security >
Share
Shulou(Shulou.com)06/01 Report--
NFS client mount parameter list
You can obtain the default mount parameters in the directory mounted by grep on the NFS client. The command is as follows:
[root@nginx01 wp-content] # grep uploads / proc/mounts 172.16.1.31:/upload/ / application/nginx-1.6.3/html/blog/wp-content/uploads nfs4 rw,\ nosuid,noexec,relatime,vers=4,rsize=131072,wsize=131072,namlen=255,hard,proto=tcp,port=0\, timeo=600,retrans=2,sec=sys,clientaddr=172.16.1.13,minorversion=0,local_lock=none,\ addr=172.16.1.31 00
Parameter function default parameter
Fg
Bg
When the mount is performed on the client, you can choose whether to perform it in the foreground (fg) or in the background (bg). If executed in the foreground, mount will continue to attempt to mount until it succeeds or the mount time has timed out. If executed in the background, mount will continue to mount many times in the background without affecting other program operations in the foreground. If the network is unstable, or if the server often needs to switch on and off, it is recommended to use bg.
Fg
Soft
Hard
When NFS Client mounts Server with soft, if there is a problem with the network or Server, causing Client and Server to fail to transfer data, Client will keep trying until an error is displayed after timeout. If you use soft mount, it may cause data loss when timeout appears, so it is generally not recommended. If you use hardhardintr to mount the resource timeout using hard, if you specify the intr parameter, you can interrupt it after timeout, which prevents the whole system from being locked by NFS when there is a problem. It is recommended to use intr.
None
Rsize
Wsize
Read (rsize) and write (wsize) block size (block size), this setting can affect the amount of buffered data transferred between the client and the server. Generally speaking, if you are in the local area network (LAN) and both the client and server have enough memory, this value can be set to a larger point, such as 65535 (bytes). Raising the buffer block will improve the transfer capacity of the NFS file system. However, the value set should not be too large, and it is best limited to the maximum value that the network can transmit.
CentOS 5: default
Rsize=1024
Wsize=1024
CentOS 6: default
Rsize=131072
Wsize=131072
Proto=udp uses the UDP protocol to transmit data, which will have better performance in LAN. If you want to cross Internet, multi-transmitted data using proto=tcp will have better error correction capability proto=tcp
Mount-o parameter corresponding option
Parameters.
Parameter meaning system default
Suid
Nosuid
When there are any SUID programs on the mounted file system, you can unset the SUID function suid as long as you use nosuid
Rw
Ro
You can specify whether the inquiry system is read-only (ro) or writable (rw) rw
Dev
Nodev
Can I retain the special functions of the device file? Generally speaking, only / dev will have a special device. You can choose nodevdev at one time.
Exec
Noexec
Do you have permission to execute the file? If you only want to mount a common resource data area (for example, pictures, attachments), you can choose noexecexec
User
Nouser
Do you allow users to mount and uninstall files? If you want to protect the file system, it is best not to provide users with mount and unmount function nouser
Auto
Noauto
This auto refers to the item that will be mounted when "mount-a". If you do not need this partition to be mounted at any time, you can set it to noautoauto.
A Contrastive study of Chinese-English Translation of mount-o parameters
Async: all operations involving file system Ibank O are handled asynchronously, that is, they are not written to disk synchronously. This parameter improves performance but reduces data security. In general, it is not recommended in production environment. Unless there is a high requirement for performance and no requirement for data reliability.
Sync: this parameter is the opposite of async. When there is an Iripple O operation, it will be processed synchronously, that is, the data will be synchronously written to disk. This parameter sacrifices a little bit of Iamp O performance, but in exchange for the security of the data after a power outage.
Atime: the inode timestamp of the accessed file is updated synchronously with each data access, which is the default option. In the case of high concurrency, it is recommended to cancel this default item by explicitly adding notime, so as to improve the performance of notime O and optimize it.
Noatime: the inode timestamp of the file is not updated when accessing the file. In high concurrency environments, it is recommended to explicitly apply this option to improve the performance of the system.
Ro: Mount a file system as read-only.
Rw: Mount a file system in a writable manner.
Auto: can be automatically mounted through the-an option.
Noauto: the file system is not automatically mounted.
Defaults: this is the default value in fstab, including rw, suid, dev, exec, auto, nouser, async. Most of the defaults are default values.
Exec: allows the file system to execute binaries. Canceling this parameter can improve system security.
Noexec: it is not allowed to execute any binary programs directly in the mounted file system. Note that it is only valid for binary programs. If noexec and shell,php programs are set up in time, they can be executed.
Nodiratime: do not update the derectory inode timestamp on the file system, high concurrency environment. It is recommended to use this option explicitly to improve the performance of the system.
Nosuid: the set-user-identifier or set-group-identifier bit is not allowed to take effect.
Suid: allow the set-user-identifier or set-group-identifier bit to take effect.
Nouser: prevents an ordinary user from mounting the file system, which is the default option when mounting the file system by default.
Remount: try to remount a mounted file system, which is usually used to change the mount flag of a file system to make a read-only file system writable. This action does not change the device or mount the point. When you enter single or rescue mode to repair the system when the system fails, you will find that the root file system often becomes a read-only file system, and modification is not allowed, so this command comes in handy. The specific command is: mount-o remount,rw/, means to remount the root file system to make it writable. This command is important when repairing the system in single or rescue mode.
Dirsync: writes to disk synchronously when the directory is updated.
Update directories and file timestamps are prohibited from mounting. The command is as follows:
Mount-t nfs-o noatime,nodiratime 172.16.1.31:/data / mnt
The mounting methods of security and optimization are as follows:
Mount-t nfs-o nosuid,noexec,nodev,noatime,nodiratime,intr,rsize=131072,wsize=131072\ 172.16.1.31:/data / mnt
Default mount method:
Mount-t nfs-o 172.16.1.31:/data / mnt
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.