INODE
A data structure that stores the below information about a file
----------------------------------
- Size of file
- Device ID
- User ID of the file
- Group ID of the file
- The file mode information and access privileges for owner, group and others
- File protection flags
- The timestamps for file creation, modification etc
- link counter to determine the number of hard links
- Pointers to the blocks storing file’s contents
Inode doesnot store the file name and it is stored seperately, greatest advantage is hardlink can be created for different file name sharing same inode.
Meta data
===========
===========
Its data about a data. Suppose you own a vehicle there are registration and other details of the vehicle that is not the part of it. Metadata gives info like
- File name
- Owner
- Creation date
SUPER BLOCK
============
Metadata describes the structure of the file system. Most common metadata structure are superblock, inode and directories.
- File system type
- Size
- Status
- Information about other metadata structures
- Free inodes and blocks
dumpe2fs /dev/hda3 | grep -i superblock
Primary superblock at 0, Group descriptors at 1-1
Backup superblock at 32768, Group descriptors at 32769-32769
Backup superblock at 98304, Group descriptors at 98305-98305
Backup superblock at 163840, Group descriptors at 163841-163841
Backup superblock at 229376, Group descriptors at 229377-229377
Backup superblock at 294912, Group descriptors at 294913-294913
If superblock is corrupted, execute fsck in backup super block
Example
e2fsck -b 32768 /dev/hda1
Comments
Post a Comment