Podcast
Questions and Answers
Which command is used to create an ext4 file system on a specific partition?
Which command is used to create an ext4 file system on a specific partition?
What is the main purpose of the mount command?
What is the main purpose of the mount command?
What must you do before unmounting a filesystem?
What must you do before unmounting a filesystem?
What is a proper way to create a mount point in the /mnt directory?
What is a proper way to create a mount point in the /mnt directory?
Signup and view all the answers
What type of file systems can be created using mkfs?
What type of file systems can be created using mkfs?
Signup and view all the answers
What happens if you format a partition improperly?
What happens if you format a partition improperly?
Signup and view all the answers
What should the directory be like before creating a mount point?
What should the directory be like before creating a mount point?
Signup and view all the answers
What is the function of the sudo command in the context of creating a mount point?
What is the function of the sudo command in the context of creating a mount point?
Signup and view all the answers
What is the first partition on the first drive named in a Linux system?
What is the first partition on the first drive named in a Linux system?
Signup and view all the answers
Which command can be used to verify if a new disk has been detected in Linux?
Which command can be used to verify if a new disk has been detected in Linux?
Signup and view all the answers
In Linux drive naming, what does 'sd' typically indicate?
In Linux drive naming, what does 'sd' typically indicate?
Signup and view all the answers
What should you always do before performing disk management tasks?
What should you always do before performing disk management tasks?
Signup and view all the answers
What file does /dev/sdb2 refer to in a Linux system?
What file does /dev/sdb2 refer to in a Linux system?
Signup and view all the answers
Which command is NOT typically used for adding storage in a Linux environment?
Which command is NOT typically used for adding storage in a Linux environment?
Signup and view all the answers
What does the 'Y' in the format sdXY or hdXY represent?
What does the 'Y' in the format sdXY or hdXY represent?
Signup and view all the answers
Which type of drive is indicated by 'hd' in Linux device files?
Which type of drive is indicated by 'hd' in Linux device files?
Signup and view all the answers
What does the 'RM' column indicate in the output of the lsblk command?
What does the 'RM' column indicate in the output of the lsblk command?
Signup and view all the answers
Which command can be used to create partitions on a newly attached disk?
Which command can be used to create partitions on a newly attached disk?
Signup and view all the answers
In the example output given, what is the mount point of sdb1?
In the example output given, what is the mount point of sdb1?
Signup and view all the answers
Which of the following is a recommended use for a swap partition?
Which of the following is a recommended use for a swap partition?
Signup and view all the answers
What command is used to display details of all mounted filesystems?
What command is used to display details of all mounted filesystems?
Signup and view all the answers
What does the 'SIZE' column represent in the lsblk command output?
What does the 'SIZE' column represent in the lsblk command output?
Signup and view all the answers
Which filesystem is the root filesystem mounted as?
Which filesystem is the root filesystem mounted as?
Signup and view all the answers
Which partition is essential for a Linux system to function in single-user mode?
Which partition is essential for a Linux system to function in single-user mode?
Signup and view all the answers
What is the purpose of the /etc/fstab file?
What is the purpose of the /etc/fstab file?
Signup and view all the answers
Which command should be used to check and repair filesystems?
Which command should be used to check and repair filesystems?
Signup and view all the answers
If a device shows 'RO' as 1 in the lsblk output, what does it imply?
If a device shows 'RO' as 1 in the lsblk output, what does it imply?
Signup and view all the answers
What type of entry is indicated by the 'TYPE' column in the lsblk output?
What type of entry is indicated by the 'TYPE' column in the lsblk output?
Signup and view all the answers
In Logical Volume Management (LVM), what does VG stand for?
In Logical Volume Management (LVM), what does VG stand for?
Signup and view all the answers
Which command is used to create a logical volume in LVM?
Which command is used to create a logical volume in LVM?
Signup and view all the answers
What type of filesystem is tmpfs?
What type of filesystem is tmpfs?
Signup and view all the answers
To ensure a filesystem is mounted automatically at boot, what should be added to the system?
To ensure a filesystem is mounted automatically at boot, what should be added to the system?
Signup and view all the answers
What command is used to create a filesystem on a logical volume?
What command is used to create a filesystem on a logical volume?
Signup and view all the answers
Which option modifies the output of the df command to show sizes in a human-readable format?
Which option modifies the output of the df command to show sizes in a human-readable format?
Signup and view all the answers
What does the 'du -sh' command display?
What does the 'du -sh' command display?
Signup and view all the answers
What is the purpose of the -T option with the df command?
What is the purpose of the -T option with the df command?
Signup and view all the answers
Which command would you use to check the percentage of disk space used?
Which command would you use to check the percentage of disk space used?
Signup and view all the answers
In the example output of 'df -h', what does 'Avail' represent?
In the example output of 'df -h', what does 'Avail' represent?
Signup and view all the answers
Which of the following statements about LVM is true?
Which of the following statements about LVM is true?
Signup and view all the answers
What command would you run to mount a logical volume to a specific directory?
What command would you run to mount a logical volume to a specific directory?
Signup and view all the answers
Study Notes
Disk Management
-
Disk Management is an essential aspect of systems administration, involving tasks such as adding storage, partitioning disks, formatting and managing file systems.
-
Caution: Handle disk management tasks with care, as modifications can impact your data. Always back up important information before making changes.
Adding Storage
- Physical Disks: Connect a new disk to your server. Verify that the disk is recognized in the BIOS/UEFI and ensure device files are created in the /dev directory.
- Virtual Disks: In virtual environments (VMs or cloud), add a disk using the management tools or dashboards.
Linux Drive Naming
- Linux utilizes a different approach to drive naming compared to Windows.
- Drives and partitions are represented as files located in the /dev directory.
- The naming pattern is typically in the format of sdXY or hdXY, where:
- X is a letter representing the physical drive (a for the first, b for the second, etc.).
- Y is a number representing the partition on the drive (1 for the first, 2 for the second, etc.).
- sd stands for SCSI drives, and it's also used for SATA drives and SAS drives found in modern systems.
- hd stands for IDE or ATA drives, older drive types rarely used in modern systems.
Verifying Detection
- Use commands like lsblk to check if the system recognizes the newly added disk.
lsblk Command
- Lists all available block devices (disks and partitions).
Creating Partitions
- Partitions divide a disk into separate sections, each with its own file system.
- This helps in organizing data and enhancing security.
- Common examples include:
- / (root) partition: for essential system startup files
- swap partition: stores virtual memory
- /home partition: stores user files
- /boot partition: contains the boot loader and kernel.
fdisk Command
- A command-line tool for managing disk partitions.
- You can use it to display information about disks and their partitions.
Formatting Partitions
- Use the mkfs command with the desired file system type (-t option) and device or partition name (e.g., /dev/sdX1).
-
Example: Creating an ext4 file system:
-
sudo mkfs.ext4 /dev/sdX1
-
Mounting and Unmounting File Systems
- Mounting makes a file system accessible, while unmounting detaches it.
-
Steps for mounting:
- Create an empty directory as the mount point using mkdir.
- Mount the partition to the mount point using the mount command.
Automounting
- By default, file systems mounted using the mount command are not automatically mounted at system boot.
- To enable automatic mounting at boot, add an entry to the ** /etc/fstab** (file system table) file.
Checking the File System
- Use fsck to check and repair file systems.
- Run it on unmounted file systems to avoid data corruption.
Logical Volume Management (LVM)
- LVM provides flexible disk management by abstracting physical storage into logical volumes.
- This allows for easier disk space management, volume resizing, and snapshot creation.
-
Components:
- Physical Volume (PV): The actual disk or partition.
- Volume Group (VG): A collection of PVs.
- Logical Volume (LV): A virtual partition within a VG.
Checking Disk Usage
- df command reports file system disk space usage.
du Command
- Shows disk usage of files and directories.
Studying That Suits You
Use AI to generate personalized quizzes and flashcards to suit your learning preferences.
Related Documents
Description
This quiz covers the essential aspects of Disk Management, focusing on tasks such as adding storage, partitioning disks, and managing file systems. Learn about physical and virtual disks, and understand the naming conventions used in Linux. Ensure you grasp the importance of managing disk changes carefully.