Topic 15 – Disk management Flashcards
what is formatting known as within:
- windows
- linux
the “terminology” for this is
- windows
- formatting the disk
- linux
- building a file system
what gain is there for a file system by loading its intermeditae tables into memory
a file system will typically use these to hold the physcal address of eah block for the file
loading this into memory instead of leaving it on disk significantly increases performance
what is the basic syntax to mount a drive using the linux command
mount
for this:
mount -t file-system-type drive-name mount-directory
- -t file-system-type - specifies the file system type (if -t is ommited linux will inspect the partition for the file system type)
- drive-name - specifies the drive name (located in the /dev directory)
- mount-directory - specifies the directory upon which you wish to mount the file system
this disk operation would:
- directory
- same filesystem: A new filename entry is created and the original deleted
- different file system: a copy will be needed if moving to a new file system such as a separate disk drive and then a delete)
- intermediate data structures
- no change
- data blocks
- no change
what effect would a
MOVE disk operation
have on each each of the following
- directory
- intermediate data structures
- data blocks
- directory
- this will hold a file name and a reference to its inode
- inode
- this will hold metadata of the file such as:
- permissions
- ownership
- access time
- will also hold a reference to each block that the file is physically located in
- this will hold metadata of the file such as:

describe the data structure of linux
inodes
describe the linux directory
/dev/block
this linux directory will display all block devices that are currently attached.
The contents will display the block device as its major:minor device id that is used internally by linux.
These files in turn point to there associated file in the /dev directory
to deliver this an OS can use:
- Storing multiple copies of data structures on a disk
- Periodically flushing changes to the data structures held in disk
- i.e updating the data structures before the buffer is ready to make an I/O operation
- Journaling
name 3 methods upon which operating systems implement in order to
deliver a robust file system
explain the difference between a
partition table and a file system on a disk
- partition table
- is created by a partition scheme such as MBR and will reference any created partitions and where they are located
- file system
- this will occupy the disk and partitions it will include its own data structures that are used to reference the location of files
what is
GUID Partition Table (GPT)
a formatting scheme that allows for more flexibility such as a wider range of partition types
what effect would a
RENAME disk operation
have on each each of the following
- directory
- intermediate data structures
- data blocks
this disk operation:
- directory
- The filename entry is updated
- intermediate data structures
- no change
- data blocks
- no change
this is a file that contains details and options for any drives and partitions.
There are many options but a primary use is to configure drives here so they can be mounted on demand or on every boot
note
the option default is configured with many “default” options already set such as auto that means it will be mounted at boot time automatically
describe the linux directory
/etc/fstab
this linux command is used to mount a file system to the root directory hierarchy
describe the linux command
mount
what is the size of an
inode
this has the size of 1 block
(typically 512 bytes)
before taking this action you must create a new directory upon which to perform this on
the reason is that once this action is performed any files or directories within said directory will become inaccessible
what action should you perform
before mounting a file sytem to a directory and why
this is the act of placing a file system onto a disks partition
what is
formatting
this is a record held by the file system that holds changes that will be made
in the event of a power failure or crash this can be referenced in order to start a repair and carry out the tasks that didnt complete
what is
journaling
name 3 methods upon which operating systems implement in order to
deliver a robust file system
to deliver this an OS can use:
- Storing multiple copies of data structures on a disk
- Periodically flushing changes to the data structures held in disk
- i.e updating the data structures before the buffer is ready to make an I/O operation
- Journaling
what is the
Linux virtual file system (VFS)
this is a virtual files system that linux provides
it is a software layer that sits on top of all physical file systems
it provides common operations to the userspace such as open(2), stat(2), chmod(2), and similar system calls and aslo alllows different specific file systems to replace or supplement this with additional functionality
describe the
execution process of using extents
- the directory is looked at for the file name
- the file name holds a reference with it to its intermedite table (inode for linux)
- the intermediate table will reference the start and length of every extent
this has the size of 1 block
(typically 512 bytes)
what is the size of an
inode
within linux what will all attached devices be given and where can these attached devices be found
within linux:
- these are named by the OS
- they can be found within /dev directory
for this:
mount -t file-system-type drive-name mount-directory
- -t file-system-type - specifies the file system type (if -t is ommited linux will inspect the partition for the file system type)
- drive-name - specifies the drive name (located in the /dev directory)
- mount-directory - specifies the directory upon which you wish to mount the file system
what is the basic syntax to mount a drive using the linux command
mount
describe the linux command
mkfs
this stands for make file system and is used to build a file system on a disk or partitions
within linux:
- these are named by the OS
- they can be found within /dev directory
within linux what will all attached devices be given and where can these attached devices be found
describe the data structure of
extents
- directory
- this will hold the file name and its reference to an intermediate table
- intermediate table (inode for linux)
- this will hold the start and the length of every extent on disk

