分布式系统中的sun network file system

1.     
Objective:

NFS is the foundation of data communication.
It implements reading and writing execution by installing a remote file system,
without the need to transfer a file from one server to another

(l) Broaden the scope of file sharing:

the greatest advantage of NFS lies in
its ability to fuse various file systems, and it does not allow SunOS to expand
with network, on the contrary, it ensures the independence of the operating
system, making it is very easy for heterogeneous machines and heterogeneous
operating systems to access the network and realize communication;

(2) The simplicity of fault recovery:

NFS realize file sharing by installing
remote files from the client to the server, which requires minimize the impact
of the current file transfer problem when any of its machines fails. Main
solution is to set that its protocol is stateless.

(3) The simplicity of the remote file
sharing:

if NFS is designed not simpler than
the existing software can realize the remote file sharing, then it is difficult
to accept, NFS guarantee visit remote file format with local files have no
obvious difference, do not need to file for the actual transmission, also don’t
need to compile and link the remote file

2.     
Security:

NFS is stateless – each RPC must include authentication
information. By default, the Sun RPC Protocol requires a user id and group id.
This has been extended to support encryption

NFS has no real user authentication mechanism, but only a procedural
authentication mechanism for RPC/Mount requests

Kerberos protocol is mainly used for Authentication, its
characteristic is a client need  to input
the information of authentication once, and the client can use ticket -
granting ticket access to multiple services, namely the SSO (Single Sign On).
Because establishing a Shared key between the Client and the Service, it is
safe.

3.     
Naming

Naming schemes enforce a separation of concerns between the
logical objects that we work with and the corresponding physical objects.

Location transparency – file name does not reveal the file’s
physical storage location. File name still denotes a specific, although hidden,
set of physical disk blocks. It is a convenient way to share data. It can
expose correspondence between component units and machines.

Location independence – file name does not
need to be changed when the file’s physical storage location changes. Better
file abstraction. It promotes sharing the storage space itself. It separates
the naming hierarchy from the storage-devices hierarchy.

In Sun’s NFS, Remote directories are generally
mounted to the /mnt/nfs directory. Once mounted, you can access the remote
files in exactly the same way as the local files. It is known as access
transparency. Access transparency requires that a common set of operations be
used for both local and remote file management

4.     
The file access
model:

Distributed File Systems require mechanisms for accessing remote
files.

i.           
Advantages: Not
requiring much space on the clients Eliminates the need to pull in entire files
when only small pieces are needed

ii.           
Disadvantages:
Accessing the same data repeatedly (caching can deal with this)

There are two basic approaches:

i.           
Upload/Download
Model: Downloads the whole file to the client, modifies it and then uploads it
back to the server.

Advantages: Simple file service interface

Disadvantages: Enough storage must be
available on the client Moving the whole file is sometimes wasteful! Particularly
for large files.

ii.           
Remote Access
Model: Download only the bits that you need, and send back the bits that you
change.

Advantages: Not requiring much space on the
clients Eliminates the need to pull in entire files when only small pieces are
needed

Disadvantages: Accessing the same data
repeatedly (caching can deal with this)

Access to the Remote File System is through
two additional commands:

i.           
ffsmount

Mounts the remote file system specified by the
server address on the local computer with the root of the remote file system
set to the local mount point.

ii.           
ffsunmount

Unmounts the remote file system that was
previously mounted at the specified local mount point.

5.     
Cache update:

The
adopted policy is: If the freshness property is true, then attempt the
operation. If the freshness property is false, retrieve the server timestamp
™ and perform a timestamp check. If the timestamp check fails, then retrieve
an up-to-date copy of the cached file page.

i.           
Write-through –
write data through to disk as soon as they are placed on any cache. Reliable,
but suffers from poor performance.

ii.           
Delayed-write –
modifications written to the cache and then written through to the server
later. Good Performance; Write accesses complete quickly; some data may be
overwritten before they are written back, and so need never be written at all.
Poor reliability; unwritten data will be lost whenever a user machine crashes.

6.     
Consistency:

Consistency is client-initiated.  The NFS ensure file consistency by checking
validity before every operation.

i.           
Client-initiated
approach

Client initiates a validity check.

Server checks whether the local data is
consistent with the master copy.

ii.           
Server-initiated
approach

Server records, for each client, the (parts
of) files it caches.

When server detects a potential inconsistency,
it must react.

For example, it can turn off caching for the
“offending” file.

First, to solve the update visibility
problem, the client often implements flush-on-close consistency protocol (also
known as close-to-open); In particular, when a client program writes a file and
then closes it, the client will flush all updates to the server with
flush-on-close consistency, and NFS will ensure that later opening the file
from another client will get the latest version of the file. Secondly, in order
to solve the problem of cache invalidation, NFSv2 client will check if the file
has been changed before use cached content, in particular, when open the file,
the client file system will r sends a GETATTR request to the serve for file
attribute information. More importantly, attribute information include the time
of modification last time on the server of the file; If the time is newer than
the time of client cache files , the client will make the cache file unvalued,
and remove it from the client cache, ensure that the following read operation
will be sent to the server, in order to get the latest version of the file, on
the other hand, if the client found the cache file is the latest version, it
will use the cache file, it can improve the performance

7.      NFS is centered around the idea of simple and
fast recovery in the face of server failure, and achieves this end through careful
protocol design.

The benefits of NFS:

i.           
Save
local storage space, the commonly used content stored in an NFS server and can
be Shared through the network, then the local terminal will be able to reduce
the use of their own storage space.

ii.           
Client
does not need to have a storage directory on the every machine in the network.
The Shared directory can be put on the NFS server and can be used by other
server in the network

iii.           
Some
storage device such as floppy disk CDROM and Zip (a kind of high storage density
disk drives and disk) can be used by other machines on the Internet that can
reduce the number of mobile media devices on the network. In another words, it
causing lower total network
overhead. Disk access routines on the server can be optimized if it is known
that requests are always for large, contiguous segments of data, rather than
many requests for random disk blocks.

iv.           
The data stored
in the NFS file system is visible. Provides transparent file access and file
transfer

v.           
In caching, many
remote accesses handled efficiently by the local cache. Therefore, most remote
accesses will be served as fast as local ones.

vi.           
Caching is
superior in access patterns with infrequent writes. With frequent writes,
substantial overhead incurred to overcome cache- consistency problem.

  • 1
    点赞
  • 5
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值