โ† 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. Which command is used to resize an ext4 filesystem online (while mounted)?

    Answer: resize2fs

    resize2fs can resize ext2/3/4 filesystems; when the filesystem is mounted and the kernel supports it, online growing is possible.

  2. What does the 'dm-crypt' subsystem provide in Linux?

    Answer: Transparent block-level encryption via the device mapper

    dm-crypt is a Linux kernel device mapper target that provides transparent encryption of block devices using the kernel crypto API.

  3. What is the function of the 'fstrim' command?

    Answer: Send TRIM/discard commands to an SSD to free unused blocks

    fstrim issues TRIM commands to SSDs for all unused blocks in a mounted filesystem, helping maintain SSD performance and longevity.

  4. In Btrfs, what command creates a read-write snapshot of a subvolume?

    Answer: btrfs subvolume snapshot

    btrfs subvolume snapshot creates a snapshot of a subvolume; by default it is read-write unless the -r flag is passed.

  5. Which file in /proc provides real-time information about mounted filesystems and their usage?

    Answer: /proc/mounts

    /proc/mounts lists all currently mounted filesystems with their options, similar to /etc/mtab but always up to date.

  6. What does setting the 'sticky bit' on a directory do?

    Answer: Prevents users from deleting files they do not own in that directory

    The sticky bit on a directory (e.g., /tmp) restricts file deletion so only the file owner, directory owner, or root can remove files.

  7. Which LVM command removes a Physical Volume from a Volume Group?

    Answer: vgreduce

    vgreduce removes one or more unused Physical Volumes from a Volume Group; pvremove is then used to remove the LVM metadata from the disk.