wha is an
extent
this is extent is a run of contigious blocks
these include:
- Mkfs.type disk-location
- Mkfs -t type disk-location
- type -* the type of file system to build on the disk or partition
- disk-location* - the location of the disk which will be located inside the /dev directory
describe two syntaxes for formatting a disk within the linux terminal
using mkfs
this can be mounted to any directory within linux
however the conventional directory is /mnt
what locations can a new file system be mounted to in linux
what is
Contiguous allocation
this is a method of allocating disk blocks to a file in an unbroken sequence
describe the basic sysntax for the linux command
chown
this will be:
Chown user:group file
- user:group - specifies the user and group that ownership is to be transferred to (if group is ommitted it is left unchanged)
- file - specidies the file upon which the action will take place
what is
journaling
this is a record held by the file system that holds changes that will be made
in the event of a power failure or crash this can be referenced in order to start a repair and carry out the tasks that didnt complete
give an example of
journaling in action
if a file is deleted then the first task is to delete the reference in the directory then the second task is to delete its Inode
if a power failure happened between these steps then journaling provides a way of ensuring that the inode is removed if journaling were not used then the inode would remain and disk space has been wasted (storage leak)
this is a CLI utility program within linux that can be used to create and manipulate partition tables on a disk
describe the linux command
fdisk
this includes
- A free space list is created
- Using a FAT based system a FAT table will be created
- A root directory is created using a block from the free space list
- The root directory is recorded in the FAT or inode
- The location of the root directory is recorded in the VBR which itself is held in the first sector of the disk (this means the OS can always get access to the root directory from here)
describe the five steps that take place under the hood when formatting a disk with the FAT file system
what is the linux
naming convention for disk drives
the linux OS will name these in the following way
- name will begin with sd (standing for SCSI drive)
- sd
- the next letter represents the drive and will increment with every drive
- sda
- the next number represents a partition and will increment with every partition on that drive
- sda1
also known as change owner is used to change the ownership of a file
describe the linux command
chown
- advantages
- Files can be allocated disk blocks in any order
- Appending data to a file is trivial
- disadvantages
- Performance can be degraded if files become to fragmented
- as the size of the disk drive grows so to must this table which increases the size needed and the time it takes to read
name 2 advantages and 2 disadvantages of
File Allocation Table (FAT)
name 3 file systems that use
journaling
the file systems that use this are:
- Windows
- new technology file system (NTFS)
- macOS
- apple file system (APFS)
- linux
- extended file system version 4 (EXT4)
describe the linux command
fdisk
this is a CLI utility program within linux that can be used to create and manipulate partition tables on a disk
what is the outcome of typing the linux command
df -T-a
this provides a longer list of mount points
although most will be directories and files that support the /sys direcory and provide information about the system and so take up 0 space
this will display a more detailed list of free space on present file systems such as the type of file system being used
what is the outcome of typing the linux command
df -T
how do the following
mount different file systems such as drives and partitions
- windows
- linux
to accomplish this:
- windows
- will require each new file system to have a drive letter and a new file hierarchy will be created for each file system
- linux
- file systems are named by linux and they will be mounted to a single directory hierarchy
the linux file system that uses this is
Extended File System 2 (EXT2)
which linux file system uses pure
inodes
- this is located at sector 0 of the physical disk meaning that any OS will be able to discover this information without knowing anything about the disk format
- information about the format of the disk such as any partitioning and the location of those partitions
where is the
Master Boot Record (MBR)
located and what information does it hold
describe the data structure of linux
inodes
- directory
- this will hold a file name and a reference to its inode
- inode
- this will hold metadata of the file such as:
- permissions
- ownership
- access time
- will also hold a reference to each block that the file is physically located in
- this will hold metadata of the file such as:

