โ† All Linux Flashcard Decks

Advanced File System and Storage Flashcards

7 cards from real Linux practice questions. Tap to flip, then mark Knew It or Still Learning โ€” missed cards come back until you master them.

Read the first 7 Advanced File System and Storage flashcards as text
  1. What is the default inode ratio when creating an ext4 filesystem with mkfs.ext4?

    Answer: One inode per 16KB of space

    By default, mkfs.ext4 creates one inode for every 16384 bytes (16KB) of filesystem space, balancing inode count against overhead.

  2. Which command shows I/O statistics per block device in real time?

    Answer: iostat -x

    iostat -x from the sysstat package reports extended I/O statistics including utilization, await time, and throughput per device.

  3. In Linux software RAID (mdadm), what does the '--spare-devices' option specify?

    Answer: Number of hot-spare drives to add to the array

    The --spare-devices option in mdadm specifies how many hot-spare drives are included in the RAID array for automatic failure recovery.

  4. What is the purpose of the 'barrier=0' mount option for ext4?

    Answer: Disables write barriers, improving performance at the cost of data integrity on power loss

    Disabling write barriers (barrier=0) improves write performance but can lead to filesystem corruption if power is lost before data is flushed.

  5. Which xfs_repair option performs a dry run, reporting errors without making changes?

    Answer: -n

    xfs_repair -n runs in no-modify mode, scanning the filesystem and reporting what would be repaired without actually making any changes.

  6. What does 'copy-on-write' (CoW) mean in the context of Btrfs?

    Answer: Modified data is written to a new location, leaving the original intact until the transaction commits

    In Btrfs CoW semantics, when data is modified, new blocks are allocated and written first; old blocks are freed only after the new write is committed.

  7. Which /sys path exposes the I/O scheduler currently active for a block device (e.g., sda)?

    Answer: /sys/block/sda/queue/scheduler

    The active I/O scheduler for a block device is shown and changed via /sys/block//queue/scheduler, where the current scheduler appears in brackets.