Managing Paritions and the Linux Filesystems Flashcards
What is filesystem?
It is a method that is used by an OS to store, retrive, organize and manage files and directories on mass storage devices. It maintains information, such as the date of creation and modification of individual files, their file size, file type and permissions. It also provides a structured form for data storage.
What is filesystem labels
They are assigned to filesystems for easy identification. The labels may be up to 16 char long .
How can filesystem labels be displayed or chanaged?
e2label command
What is partition
It is a section of the hard disk that logically acts as a seprate diesk. Paritions must be formatted and assigend a filesystem before data can be stored on it.
How are paritions identified
Using partition table
Where is partition table stored
In boot record
What is the max number of partitions a partition table contain
four
What are recommended size specs for parition
/ Min 1 GB, /boot 100MB, swap double Ram, /var Min 250MB. /home depends on number of users
What is fdisk Utility?
It is a menu driven utility program that is used for creating, modifiying or deleting partitions on disk drive.
fdisk device_name. fdisk is only used with MBR
What is fstab file?
It is a configuration file that stores information about storage devices and partitions and where and how the partitions should be mounted. It is located in /etc directory. It can be edited only by a root user.
What is mkfs?
It is used to build a Linux filesystem on a device.
mkfs -t ext3 /dev/hda6
what is mke2fs?
It is used to create ext2, ext2 and ext4 fileysstems.
How is device recognition is performed
By MBR at system startup by recognizing the hard disk and all partiions on it.
What are the components of MBR that helps in detection
Master Parition table which contains the list of partitions on the hard disk. The master boot code which contains the program for loading the operating system on the hard disk. This program in loaded to initate the boot process
What is parition Management
It is the process of creating, destroying and manipulating partitions to optimize system performance.
What are the tools for parition Management
sfdisk, GNU parted, gdisk and partprobe
What is sfdisk Utility?
It is used to manipulate partitions. It manages partitions by listing hte number of partitions and their sizes, checking hte partitions and repartioning a storage device.
What is GNU parted Utility?
It is used to manage parition. It is particularly useful when creating partitions on new hard disks. It can be used to create, destroy and resize partitions. It can be used with MBR,GPT, Apm, BSD disk labels. It measures disk space in MB rather than cylinders. Supports dyynamic partition resizing.
What is gdisk Utility.
It is used to manipulate disk partition. It manages paritions in the newer GUID Parition table format by listing the number of paritions and their size, checking hte paritions and repartitioning a storage device
What is partprobe
It is a program used to update the kernel with changes in the parition tables. The program first checks the partition tabel and if there are any changes, it automatically updates the kernel with the changes
How to find out the the type of file
file options file name
What are types of files
Dir(d), special files (b or c), Links(l), domain sockets(s) named pipes(p)
What is filesystem Hierarchy standard
It is a collaborative document that specifies a set of gudelines for the names of files and directories and their location.
Why is FHS important
By implementing the guidelines of the FHS it include compativility betweent he systems that FHS compliant and restriction on users chnaging the /user partition that contians common executable files.
What are some of common linux dir
/boot, /bin, dev, etc, lib, sbin, usr, var, tmp,opt, mnt,media
What is boot
Stores the files necessary to boot the Linux OS
What is bin
stores essential command line utilities and binaries
what id ev
it stores hardware and software device drivers. It maintains filesystem entries that represent the devices connected to the system
what is etc
it stores basic config files
what is lib
it stores shared program libaries required by the kernel, CLI and binaries
what is sbin
it stores binaries that are used for completing the booting process and aslo the ones used by the root user
what is usr
stores small programs and files accessible to all users
what is var
stores system log files, printer spools and some networking services
what is tmp
It stores temporary files
what is ipt
it stores files of large software packages.
what is mnt
it is the mount point for temp mounting data from locations such as floppy disk, CDs, DVds and network partitions
what is media
it allows access to temporarty and removable filesystems susch as CD and floppy disks
What are dir in /usr
bin which indludes exe programs , local which indluces custom build applications that are stored by default, lib which indludes object libaries and internal binaries, lib64 which serves the same purpose as lib but for 64 bit systesm, share which indlues read-only architecture indepedent files
How to access parent directory
..
What is mount point
Once a disk is partitioned, an OS must have some way to access the data on the paritions. It is an access point to information stored on a local or remote storage device. The mount point is typically an empty directory on which a file system is loaded, or mounted to make the filesystem accessible to users.
Example, three paritions root, home an usr. If home contains user home directories such as sally, the directories will be accessible as home/sally once the parition is mounted at /home
What is a swap space
It is a partition on the hard disk that is used when the system runs out of physical memory. Linux pushes some of the unused files from the RAM to the swap space to free up memory.
What are the swap type
Device swap, filesystem swap , pseudo-swap
Explain the purpose of each swap type
Device swap is configured when you partition the hard disk. It is used by the OS to run large applications. The filesystem swap is configured primarily when you install Linux. It is utilized by the OS as an emergecny resource when the avaliable swap space runs out. The Pseudo-swap spacke allows large applications to run on computers with limited RAM
What are Swap Files
They are created for storing data that is to be transferred from a system’s memory to disk.It is dynamic and changes in size when data is moved in and out of the memory. It is used as a medium to transfer data from RAM to the hard disk
What is Swap partions
It is an area of the virtual memrory on a hard disk to complement the physical RAM in the computer. Swap partitions are created by Linux because they perform better than swap filessytems
What is the command used to create swap space
mkswap
How to manage swap parition
swapon which is used to activate a swap partition on a specified device. swapof to deactivate
Why partition
For security purpose, filesystem choice, disk space management, disk error protection and backup
What is GUID Partiotion Table(GPT)
It supports 128 primary partitions and max disk size 8ziB and no need for extended or logical partitions
What is LVM (logical Volume Manager)
It allow grated control over storage and disk management by resize your partitions without worrying about the positions or size of surrounding partions Some of the commands are pvcreate, pvdisplay vgcreate, vgdisplay, lvcreate and lvdisplay
What are the types of filesystem
ext2fs, ext3fs(has journal which helps with recovery),ext4fs(add the ability to work with very large disk), reiserfs( good at handling filesystems with large numbers of small files, btrfs is to handle large filesystem, Non-native filesystems, FAT,NTFS,ISO