Courseiva
Storage Management →mediumMultiple Select

LFCS Storage Management Practice Question

An administrator needs to add a new swap space to a running Linux server without rebooting. The server has a free partition /dev/sdc1 and an existing file /swapfile. Which two commands or steps are required to activate the new swap partition /dev/sdc1 immediately? (Choose two.)

⚠ Common exam trap

A common mix-up: candidates confuse the steps for immediate activation with the steps for persistent configuration, such as editing /etc/fstab.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

✓

swapon /dev/sdc1

To activate a new swap partition immediately, you must first initialize it with mkswap, then enable it with swapon. These two commands prepare and activate the swap space without requiring a reboot. Adding an fstab entry is for persistence across reboots, and swapoff or mount are not appropriate for enabling swap.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • ✗

    swapoff /dev/sdc1

    Why it's wrong here

    swapoff disables swap on a device or file. It is the opposite of what is needed here; the administrator wants to activate new swap, not deactivate it. Running swapoff on a device that is not currently active would have no effect, and it does not prepare or enable swap.

  • ✗

    mount -t swap /dev/sdc1 /mnt

    Why it's wrong here

    Swap space is not mounted like a regular filesystem. The mount command does not support a swap filesystem type in this manner. Swap is activated with swapon, not mount. Attempting to mount a swap partition would fail because it lacks a mountable filesystem structure.

  • ✗

    echo '/dev/sdc1 none swap sw 0 0' >> /etc/fstab

    Why it's wrong here

    Adding an entry to /etc/fstab ensures the swap is activated at boot, but it does not activate the swap immediately. The scenario requires the swap to be available without rebooting. While this step is useful for persistence, it is not part of the immediate activation process.

  • ✓

    swapon /dev/sdc1

    Why this is correct

    swapon activates the swap partition, making it available to the kernel for paging. After mkswap has initialized the partition, swapon enables it immediately without a reboot. This is the second required step to bring the new swap space online.

  • ✓

    mkswap /dev/sdc1

    Why this is correct

    mkswap initializes the partition as swap space by writing the swap signature. This step is required before the partition can be used for swapping. Without running mkswap, the kernel will not recognize /dev/sdc1 as valid swap, and swapon will fail. This is the first step to prepare the device.

About these practice questions

One of 406 original LFCS practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written and reviewed by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

Last reviewed September 2026 · checked against the official Linux Foundation exam blueprint

This LFCS practice question is part of Courseiva's free Linux Foundation certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the LFCS exam.