104.1 Create partitions and filesystems Flashcards
What does GPT stand for?
GUID Partition Table
How many partitions does GPT support?
128
What is the largest partition size GPT allows for?
1 ZB (zettabyte)
What does the GPT need to boot?
It needs UEFI to boot
What does this mean? /dev/sda1
This is the first partition of the sda drive.
What does a block device called “vdb” mean?
v: virtual hard disk
d: disk
b: second virtual disk
What is the command to create a legacy type MBR partition?
#fdisk and then follow the wizard Example: #fdisk /dev/sda
What does a block device called “sda” mean?
s: scsi
d: disk
a: first disk of the drive
What do you do after creating a legacy MBR partition?
You have to put a FS on it and then mount it
What commands lets you see the partitions?
fdisk -l
What is the command that creates partitions of MBR or GTP types?
parted and then follow the wizard
What are the partition IDs?
83: Standard Linux FS
82: Linux swap partitions
8e: Linux LVM Volumes
What commands can you use to find out what type of partitioning setup you have?
#lsblk #fdisk #fdisk /dev/sda
What is the command besides #parted is used to create GTP partitions on disks?
Besides #parted, you can use #gdisk and follow the wizard.
What utilities can be used to create swap partitions?
#fdisk > legacy type MBR partition #gdisk > GTP partitions #parted >MBR or GTP types
What are the 2 ways in which swap memory can be created?
Using a swap file within the FS as swap space
What is the downside of using a swap file as swap space?
A swap file represents a performance hit for the system since the kernel has to write the data to a file.
What is the preferred fashion to create swap space?
Use a swap partition dedicated to swap space since it is less taxing in performance on the system.
What are the common options used once inside the #gdisk wizard?
P to see the partitions N to create a new partition 83: Standard Linux FS 82: Linux swap partitions 8e: Linux LVM Volumes W to write the partition
Once a swap partition is created, what has to be done next?
A swap FS has to be put into the partition and then turn on the partition
What command is used to put a swap FS into a swap partition?
#mkswap -L (it formats the partition to be used as swap space) #mkswap -L SWAP /dev/sda2
How do you turn on or enable a swap partition after creating the partition and putting a FS on it?
#swapon -U (UUID) given in the output of the #mkswap command #swapon -L
What command can you use to verify swap space is available?
free -m
What file has to be modified so that a new swap partition can keep on between reboots?
/etc/fstab and add the label of the swap partition
How do you turn off or disable a swap partition?
#swapoff -L Verify with #free -m it is gone.
What are the categories of file systems?
Non-journaling and journaling.
What is an example of a Non-journaling FS?
ext2
What is an example of a journaling FS?
ext3, ext4, xfs
What is a journaling FS?
A journaling FS uses a journal to keep track of changes that have not yet been written to the file system.
What is the default FS for CentOS 7 and RHEL 7?
xfs
What is BTRFS?
It writes a copy of an original file
What does BTRFS use?
CoW (copy on write)
Subvolumes, which are similar to partitions.
Snapshots
What does FAT stand for?
File Allocation Table
What does vFAT stand for?
Virtual File Allocation Table (it allows for longer file names compared to the older FAT FS)
What type of FS does an EFI boot partition need?
It needs to use a FAT partition.
What type of a FS do external HDD and thumb drives use?
exFAT (developed by Microsoft)
What is the FS that most modern Linux distros use?
ext4
What commands do you use to create a new file system on a partition?
#mkfs -t ext4 or #mkfs.ext4 -L or #mkfs.xfs -L