File system is a method for storing and organizing computer files and the data they contain to make it easy to find and access them.
There are different types of file system available
* Disk file systems (EXT2, EXT3,XFS,FAT,NTFS,GFS,OCFS)
* Flash file systems
* Network file systems(NFS)
* Special purpose file systems(proc file system)
Each file system has it own structure.So when different file systems are mounted on the same system, how the user has uniform view.
For example mount different file systems under “/mnt” and then run “ls -lR /mnt”.What happens?
We get the listing of the files, irrespective of the the file-systems.
VFS (Virtual File System) acts as a bridge between the applications and
the real file systems.VFS describes the system’s files in terms of superblocks and inodes in much the same way as the EXT2 file system uses superblocks and inodes.
When each file system is initialized, it registers itself with the VFS.When user /application wants to access any file, it request the VFS and then VFS
calls the file system specific functions/routines to access the requested file.
GFS file system is required when more than one system needs simultaneous access to the shared storage.With files system like EXT3 you can not do this.
Try following:-
– Get the shared storage (From SAN/ iSCSI) and assign is multiple systems
– From one system create EXT3 file system on it.
– Mount the storage to all the system.
– Try to create files on that mount point from one system.
Are the newly created are visible from other system ?
We need to remount the storage on other systems to get a consistent view.
With GFS, clients modify the shared data by accessing it atomically.Before accesing the data client acquires the lock for it,modifies the data and then releases the lock.Clients access storage devices like processors of a shared memory multiprocessor computer (SMP) access memory.Each of the GFS client thinks that it has the full access to the storage and they are unaware of each other.
DLM (Distributed Lock Manager), GULM(Grand Unified Locking Manager), and Nolock are locking protocols which GFS uses.
With RHEL3/4, you can use both DLM/GULM. With RHEL5 you can only use DLM.
Nolock is used when you want to use GFS on a stand alone system.Now why would someone like to do that? GFS allocated inodes dynamically. Each file takes one inode, so if someone has to create too many small files he/she can use GFS. In some file systems inode number are limited.
The network storage pool (NSP) provides each machine with a unified storage address space. A device driver layered on top of SCSI and Fibre Channel drivers implements the NSP. The NSP driver translates from the logical address space of the file system to the address space of each device.Subpools divide NSPs into groups of similar device types. These subpools inherit characteristics from underlying devices and network connections.
GFS organizes file systems into several resource groups (RG). Resource groups distribute file system resources across the entire NSP; multiple resource groups can exist per device. Resource groups are essentially mini-file systems. Each group possesses an information block, data bitmaps, dinodes,and data blocks. Resource group blocks contain information similar to traditional superblocks. In normal operation, resource groups are transparent to users.
References:
http://www.diku.dk/undervisning/2003e/314/papers/soltis97global.pdf
http://en.wikipedia.org/wiki/Global_File_System
http://www.science.unitn.it/~fiorella/guidelinux/tlk/node102.html#SECTION001120000000000000000
Discover more from Neependra Khare
Subscribe to get the latest posts sent to your email.