in this case indirect inodes are created
the first inode will reference indirect inodes which then point to the physical block
this is a scalable system that introduces further layers of indirect blocks to accomidate large files

what happens if a files data
exceeds the size of an inode
name 3
advantages of inodes
- advantages
- these are loaded into memory so finding the files next block is faster than finding the block if the reference stayed on disk
- Are flexible and can accommodate files of great size by extending the blocks via indirect blocks
- Data blocks can be kept anywhere on secondary storage
this will store data in an unbroken sequence of blocks on disk
Within the directory there will be a reference to the file:
- with its name
- the start of the block
- how many blocks it has allocated to it

describe the data structure of
Contiguos allocation
including the directory structure
no this behaivour is not default
in order to maintain the mounted drive you must add a listing to the /etc/fstab configuration file
does a mounted file system remain mounted upon a reboot
this stands for Temporary file system (Tmpfs)
this is a a file system that keeps all of its data stored on ram and appears as a mounted file system
what is the
tmpfs
file system that can be seen from the output of commands such as df
- directory
- this will hold the file name and the starting block for the file
- FAT table
- this holds a reference for the next block of data to be read for the file

describe the data structure of
File Allocation Table (FAT)
the effect of this disk operation would be:
- directory
- The entry is removed
- intermediate data structures
- Inode if used is moved to a list of free blocks
- data blocks
- Moved to a list of free blocks, data may remain though
what effect would a
DELETE disk operation
have on each each of the following
- directory
- intermediate data structures
- data blocks
describe the data structure of
Contiguos allocation
including the directory structure
this will store data in an unbroken sequence of blocks on disk
Within the directory there will be a reference to the file:
- with its name
- the start of the block
- how many blocks it has allocated to it

this linux directory will display all block devices that are currently attached.
The contents will display the block device as its major:minor device id that is used internally by linux.
These files in turn point to there associated file in the /dev directory
describe the linux directory
/dev/block
name 2 advantages and 2 disadvantages of
File Allocation Table (FAT)
- advantages
- Files can be allocated disk blocks in any order
- Appending data to a file is trivial
- disadvantages
- Performance can be degraded if files become to fragmented
- as the size of the disk drive grows so to must this table which increases the size needed and the time it takes to read
This is a method for allocating files to disk blocks.
It involves a table that will reference the next block of the file
what is
File Allocation Table (FAT)
what action should you perform
before mounting a file sytem to a directory and why
before taking this action you must create a new directory upon which to perform this on
the reason is that once this action is performed any files or directories within said directory will become inaccessible
which linux file system uses pure
inodes
the linux file system that uses this is
Extended File System 2 (EXT2)
where is the
Master Boot Record (MBR)
located and what information does it hold
- this is located at sector 0 of the physical disk meaning that any OS will be able to discover this information without knowing anything about the disk format
- information about the format of the disk such as any partitioning and the location of those partitions
- advantages
- these are loaded into memory so finding the files next block is faster than finding the block if the reference stayed on disk
- Are flexible and can accommodate files of great size by extending the blocks via indirect blocks
- Data blocks can be kept anywhere on secondary storage
name 3
advantages of inodes
- advantage
- The read head will be able to read all data from start block to the end block at its maximum speed
- Excelllent for media that is read only such as cd-roms and dvds
- If data needs to be appended to a file and there is no room at the end of its last block then the data will have to be placed elsewhere and then appended this leaves gaps and wastes time
name an advantage and disdvantage of
Contiguos allocation
what does the linux command fdisk appear to do but does not actually carry out
can mark a partition with a file system but it does not actually create the file system
it is merely a marker.
To create a file system the mkfs utility program must be used
- partition table
- is created by a partition scheme such as MBR and will reference any created partitions and where they are located
- file system
- this will occupy the disk and partitions it will include its own data structures that are used to reference the location of files
explain the difference between a
partition table and a file system on a disk
a formatting scheme that allows for more flexibility such as a wider range of partition types
what is
GUID Partition Table (GPT)
what is the outcome of typing the linux command
df -T
this will display a more detailed list of free space on present file systems such as the type of file system being used
describe the data structure of
File Allocation Table (FAT)
- directory
- this will hold the file name and the starting block for the file
- FAT table
- this holds a reference for the next block of data to be read for the file

