Introduction to File System Flashcards
What is a File System?
A file system is a set of structured databases that contains file and directories
What are the uses of a File system?
- To store user and system data
- Creation, deletion and modification of files
- Managing disk space
- Control access to files and directories
- Organization of files
What kind of structure does a file system have?
A hierarchical, tree-like structure where internal nodes are directory files and external nodes are non-directory files.
What are i-nodes?
Each file system in UNIX has at least one table that identifies files in it.
The entries in this table are known as i-nodes.
File attributes that I-nodes contain
- Group
- Permission allowed on the table
- Number of links
- The time of the last modification
- The size of byte of the file
- The ID of the device on which the file resides
OS (Unix) associates an i-node to
each file
What are the properties of a file system?
- Files are stored on a disk and they don’t disappear when the user logs off
- Files have name and access permission
- Files can be arranged into complex structures to show their relationship.
List file attributes and explain them
- Name (The only attribute that is readable by humans)
- Identifier (Unique number given to each file in a file system)
- Location (The location of the file in the drive)
- Size (The size of the file)
- Protection (assigns and controls read, write, and execute permissions of a file)
- Time, date and security (used for protection, security and monitoring)
What is partitioning?
Partitioning is splitting a disk into several regions so they can be used as separate disks
Why do we use partitions?
Because we don’t want to use the disk as a single unit with a single function
What are the partitioning schemes?
- Master Boot Record (MBR) scheme
- Guid Partition Table (GPT) scheme
What is firmware?
A Firmware is a software that is embedded into an electronic device to provide low-level control.
What information does MBR partitioning contain?
- The boot loader (a simple program to initiate the boot process)
- The partition table (information about your partition)
MBR partitioning
Is a partitioning scheme where the first sector of the disk contains essential data for booting up your system.
GPT partitioning
Is a partitioning scheme where all its partitions are given a globally unique identifier.
What is the difference between MBR and GPT?
- On MBR you can have only 4 primary partitionings while in GPT you can have unlimited partitioning or 128 partitioning on Windows.
- GPT can not work as the primary drive of a system that is legacy-based while MBR can
Windows FS
FAT32, NTFS
Linux FS
ext2, ext3, and ext4
Mac OS FS
HFS, HFS+, and APFS
Portable storage devices(hard disks, USB drives) FS
exFAT
Which OS used FAT?
MS-DOS and Windows 9x
Which OS use NTFS?
Windows NT family(2000, XP, Vista, 7, 10, etc.)
Why use NTFS over FAT?
- Supports bigger files
- Allowing longer filenames
- Data encryption
- Access management
- Journaling
Why use exFAT over NTFS?
Because you can only read the contents of a non-Windows environment in NTFS while exFAT supports read and write.
Which FS is designed for platform compatibility?
exFAT
What is EXT4 and Explain its benefits?
EXT4 is a file system made for Linux OS with journaling capabilities.
EXT4 is the default FS for most Linux distributions.
Supports files and file systems up to 16 terabytes in size.
Supports an unlimited number of sub-directories.
What is the Linux command used to list your ext4-formatted partitions?
findmnt -t ext4
How to create a file system
mkfs FS partition name or device name
How do you create an ext4 FS?
mkfs -t ext4 /dev/sdal
Attributes of ZFS FS
- Pooled storage
- Copy-on-write
- Snapshots
- Data integrity verification and automatic repair
- RAID-Z
- Maximum 265 Quadrillion Zettabytes of storage
What is pool Storage?
using multiple disks.
What is Copy-on Write?
When data is overwritten it keeps the new information on a different block and then the file system metadata points to it when the writing is finished.
This helps so that data won’t be lost forever.
What is a Snapshot?
Snapshots are designed to track file changes, but not the addition and creation of files.
What are Data integrity verification and automatic repair
Whenever new data is written to ZFS, it creates a checksum for that data.
When that data is read, the checksum is verified.
If the checksum does not match, then ZFS knows that an error has been detected and will then automatically attempt to correct the error.
What is RAID-Z
RAID is a way of storing the same data in different places on multiple hard disks or solid-state drives (SSDs) to protect data in the case of a drive failure.
ZFS has its own implementation of RAID: RAID-Z.