Thứ Hai, 26 tháng 8, 2013

Kiểm soát timeout khi mount NFS

sudo mount localhost:xxx xxx -o bg,intr,soft,timeo=1,retrans=1,actimeo=1,retry=1

Trong đó:
bg,intr,soft
   bg      If  the  first  NFS  mount  attempt times out, retry the mount in the 
           background.  After a mount operation is backgrounded, all subsequent mounts
           on the same NFS  server  will  be  backgrounded immediately, without first
           attempting the mount.  A missing mount point is treated as a timeout, to
           allow for nested NFS mounts.
   soft    If  an  NFS  file operation has a major timeout then report an I/O error
           to the calling program.  The default is to continue retrying NFS file
           operations indefinitely.
   intr    If  an  NFS  file  operation  has  a major timeout and it is hard mounted,
           then allow signals to interupt the file operation and cause it to return
           EINTR to the calling program.  The default is to not allow file operations
           to be interrupted.
You can in addition set:
timeo=5,retrans=5,actimeo=10,retry=5
which should allow the NFS mount to timeout and make the directory inaccessible if the NFS server drops the connection rather then waiting in retries.
Take a look at this link for more information about NFS mount options


Link tham khảo: http://unix.stackexchange.com/questions/31979/stop-broken-nfs-mounts-from-locking-a-directory

Không có nhận xét nào:

Đăng nhận xét