Disk Partition Flashcards
What are different disk partition utilities you familiar with?
fdisk, gdisk
How can we update the kernel partition table manually?
partprobe
Why we need Swap space?
Swap space is virtual memory that is used in case RAM gets full.
How can you check swap space utilization?
free -h, top, cat /proc/meminfo
Is swapping good or bad thing?
swap is good because it frees up RAM and freeing up RAM allows the CPU to run faster and avoid crashing.
disadvantage: if you continuously swap, then your system will start to freeze up. Also swap resides on the hard disk, so it slows the system when the swap is being utilized.
What is paging out and paging in?
paging out: RAM to swap
paging in: swap to RAM
What is purpose of command fdisk –l?
lists the disk partition table and provides more information on memory size and path to the partitions
How you will arrange the LUN in your environment and walk me through how you will partition on assigned LUN?
LUN (logical unit number) is a hard drive. It is arranged (attached/provisioned) by editing the settings or assigned by the data storage team. Once the disk is assigned, it can be scanned using the scsi scan and listed with lsblk. Finally we can use fdisk to partition it.
What is basic difference between gdisk and fdisk partition utility?
fdisk - older method of partitioning, create partitions on disks upto 2TB size, maximum of 4 partitions
gdisk - can create partitions on disks greater than 2TB size, maximum of 128 partitions, uses guided partition table.”fdisk - create partitions upto 2TB size, maximum of 4 partitions
gdisk - create partitions greater than 2TB size, maximum of 128 partitions”
Which partition schemes fdisk supports?
MBR and GPT
What is basic points of consideration while choosing MBR / GPT partition table?
MBR is older version and has limited space to store partition info, with a max of 15 partitions (with 3-4 standard partitions). MBR is store up to 2 TB. MBR is used in BIOS.
For larger disks, we have to use GPT. GPT can support up to 128 partitions. GPT is also used for UEFI.
Which partition schemes fdisk supports?
MBR and GPT
What is the difference between primary and logical partition?
primary - what we can use for /boot, they are standard (fixed size, static) partitions that cannot be changed later
logical - can be changed later and are flexible and extendable, sizes can be edited later
Why do we mount a file system?
To creat an access point to look into the block devices, easier to access data
What is fstab file in Linux?
fstab - stands for file system table, shows which the filesystems are automatically mounted on the filesystem after reboot. By adding an entry, we can make a mount point boot persistent.