CompTIA Linux+ (XK0-006)System ManagementMedium

A pilot deployment adds a new external drive, /dev/sdc1, to a server. The technician wants the drive to always mount reliably at /data even if the device name changes after a reboot (e.g., becomes /dev/sdd1). What should the technician do first, and what should the /etc/fstab entry reference?

  1. ARun 'blkid /dev/sdc1' to find its UUID, then reference UUID= in /etc/fstab
  2. BReference /dev/sdc1 directly in /etc/fstab since device names never change
  3. CReference the partition by its /proc/partitions entry number
  4. DAdd the mount command to /etc/rc.local using /dev/sdc1
Show answer & explanation

Correct answer: A. Run 'blkid /dev/sdc1' to find its UUID, then reference UUID= in /etc/fstab

Device names like /dev/sdc1 can shift between boots due to detection order changes, especially with hot-swappable or USB drives. Using 'blkid' to retrieve the partition's UUID and referencing UUID= in /etc/fstab ensures the correct device is mounted regardless of its assigned name.

Why the other options are wrong

  • B. Device names can change between boots, making this unreliable.
  • C. /proc/partitions is a dynamic virtual file and not a valid fstab identifier.
  • D. rc.local is a legacy, less reliable approach and doesn't solve the naming issue.

UUID-Based Mounting

Using the unique UUID of a filesystem in /etc/fstab ensures a device mounts consistently regardless of its detected device name.

  • Retrieve UUID with 'blkid' or 'lsblk -f'
  • Prevents mount failures from device renumbering
  • Format in fstab: UUID=xxxx-xxxx /mountpoint ext4 defaults 0 2

Memory trick: UUID = a device's 'fingerprint' that never changes, unlike its nickname

More System Management questions