Topic 15 – Disk management Flashcards

1
Q

what is formatting known as within:

  • windows
  • linux
A

the “terminology” for this is

  • windows
    • formatting the disk
  • linux
    • building a file system
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

what gain is there for a file system by loading its intermeditae tables into memory

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

what is the basic syntax to mount a drive using the linux command

mount

A

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
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

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
A

what effect would a

MOVE disk operation

have on each each of the following

  • directory
  • intermediate data structures
  • data blocks
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q
  • 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
A

describe the data structure of linux

inodes

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

describe the linux directory

/dev/block

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

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
A

name 3 methods upon which operating systems implement in order to

deliver a robust file system

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

explain the difference between a

partition table and a file system on a disk

A
  • 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
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

what is

GUID Partition Table (GPT)

A

a formatting scheme that allows for more flexibility such as a wider range of partition types

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

what effect would a

RENAME disk operation

have on each each of the following

  • directory
  • intermediate data structures
  • data blocks
A

this disk operation:

  • directory
    • The filename entry is updated
  • intermediate data structures
    • no change
  • data blocks
    • no change
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

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

A

describe the linux directory

/etc/fstab

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

this linux command is used to mount a file system to the root directory hierarchy

A

describe the linux command

mount

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

what is the size of an

inode

A

this has the size of 1 block

(typically 512 bytes)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

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

A

what action should you perform

before mounting a file sytem to a directory and why

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

this is the act of placing a file system onto a disks partition

A

what is

formatting

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

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

A

what is

journaling

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

name 3 methods upon which operating systems implement in order to

deliver a robust file system

A

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
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

what is the

Linux virtual file system (VFS)

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

describe the

execution process of using extents

A
  1. the directory is looked at for the file name
  2. the file name holds a reference with it to its intermedite table (inode for linux)
  3. the intermediate table will reference the start and length of every extent
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

this has the size of 1 block

(typically 512 bytes)

A

what is the size of an

inode

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

within linux what will all attached devices be given and where can these attached devices be found

A

within linux:

  • these are named by the OS
  • they can be found within /dev directory
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q

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
A

what is the basic syntax to mount a drive using the linux command

mount

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
23
Q

describe the linux command

mkfs

A

this stands for make file system and is used to build a file system on a disk or partitions

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
24
Q

within linux:

  • these are named by the OS
  • they can be found within /dev directory
A

within linux what will all attached devices be given and where can these attached devices be found

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
Q

describe the data structure of

extents

A
  • 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
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
26
Q

wha is an

extent

A

this is extent is a run of contigious blocks

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
27
Q

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
A

describe two syntaxes for formatting a disk within the linux terminal

using mkfs

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
28
Q

this can be mounted to any directory within linux

however the conventional directory is /mnt

A

what locations can a new file system be mounted to in linux

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
29
Q

what is

Contiguous allocation

A

this is a method of allocating disk blocks to a file in an unbroken sequence

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
30
Q

describe the basic sysntax for the linux command

chown

A

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
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
31
Q

what is

journaling

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
32
Q

give an example of

journaling in action

A

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)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
33
Q

this is a CLI utility program within linux that can be used to create and manipulate partition tables on a disk

A

describe the linux command

fdisk

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
34
Q

this includes

  1. A free space list is created
  2. Using a FAT based system a FAT table will be created
  3. A root directory is created using a block from the free space list
  4. The root directory is recorded in the FAT or inode
  5. 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)
A

describe the five steps that take place under the hood when formatting a disk with the FAT file system

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
35
Q

what is the linux

naming convention for disk drives

A

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
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
36
Q

also known as change owner is used to change the ownership of a file

A

describe the linux command

chown

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
37
Q
  • 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
A

name 2 advantages and 2 disadvantages of

File Allocation Table (FAT)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
38
Q

name 3 file systems that use

journaling

A

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)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
39
Q

describe the linux command

fdisk

A

this is a CLI utility program within linux that can be used to create and manipulate partition tables on a disk

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
40
Q

what is the outcome of typing the linux command

df -T-a

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
41
Q

this will display a more detailed list of free space on present file systems such as the type of file system being used

A

what is the outcome of typing the linux command

df -T

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
42
Q

how do the following

mount different file systems such as drives and partitions

  • windows
  • linux
A

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 well did you know this?
1
Not at all
2
3
4
5
Perfectly
43
Q

the linux file system that uses this is

Extended File System 2 (EXT2)

A

which linux file system uses pure

inodes

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
44
Q
  • 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
A

where is the

Master Boot Record (MBR)

located and what information does it hold

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
45
Q

