بطبط

رجع لباقي المحاضرات
محاضرة 9

FHS & LVM Summary

شرح هيكلية الملفات (FHS) وإدارة الأقراص المرنة (LVM).

يلا نشوف الملخص

Summary of Lecture 9: FHS & LVM in Linux

1. File system Hierarchy Standard (FHS)

The Linux filesystem is organized in a hierarchical tree structure starting from the root directory /. It dictates how files are stored, organized, and accessed.

Essential Directories and Their Functions:

  • /bin (Binaries): Contains executable files needed to run the system in single-user mode, such as cp, rm, and shells like bash.
  • /sbin (System Binaries): Holds essential system management commands used by administrators, such as fdisk, ifconfig, and shutdown.
  • /etc: Stores text-based configuration files for the system and running services.
  • /home: The personal directory for regular users to store their data (Desktop, Downloads, etc.).
  • /root: The home directory specifically for the system administrator (Root user).
  • /lib: Contains code libraries used by programs in /bin and /sbin, as well as kernel modules.
  • /dev (Devices): Contains special files that allow the kernel to interact with hardware (e.g., sda for disks).
  • /boot: Holds bootloader files required to start the Linux kernel.
  • /var (Variables): Stores data that changes in size over time, such as log files, mailboxes, and print spools.
  • /usr: Contains the majority of user applications and programs.
  • /proc: A virtual (volatile) directory containing process information and kernel statistics.
  • /sys: A volatile directory containing information about system hardware, stored in RAM.
  • /tmp: Stores temporary files created by users or the system.
  • /media & /mnt: Used for mounting external devices like USB drives or CD-ROMs.
  • /opt: Used for installing optional or add-on software packages.

2. Logical Volume Management (LVM)

LVM is a flexible method for managing disk space that allows combining multiple physical disks into a single unit.

Components of LVM:

  1. Physical Storage: The actual disk partitions or full hard drives.
  2. Physical Volumes (PV): Initialized physical disks (e.g., sda, sdb) used by LVM.
  3. Volume Group (VG): A storage pool created by combining one or more PVs.
  4. Logical Volumes (LV): Virtual partitions created from a VG that can be formatted and mounted like a standard disk.

Steps to Create LVM:

  1. Prepare Partitions: Use fdisk or gdisk to create partitions and set the type to "Linux LVM".
  2. Create PV: Use pvcreate to label the partitions as Physical Volumes.
  3. Create VG: Use vgcreate to combine the PVs into a named Volume Group.
  4. Create LV: Use lvcreate to define the size and name of the Logical Volume from the VG.
  5. Format: Use mkfs to create a filesystem (e.g., ext4, xfs) on the new LV.
  6. Mount: Create a mount point and mount the filesystem to use it.

Note: To delete LVM components, use lvremove, vgremove, and pvremove in that order.

في نقطة مش واضحة؟ بطبط موجود!

اسأل بطبط عنها
بطبط
</>تم التصميم والتنفيذ بقسم تكنولوجيا المعلومات
تحت إدارة وإشراف

جامعة برج العرب التكنولوجية

جميع الحقوق محفوظة © BATBAT 2026

Powered withbyبطبط© 2025