Advantages and disadvantages of each type of layout in pNFS

As I know, Parallel NFS (pNFS) has three types: file layout, block layout and object layout. What are the advantages and disadvantages of each type?


It isn't really a matter of advantages or disadvantages. The access modes are very different, and it's therefore a matter of to what use you are going to put your server.

File mode is the classic mode. Your file system is handled by your server, and lots of NFS clients can use the export at the same time and attach it to their file system with a mount. They need to handle the problem of concurrent accesses to the same files, but it's not very different from multiple programs on the same server.

Block mode is like iSCSI or FC LUNs. Your file system is handled by the client. Usually there is one and only one client. It is basically a hard disk that is physically on another server. It may be possible for several clients to use the same export at the same time (FC LUNs permit that, at least), but for that you'll need to use a cluster-aware file system like GFS, because a normal file system like ext4 will fail badly as soon as a second file system handler starts messing around with the metadata.

Object mode is object mode: there is no file system as far as the client knows. The client applications make requests directly to the server using an object-storage protocol such as Amazon S3. This can be very useful if you are writing your application, but totally useless if you need to install something written to make use of a file system.

I think it is possible for you to mix these modes on the same server, because you can export different volumes. You'd have some volumes exported in file mode, some in block mode, some used for object mode, but a given volume can certainly only be used in a single way.