describe the data structure of linux

inodes

A
  • 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
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
46
Q

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

A

what happens if a files data

exceeds the size of an inode

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
47
Q

name 3

advantages of inodes

A
  • 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
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
48
Q

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
A

describe the data structure of

Contiguos allocation

including the directory structure

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
49
Q

no this behaivour is not default

in order to maintain the mounted drive you must add a listing to the /etc/fstab configuration file

A

does a mounted file system remain mounted upon a reboot

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
50
Q

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

A

what is the

tmpfs

file system that can be seen from the output of commands such as df

51
Q
  • 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
A

describe the data structure of

File Allocation Table (FAT)

52
Q

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
A

what effect would a

DELETE disk operation

have on each each of the following

  • directory
  • intermediate data structures
  • data blocks
53
Q

describe the data structure of

Contiguos allocation

including the directory structure

A

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
54
Q

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

A

describe the linux directory

/dev/block

55
Q

name 2 advantages and 2 disadvantages of

File Allocation Table (FAT)

A
  • 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
56
Q

This is a method for allocating files to disk blocks.

It involves a table that will reference the next block of the file

A

what is

File Allocation Table (FAT)

57
Q

what action should you perform

before mounting a file sytem to a directory and why

A

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

58
Q

which linux file system uses pure

inodes

A

the linux file system that uses this is

Extended File System 2 (EXT2)

59
Q

where is the

Master Boot Record (MBR)

located and what information does it hold

A
  • 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
60
Q
  • 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
A

name 3

advantages of inodes

61
Q
  • 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
A

name an advantage and disdvantage of

Contiguos allocation

62
Q

what does the linux command fdisk appear to do but does not actually carry out

A

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

63
Q
  • 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
A

explain the difference between a

partition table and a file system on a disk

64
Q

a formatting scheme that allows for more flexibility such as a wider range of partition types

A

what is

GUID Partition Table (GPT)

65
Q

what is the outcome of typing the linux command

df -T

A

this will display a more detailed list of free space on present file systems such as the type of file system being used

66
Q

describe the data structure of

File Allocation Table (FAT)

A
  • 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
67
Q

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
A

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
68
Q

describe the linux directory

/etc/fstab

A

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

69
Q

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

A

what are

4 commonalities that all file systems will share

and

what benefit does this bring for an OS

70
Q

this disk operation:

  • directory
    • The filename entry is updated
  • intermediate data structures
    • no change
  • data blocks
    • no change
A

what effect would a

RENAME disk operation

have on each each of the following

  • directory
  • intermediate data structures
  • data blocks
71
Q

the steps to accomplish this are:

  1. partition the disk
  2. build the file system
  3. mount the file system
A

what are the 3 steps required to

setup a new disk drive on linux via the terminal

72
Q

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

A

describe the linux directory

/proc/mounts

73
Q

describe the linux directory

/proc/mounts

A

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

74
Q

this linux command will display information about all block devices, such as name, device id, size and type

A

describe the linux command

Lsblk

75
Q

what locations can a new file system be mounted to in linux

A

this can be mounted to any directory within linux

however the conventional directory is /mnt

76
Q

name an advantage and disdvantage of

Contiguos allocation

A
  • 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
77
Q

what effect would a

COPY disk operation

have on each each of the following

  • directory
  • intermediate data structures
  • data blocks
A

this disk operation:

  • directory
    • New entry copying the original
  • intermediate data structures
    • New entry copying the original
  • data blocks
    • New entry copying the original
78
Q

what are the 3 steps required to

setup a new disk drive on linux via the terminal

A

the steps to accomplish this are:

  1. partition the disk
  2. build the file system
  3. mount the file system
79
Q

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

A

what is an

inode

80
Q

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
A

how do the following

mount different file systems such as drives and partitions

  • windows
  • linux
81
Q

what is

File Allocation Table (FAT)

A

This is a method for allocating files to disk blocks.

It involves a table that will reference the next block of the file

82
Q

what are

4 commonalities that all file systems will share

and

what benefit does this bring for an OS

A

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

83
Q

describe the steps of how an

  • applcation
  • file system module
  • I/O module

work together in order to read a file for example

A

the steps here would include

  1. the shell/application making an API call to the file system module such as READ
  2. the file system module runs its READ routine and makes a system call to the I/O module
  3. the I/O module communicates with the device driver
  4. 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

84
Q

name 3 file systems that make use of

extents

A

file systems that use this include:

  • Windows NTFS (New Technology File System)
  • Extensible file alloaction table (exFAT)
  • Linux extended file system version 4 (ext4)
85
Q