when attaching an already formatted removable media such as a USB drive to a linux system
- is manual mounting required
- where will the usb file system be mounted
when this action occurs:
- manual mounting is not required although under the hood similar steps to manual mounting will take place
- this will be mounted to the /media directory
describe the linux directory
/etc/fstab
this is a file that contains details and options for any drives and partitions.
There are many options but a primary use is to configure drives here so they can be mounted on demand or on every boot
note
the option default is configured with many “default” options already set such as auto that means it will be mounted at boot time automatically
these include:
- Security
- Ownership
- Names and paths
- Common operations such as READ, WRITE
the benefit that this brings for an OS is that it can build modules in a lyered fashion where more fine grain control can be implemented the further down the layers you go
what are
4 commonalities that all file systems will share
and
what benefit does this bring for an OS
this disk operation:
- directory
- The filename entry is updated
- intermediate data structures
- no change
- data blocks
- no change
what effect would a
RENAME disk operation
have on each each of the following
- directory
- intermediate data structures
- data blocks
the steps to accomplish this are:
- partition the disk
- build the file system
- mount the file system
what are the 3 steps required to
setup a new disk drive on linux via the terminal
this will display a list of all current mount points
it is not a very readable output as it is intended to be used by other software
describe the linux directory
/proc/mounts
describe the linux directory
/proc/mounts
this will display a list of all current mount points
it is not a very readable output as it is intended to be used by other software
this linux command will display information about all block devices, such as name, device id, size and type
describe the linux command
Lsblk
what locations can a new file system be mounted to in linux
this can be mounted to any directory within linux
however the conventional directory is /mnt
name an advantage and disdvantage of
Contiguos allocation
- advantage
- The read head will be able to read all data from start block to the end block at its maximum speed
- Excelllent for media that is read only such as cd-roms and dvds
- If data needs to be appended to a file and there is no room at the end of its last block then the data will have to be placed elsewhere and then appended this leaves gaps and wastes time
what effect would a
COPY disk operation
have on each each of the following
- directory
- intermediate data structures
- data blocks
this disk operation:
- directory
- New entry copying the original
- intermediate data structures
- New entry copying the original
- data blocks
- New entry copying the original
what are the 3 steps required to
setup a new disk drive on linux via the terminal
the steps to accomplish this are:
- partition the disk
- build the file system
- mount the file system
also known as an index node is an intermediate reference point for the linux file system that lies between the directory and the actual disk drive
this will hold a files metadata and the files block numbers
what is an
inode
to accomplish this:
- windows
- will require each new file system to have a drive letter and a new file hierarchy will be created for each file system
- linux
- file systems are named by linux and they will be mounted to a single directory hierarchy
how do the following
mount different file systems such as drives and partitions
- windows
- linux
what is
File Allocation Table (FAT)
This is a method for allocating files to disk blocks.
It involves a table that will reference the next block of the file
what are
4 commonalities that all file systems will share
and
what benefit does this bring for an OS
these include:
- Security
- Ownership
- Names and paths
- Common operations such as READ, WRITE
the benefit that this brings for an OS is that it can build modules in a lyered fashion where more fine grain control can be implemented the further down the layers you go
describe the steps of how an
- applcation
- file system module
- I/O module
work together in order to read a file for example
the steps here would include
- the shell/application making an API call to the file system module such as READ
- the file system module runs its READ routine and makes a system call to the I/O module
- the I/O module communicates with the device driver
- the device driver communicates with the disk drive in order to carry out the read operation
Shell > API > File system module > system call > I/O module > device driver > hardware
name 3 file systems that make use of
extents
file systems that use this include:
- Windows NTFS (New Technology File System)
- Extensible file alloaction table (exFAT)
- Linux extended file system version 4 (ext4)
describe the 6 columns of the table structure used by the configuration file
/etc/fstab
- Device: usually the given name or UUID of the mounted device (sda1/sda2/etc).
- Mount Point: designates the directory where the device is/will be mounted.
- File System Type: nothing trick here, shows the type of filesystem in use.
- Options: lists any active mount options. If using multiple options they must be separated by commas.
- Backup Operation: (the first digit) this is a binary system where 1 = dump utility backup of a partition. 0 = no backup. This is an outdated backup method and should NOT be used.
- File System Check Order: (second digit) Here we can see three possible outcomes. 0 means that fsck will not check the filesystem. Numbers higher than this represent the check order. The root filesystem should be set to 1 and other partitions set to 2.
source(An introduction to the Linux /etc/fstab file | Enable Sysadmin (redhat.com))
a file system will typically use these to hold the physcal address of eah block for the file
loading this into memory instead of leaving it on disk significantly increases performance
what gain is there for a file system by loading its intermeditae tables into memory
if a file is deleted then the first task is to delete the reference in the directory then the second task is to delete its Inode
if a power failure happened between these steps then journaling provides a way of ensuring that the inode is removed if journaling were not used then the inode would remain and disk space has been wasted (storage leak)
give an example of
journaling in action
when this action occurs:
- manual mounting is not required although under the hood similar steps to manual mounting will take place
- this will be mounted to the /media directory
when attaching an already formatted removable media such as a USB drive to a linux system
- is manual mounting required
- where will the usb file system be mounted
this is a virtual files system that linux provides
it is a software layer that sits on top of all physical file systems
it provides common operations to the userspace such as open(2), stat(2), chmod(2), and similar system calls and aslo alllows different specific file systems to replace or supplement this with additional functionality
what is the
Linux virtual file system (VFS)
what is an
inode
also known as an index node is an intermediate reference point for the linux file system that lies between the directory and the actual disk drive
this will hold a files metadata and the files block numbers
this will be:
Chown user:group file
- user:group - specifies the user and group that ownership is to be transferred to (if group is ommitted it is left unchanged)
- file - specidies the file upon which the action will take place
describe the basic sysntax for the linux command
chown
can mark a partition with a file system but it does not actually create the file system
it is merely a marker.
To create a file system the mkfs utility program must be used
what does the linux command fdisk appear to do but does not actually carry out
what effect would a
MOVE disk operation
have on each each of the following
- directory
- intermediate data structures
- data blocks
this disk operation would:
- directory
- same filesystem: A new filename entry is created and the original deleted
- different file system: a copy will be needed if moving to a new file system such as a separate disk drive and then a delete)
- intermediate data structures
- no change
- data blocks
- no change
describe the linux command
mount
this linux command is used to mount a file system to the root directory hierarchy
file systems that use this include:
- Windows NTFS (New Technology File System)
- Extensible file alloaction table (exFAT)
- Linux extended file system version 4 (ext4)
name 3 file systems that make use of
extents
what effect would a
DELETE disk operation
have on each each of the following
- directory
- intermediate data structures
- data blocks
the effect of this disk operation would be:
- directory
- The entry is removed
- intermediate data structures
- Inode if used is moved to a list of free blocks
- data blocks
- Moved to a list of free blocks, data may remain though
what is
formatting
this is the act of placing a file system onto a disks partition
this linux command is used to unmount file systems from the directory hierarchy
describe the linux command
umount
note
notice the u
does a mounted file system remain mounted upon a reboot
no this behaivour is not default
in order to maintain the mounted drive you must add a listing to the /etc/fstab configuration file
describe the linux command
Lsblk
this linux command will display information about all block devices, such as name, device id, size and type
describe the linux command
umount
note
notice the u
this linux command is used to unmount file systems from the directory hierarchy
this provides a longer list of mount points
although most will be directories and files that support the /sys direcory and provide information about the system and so take up 0 space
what is the outcome of typing the linux command
df -T-a
this stands for make file system and is used to build a file system on a disk or partitions
describe the linux command
mkfs
describe the linux command
chown
also known as change owner is used to change the ownership of a file
if changes are being made to a file systems directory or an intermediate table while it is held in memory what potential failure could occur
a potential failure that could occur here is data loss or an inaccessible block or blocks
reason being that for any changes to last the change operation must complete and be written to non volatile storage such as secondary storage
the steps here would include
- the shell/application making an API call to the file system module such as READ
- the file system module runs its READ routine and makes a system call to the I/O module
- the I/O module communicates with the device driver
- the device driver communicates with the disk drive in order to carry out the read operation
Shell > API > File system module > system call > I/O module > device driver > hardware
describe the steps of how an
- applcation
- file system module
- I/O module
work together in order to read a file for example
this linux command is used to display the free space of any file systems that are present
describe the linux command
df
this is extent is a run of contigious blocks
wha is an
extent
the file systems that use this are:
- Windows
- new technology file system (NTFS)
- macOS
- apple file system (APFS)
- linux
- extended file system version 4 (EXT4)
name 3 file systems that use
journaling
what happens if a files data
exceeds the size of an inode
in this case indirect inodes are created
the first inode will reference indirect inodes which then point to the physical block
this is a scalable system that introduces further layers of indirect blocks to accomidate large files

