nerdexam
LPI

010-160 · Question #70

Which of the following devices represents a hard disk partition?

The correct answer is D. /dev/sda2. In Linux, block devices such as hard disks and their partitions follow a specific naming convention under /dev/. The first SCSI/SATA disk is sda, and partitions are numbered starting at 1, making /dev/sda2 the second partition on the first disk.

The Linux Operating System

Question

Which of the following devices represents a hard disk partition?

Options

  • A/dev/hdyS0
  • B/dev/sata0
  • C/dev/part0
  • D/dev/sda2
  • E/dev/sda/p2

How the community answered

(33 responses)
  • A
    6% (2)
  • B
    3% (1)
  • D
    88% (29)
  • E
    3% (1)

Why each option

In Linux, block devices such as hard disks and their partitions follow a specific naming convention under /dev/. The first SCSI/SATA disk is sda, and partitions are numbered starting at 1, making /dev/sda2 the second partition on the first disk.

A/dev/hdyS0

/dev/hdyS0 mixes the legacy IDE naming prefix 'hd' with a serial port suffix 'S0', which does not represent a valid Linux device.

B/dev/sata0

/dev/sata0 is not a valid Linux kernel device node name - Linux does not use interface type names like 'sata' directly in device paths.

C/dev/part0

/dev/part0 is not a recognized Linux device naming convention for disk partitions.

D/dev/sda2Correct

Linux names SCSI and SATA disks as /dev/sda, /dev/sdb, etc., where 'sd' stands for SCSI disk and the letter indicates the disk order. Partition numbers are appended directly as integers, so /dev/sda2 correctly represents the second partition on the first SCSI/SATA disk. This naming is defined by the kernel's block device subsystem.

E/dev/sda/p2

/dev/sda/p2 incorrectly uses a directory separator within a device name - Linux device nodes for partitions append the number directly without a subdirectory path.

Concept tested: Linux block device and partition naming conventions

Source: https://www.kernel.org/doc/html/latest/admin-guide/devices.html

Topics

#device files#disk partitions#/dev directory#storage devices

Community Discussion

No community discussion yet for this question.

Full 010-160 Practice