describe the 6 columns of the table structure used by the configuration file

/etc/fstab

A
  • 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))

86
Q

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

A

what gain is there for a file system by loading its intermeditae tables into memory

87
Q

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)

A

give an example of

journaling in action

88
Q

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
A

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
89
Q

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

A

what is the

Linux virtual file system (VFS)

90
Q

what is an

inode

A

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

91
Q

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
A

describe the basic sysntax for the linux command

chown

92
Q

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

A

what does the linux command fdisk appear to do but does not actually carry out

93
Q

what effect would a

MOVE disk operation

have on each each of the following

  • directory
  • intermediate data structures
  • data blocks
A

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
94
Q

describe the linux command

mount

A

this linux command is used to mount a file system to the root directory hierarchy

95
Q

file systems that use this include:

  • Windows NTFS (New Technology File System)
  • Extensible file alloaction table (exFAT)
  • Linux extended file system version 4 (ext4)
A

name 3 file systems that make use of

extents

96
Q

what effect would a

DELETE disk operation

have on each each of the following

  • directory
  • intermediate data structures
  • data blocks
A

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
97
Q

what is

formatting

A

this is the act of placing a file system onto a disks partition

98
Q

this linux command is used to unmount file systems from the directory hierarchy

A

describe the linux command

umount

note

notice the u

99
Q

does a mounted file system remain mounted upon a reboot

A

no this behaivour is not default

in order to maintain the mounted drive you must add a listing to the /etc/fstab configuration file

100
Q

describe the linux command

Lsblk

A

this linux command will display information about all block devices, such as name, device id, size and type

101
Q

describe the linux command

umount

note

notice the u

A

this linux command is used to unmount file systems from the directory hierarchy

102
Q

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

A

what is the outcome of typing the linux command

df -T-a

103
Q

this stands for make file system and is used to build a file system on a disk or partitions

A

describe the linux command

mkfs

104
Q

describe the linux command

chown

A

also known as change owner is used to change the ownership of a file

105
Q

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

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

106
Q

the steps here would include

  1. the shell/application making an API call to the file system module such as READ
  2. the file system module runs its READ routine and makes a system call to the I/O module
  3. the I/O module communicates with the device driver
  4. 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

A

describe the steps of how an

  • applcation
  • file system module
  • I/O module

work together in order to read a file for example

107
Q

this linux command is used to display the free space of any file systems that are present

A

describe the linux command

df

108
Q

this is extent is a run of contigious blocks

A

wha is an

extent

109
Q

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)
A

name 3 file systems that use

journaling

110
Q

what happens if a files data

exceeds the size of an inode

A

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

111
Q

what is the

tmpfs

file system that can be seen from the output of commands such as df

A

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

112
Q

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
A

what is the linux

naming convention for disk drives

113
Q

the “terminology” for this is

  • windows
    • formatting the disk
  • linux
    • building a file system
A

what is formatting known as within:

  • windows
  • linux
114
Q
  1. the directory is referenced and the filename found and its inode number
  2. its inode is loaded into memory
  3. an I/O operation then occurs for each disk block within the inode
A

describe the execution process of the

inode

system used within linux

115
Q
  • 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

describe the 6 columns of the table structure used by the configuration file

/etc/fstab

116
Q
  1. the directory is looked at for the file name
  2. the file name holds a reference with it to its intermedite table (inode for linux)
  3. the intermediate table will reference the start and length of every extent
A

describe the

execution process of using extents

117
Q

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

A

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

118
Q
  • 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
A

describe the data structure of

extents

119
Q

this disk operation:

  • directory
    • New entry copying the original
  • intermediate data structures
    • New entry copying the original
  • data blocks
    • New entry copying the original
A

what effect would a

COPY disk operation

have on each each of the following

  • directory
  • intermediate data structures
  • data blocks
120
Q

describe the execution process of the

inode

system used within linux

A
  1. the directory is referenced and the filename found and its inode number
  2. its inode is loaded into memory
  3. an I/O operation then occurs for each disk block within the inode
121
Q

describe the five steps that take place under the hood when formatting a disk with the FAT file system

A

this includes

  1. A free space list is created
  2. Using a FAT based system a FAT table will be created
  3. A root directory is created using a block from the free space list
  4. The root directory is recorded in the FAT or inode
  5. 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)
122
Q

this is a method of allocating disk blocks to a file in an unbroken sequence

A

what is

Contiguous allocation

123
Q

describe two syntaxes for formatting a disk within the linux terminal

using mkfs

A

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
124
Q

describe the linux command

df

A

this linux command is used to display the free space of any file systems that are present