CompTIA Linux+ Practice Questions: Storage

25 free, exam-style CompTIA Linux+ (XK0-006) practice questions covering Storage, each with the correct answer and an explanation. Start a timed exam below, or scroll on to read through the questions.

🧠

Mini Exam

25 Questions · 50 minutes

Start Quiz 🚀
🏆

Mock Linux+ Exam

85 Questions · 165 minutes

Start Quiz 🚀
📅

Daily Quiz

10 Questions · 20 minutes

Start Quiz 🚀
🎯

Standard Practice

50 Questions · 100 minutes

Start Quiz 🚀

Storage practice questions

Answers and explanations are shown. Take the timed exam above to test yourself first.

Q1. Which partition holds user home directories?

  • A./
  • B./home✓ Correct
  • C./var
  • D./usr
Explanation: /home is the standard mount point for user directories. Learn more.

Q2. What is the purpose of /etc/fstab?

  • A.Define filesystems to mount at boot✓ Correct
  • B.Store user passwords
  • C.Configure firewall rules
  • D.List cron jobs
Explanation: fstab contains static filesystem mount information. Learn more.

Q3. Which command creates a LVM physical volume?

  • A.pvcreate✓ Correct
  • B.vgcreate
  • C.lvcreate
  • D.mkfs.lvm
Explanation: pvcreate initializes disks/physical partitions for LVM. Learn more.

Q4. What command encrypts a partition with LUKS?

  • A.cryptsetup luksFormat✓ Correct
  • B.luksCreate
  • C.mkfs.luks
  • D.encryptfs
Explanation: luksFormat initializes LUKS encryption on a block device. Learn more.

Q5. Which RAID level provides striping with double parity?

  • A.RAID 0
  • B.RAID 5
  • C.RAID 6✓ Correct
  • D.RAID 10
Explanation: RAID 6 uses two parity blocks per stripe for fault tolerance. Learn more.

Q6. What command creates a logical volume in LVM?

  • A.lvcreate✓ Correct
  • B.vgcreate
  • C.pvcreate
  • D.mkfs.lvm
Explanation: lvcreate creates logical volumes from volume groups. Learn more.

Q7. What command converts a disk to GPT partitioning?

  • A.fdisk
  • B.parted
  • C.gdisk✓ Correct
  • D.mkfs.gpt
Explanation: gdisk handles GPT partitioning (fdisk for MBR). Learn more.

Q8. What command displays disk space usage by filesystem?

  • A.df✓ Correct
  • B.du
  • C.free
  • D.lsblk
Explanation: df shows mounted filesystems' disk usage. Learn more.

Q9. What command checks filesystem errors?

  • A.fsck✓ Correct
  • B.chkdsk
  • C.diskpart
  • D.badblocks
Explanation: fsck checks and repairs Linux filesystems. Learn more.

Q10. Which directory holds temporary mount points?

  • A./mnt
  • B./media
  • C./tmp
  • D./run✓ Correct
Explanation: /run contains volatile runtime data including mounts. Learn more.

Q11. Which command shows disk partition table?

  • A.fdisk -l
  • B.lsblk
  • C.parted -l
  • D.All of the above✓ Correct
Explanation: All commands display partition information. Learn more.

Q12. What command lists block devices?

  • A.lsblk
  • B.blkid
  • C.fdisk -l
  • D.All of the above✓ Correct
Explanation: All commands display block device information. Learn more.

Q13. What does 'dd if=/dev/zero of=/swapfile bs=1M count=2048' do?

  • A.Create 2GB swap file✓ Correct
  • B.Wipe disk securely
  • C.Backup partition table
  • D.Test disk speed
Explanation: Creates 2048x1MB blocks = 2GB swap file. Learn more.

Q14. What command repairs XFS filesystems?

  • A.xfs_repair✓ Correct
  • B.fsck.xfs
  • C.xfsadmin --fix
  • D.xfs_check
Explanation: xfs_repair checks/repairs XFS filesystems. Learn more.

Q15. What does 'lvconvert --merge' do in LVM?

  • A.Merge two logical volumes
  • B.Activate a snapshot✓ Correct
  • C.Convert linear to striped volume
  • D.Repair broken mirror
Explanation: Merges snapshot into origin volume. Learn more.

Q16. Which command creates a GPT partition table?

  • A.fdisk
  • B.parted
  • C.gdisk✓ Correct
  • D.cfdisk
Explanation: gdisk handles GPT partitioning. Learn more.

Q17. What is the purpose of 'swapoff -a'?

  • A.Disable all swap spaces✓ Correct
  • B.Show swap usage
  • C.Encrypt swap
  • D.Create swap file
Explanation: Disables swap devices/files temporarily. Learn more.

Q18. Which command creates a Btrfs subvolume?

  • A.btrfs subvolume create✓ Correct
  • B.mkfs.btrfs -S
  • C.btrfs volume add
  • D.subvolmkfs btrfs
Explanation: Creates new subvolume in Btrfs filesystem. Learn more.

Q19. Which file usually defines persistent filesystem mounts?

  • A./etc/fstab✓ Correct
  • B./etc/hosts
  • C./etc/resolv.conf
  • D./etc/shells
Explanation: /etc/fstab contains filesystem mount definitions used during boot and by mount commands. Learn more.

Q20. Which command displays block devices in a tree format?

  • A.lsblk✓ Correct
  • B.lsmod
  • C.lsof -i
  • D.lastlog
Explanation: lsblk lists block devices such as disks, partitions, and logical volumes. Learn more.

Q21. Which command shows filesystem disk usage by mounted filesystem?

  • A.df -h✓ Correct
  • B.du -sh /proc
  • C.chmod -R
  • D.passwd -l
Explanation: df -h reports available and used space for mounted filesystems. Learn more.

Q22. Which command creates an ext4 filesystem on a partition?

  • A.mkfs.ext4 /dev/sdb1✓ Correct
  • B.mount.ext4 /dev/sdb1
  • C.lsblk.ext4 /dev/sdb1
  • D.chmod.ext4 /dev/sdb1
Explanation: mkfs.ext4 formats a block device with an ext4 filesystem. Learn more.

Q23. Which LVM command moves allocated physical extents away from a disk before that disk is removed from a volume group?

  • A.pvscan --detach DEVICE
  • B.vgchange --migrate DEVICE
  • C.pvmove DEVICE✓ Correct
  • D.lvconvert --eject DEVICE
Explanation: pvmove relocates allocated extents from one physical volume to other available physical volumes in the same volume group. Learn more.

Q24. Which LVM command extends a logical volume and resizes its filesystem in the same operation?

  • A.pvresize -m
  • B.lvextend -r✓ Correct
  • C.vgchange -s
  • D.lvs --growfs
Explanation: The -r option tells lvextend to invoke the appropriate filesystem resize helper after increasing the logical volume. Learn more.

Q25. After extending the underlying logical volume, which command grows a mounted XFS filesystem?

  • A.resize2fs MOUNT_POINT
  • B.xfs_repair --grow MOUNT_POINT
  • C.xfs_growfs MOUNT_POINT✓ Correct
  • D.mount --extend MOUNT_POINT
Explanation: xfs_growfs expands an XFS filesystem online and is normally given the filesystem's mount point. Learn more.

More CompTIA Linux+ practice topics

Keep studying CompTIA Linux+

Full CompTIA Linux+ practice exam · CompTIA Linux+ study guide · All CompTIA practice questions

Last updated