Courseiva
Devices, Filesystems and FHShardMultiple ChoiceObjective-mapped

LPIC-1 Devices, Filesystems and FHS Practice Question

A company wants to migrate a database server from ext4 to XFS to support larger files and better scalability. The current data resides on a single partition /dev/sda1 mounted at /data. Which procedure ensures a successful migration with minimal downtime?

⚠ Common exam trap

Candidates often think `dd` or `tune2fs` can convert filesystem types, but `dd` only clones raw data and `tune2fs` is ext-specific, so the only safe method is to create a new XFS filesystem and copy the data.

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

Add a new disk, create a partition with mkfs.xfs, mount it at /mnt, copy /data contents using cp -a, update /etc/fstab to use the new device, and remount.

It provides a safe, low-downtime migration path: create a new XFS filesystem on a separate disk, copy the existing data with `cp -a` to preserve permissions and metadata, update `/etc/fstab` to mount the new XFS device at `/data`, and remount. This avoids modifying the original ext4 partition and ensures the database files are intact on a supported filesystem.

Answer analysis

Option-by-option breakdown

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

  • Use dd if=/dev/sda1 of=/dev/sdb1 bs=4M to clone the partition, then change fstab to use /dev/sdb1.

    Why it's wrong here

    dd copies raw data including the ext4 filesystem; the target will still be ext4, not XFS.

  • Add a new disk, create a partition with mkfs.xfs, mount it at /mnt, copy /data contents using cp -a, update /etc/fstab to use the new device, and remount.

    Why this is correct

    This creates a fresh XFS filesystem, preserves permissions with cp -a, and updates fstab for persistence.

  • Run tune2fs -O xfs /dev/sda1 to change the filesystem type.

    Why it's wrong here

    tune2fs only works for ext filesystems; XFS conversion is not possible in-place.

  • Mount an NFS share, use rsync to copy data to the NFS mount, then unmount and reformat the original partition with XFS.

    Why it's wrong here

    This introduces unnecessary network dependency and risk of data inconsistency.

About these practice questions

Courseiva writes every LPIC-1 question from scratch — 527 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This LPIC-1 practice question is part of Courseiva's free LPI 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 LPIC-1 exam.