- 7th Jan 2022
- 03:29 am
RAID or Redundant Array of Independent Disks
1. RAID or Redundant Array of Independent Disks is a way of storing the same data in different places on multiple hard disks or solid-state drives to protect data in the case of a drive failure.
RAID-1: Also known as disk mirroring, this configuration consists of at least two drives that duplicate the storage data. There is no striping. Read performance is improved since either disk can be read at the same time. Write performance is the same as for single storage.
RAID-3: This technique uses striping and dedicates one drive to storing parity information. The embedded ECC information is used to detect errors. Data recovery is accomplished by calculating the exclusive information recorded on the other drives. Since an I/O operation addresses all the drives at the same time, RAID-3 cannot overlap I/O. For this reason, RAID-3 is best for single-user systems with long record applications.
2. An inode in a UNIX file system is a data structure that stores various information about a file in Linux, such as the access mode (read, write, execute permissions), ownership, file type, file size, group, number of links, etc.
The ext2 inode contains the following fields :
? Mode - It states what does this inode describe and the permissions that users have to it.
? Owner Information - The user and group identifiers of the owners of this file or directory.
? Size - Size of the file in bytes.
? Timestamps - The time that the inode was created and the last time that it was modified.
? Datablocks - Pointers to the blocks that contain the data that this inode is describing.
The ex2 implements directories as a special kind of file, which contains file names together with the corresponding inode number. It contains :
? Inode number - The inode number for this directory entry. This entry is 4 byte long.
? Entry length - This entry is 2 bytes long and contains the length of this directory entry in bytes.
? Name length - The length of the file name (1 byte).
? File type - The type of the file (1 byte).
? The name of this directory entry.
3. Tree-based directory - The different directories are arranged in a tree of arbitrary height. We can access any directory by specifying its path starting from the root. This allows the user to create their own subdirectories and to organize their files accordingly. This allows for scalability as probability of name collision is less. Also, searching becomes very easy. One particular disadvantage of this system is that if the tree height is very big, then accessing a file may go under multiple directories.
Acyclic-graph based directory - An acyclic graph is a graph with no cycle and allows to share subdirectories and files. The same file or subdirectories may be in two different directories. It is a natural generalization of the tree-structured directory. The advantages of this are that - we can share files and searching is easy due to different-different paths. Disadvantages of this are - we share the files via linking, in case of deletion it may create the problem. If the link is softlink then after deleting the file we left with a dangling pointer. In the case of hardlink, to delete a file we have to delete all the references associated with it.
General graph-based directory - In general graph directory structure, cycles are allowed within a directory structure where multiple directories can be derived from more than one parent directory.
The main problem with this kind of directory structure is to calculate total size or space that has been taken by the files and directories.
4. Some important characteristics of the ext2 file system are -
? Block fragmentation - System administrators usually choose large block sizes for accessing disks because computer applications often deal with large files. As a result, small files stored in large blocks waste a lot of disk space. This problem can be solved by allowing several files to be stored in different fragments of the same block.
? Access control lists - Instead of classifying the users of a file under three classes—owner, group, and others—this list is associated with each file to specify the access rights for any specific users or combinations of users.
? Handling of transparently compressed and encrypted files - These new options, which must be specified when creating a file, allow users to transparently store compressed and/or encrypted versions of their files on disk.
? Logical deletion - An undelete option allows users to easily recover, if needed, the contents of a previously removed file.
? Journaling - Journaling avoids the time-consuming check that is automatically performed on a filesystem when it is abruptly unmounted—for instance, as a consequence of a system crash.
In any ext2 partition, the first block is reserved for the partition boot sector. The rest of the ext2 partition is split into block groups. All block groups in the filesystem have the same size and are stored sequentially. This allows the kernel to easily derive the location of a block group in a disk from its integer index. Moreover, some data structures must fit in exactly one block, while others may require more than one block. Block group splitting reduces file fragmentation, since the kernel tries to keep the data blocks belonging to a file in the same block group, if possible. Every block group contains the following pieces of information:
A copy of the filesystem’s superblock,
A copy of the block group descriptors,
A data block bitmap which is used to identify the free blocks inside the group,
An inode bitmap, which is used to identify the free inodes inside the group,
Inode table: it consists of a series of consecutive blocks, each of which contains a predefined number of inodes. All inodes have the same size: 128 bytes. A 1,024 byte block contains 8 inodes, while a 4,096-byte block contains 32 inodes. In ext2, there is no need to store on disk a mapping between an inode number and the corresponding block number because the latter value can be derived from the block group number and the relative position inside the inode table. For example, suppose that each block group contains 4,096 nodes and that we want to know the address on disk of inode 13,021. In this case, the inode belongs to the third block group and its disk address is stored in the 733rd entry of the corresponding inode table. The inode number is just a key used by the Ext2 Routines to retrieve the proper inode descriptor on disk quickly.
Data blocks, containing files. Any block which does not contain any meaningful information,it is said to be free.
5. fail0verflow has demonstrated the first low-level hack of the PS4, bypassing the console's security and getting it to run a custom version of Linux and Pokemon Emerald. Careful examination of the Fail0verflow 2015 presentation showed that the Fail0verflow crew were running their exploits through the Webkit 1.76 exploit, meaning their console was running on Firmware 1.76 at the time. In the 2016 Presentation, Fail0verflow member Marcan confirmed his PS4 was running on firmware 4.05. Back then, hackers had demonstrated that the PS4 system RAM could be dumped and that the hard drive's file system was accessible. Fail0verflow's work is far, far more advanced - the team hasn't just run unsigned code (any code that runs on PS4 usually requires encryption by Sony itself before it will run) but it has also reverse-engineered a good proportion of the PlayStation 4 hardware and has an intimate understanding of how it works.