what is the
tmpfs
file system that can be seen from the output of commands such as df
this stands for Temporary file system (Tmpfs)
this is a a file system that keeps all of its data stored on ram and appears as a mounted file system
the linux OS will name these in the following way
- name will begin with sd (standing for SCSI drive)
- sd
- the next letter represents the drive and will increment with every drive
- sda
- the next number represents a partition and will increment with every partition on that drive
- sda1
what is the linux
naming convention for disk drives
the “terminology” for this is
- windows
- formatting the disk
- linux
- building a file system
what is formatting known as within:
- windows
- linux
- the directory is referenced and the filename found and its inode number
- its inode is loaded into memory
- an I/O operation then occurs for each disk block within the inode
describe the execution process of the
inode
system used within linux
- Device: usually the given name or UUID of the mounted device (sda1/sda2/etc).
- Mount Point: designates the directory where the device is/will be mounted.
- File System Type: nothing trick here, shows the type of filesystem in use.
- Options: lists any active mount options. If using multiple options they must be separated by commas.
- Backup Operation: (the first digit) this is a binary system where 1 = dump utility backup of a partition. 0 = no backup. This is an outdated backup method and should NOT be used.
- File System Check Order: (second digit) Here we can see three possible outcomes. 0 means that fsck will not check the filesystem. Numbers higher than this represent the check order. The root filesystem should be set to 1 and other partitions set to 2.
source(An introduction to the Linux /etc/fstab file | Enable Sysadmin (redhat.com))
describe the 6 columns of the table structure used by the configuration file
/etc/fstab
- the directory is looked at for the file name
- the file name holds a reference with it to its intermedite table (inode for linux)
- the intermediate table will reference the start and length of every extent
describe the
execution process of using extents
a potential failure that could occur here is data loss or an inaccessible block or blocks
reason being that for any changes to last the change operation must complete and be written to non volatile storage such as secondary storage
if changes are being made to a file systems directory or an intermediate table while it is held in memory what potential failure could occur
- directory
- this will hold the file name and its reference to an intermediate table
- intermediate table (inode for linux)
- this will hold the start and the length of every extent on disk

describe the data structure of
extents
this disk operation:
- directory
- New entry copying the original
- intermediate data structures
- New entry copying the original
- data blocks
- New entry copying the original
what effect would a
COPY disk operation
have on each each of the following
- directory
- intermediate data structures
- data blocks
describe the execution process of the
inode
system used within linux
- the directory is referenced and the filename found and its inode number
- its inode is loaded into memory
- an I/O operation then occurs for each disk block within the inode
describe the five steps that take place under the hood when formatting a disk with the FAT file system
this includes
- A free space list is created
- Using a FAT based system a FAT table will be created
- A root directory is created using a block from the free space list
- The root directory is recorded in the FAT or inode
- The location of the root directory is recorded in the VBR which itself is held in the first sector of the disk (this means the OS can always get access to the root directory from here)
this is a method of allocating disk blocks to a file in an unbroken sequence
what is
Contiguous allocation
describe two syntaxes for formatting a disk within the linux terminal
using mkfs
these include:
- Mkfs.type disk-location
- Mkfs -t type disk-location
- type -* the type of file system to build on the disk or partition
- disk-location* - the location of the disk which will be located inside the /dev directory
describe the linux command
df
this linux command is used to display the free space of any file systems that are present