LX0-103 · Question #95
Which of the following is the device file name for the second partition on the only SCSI drive?
The correct answer is B. /dev/sda2. Linux names SCSI/SATA disks with the sd prefix followed by a drive letter and a numeric partition index, making /dev/sda2 the second partition on the first (and only) SCSI drive.
Question
Which of the following is the device file name for the second partition on the only SCSI drive?
Options
- A/dev/hda1
- B/dev/sda2
- C/dev/sd0a2
- D/dev/sd1p2
How the community answered
(25 responses)- A4% (1)
- B92% (23)
- D4% (1)
Why each option
Linux names SCSI/SATA disks with the `sd` prefix followed by a drive letter and a numeric partition index, making /dev/sda2 the second partition on the first (and only) SCSI drive.
/dev/hda1 refers to the first partition on the first IDE/PATA drive, not a SCSI device.
The Linux kernel assigns SCSI and SATA block devices the prefix `sd` followed by a letter indicating drive order (first drive = `a`), with partitions numbered from 1. The only SCSI drive is `sda` and its second partition is therefore `/dev/sda2`, which follows the standard Linux device file naming convention.
/dev/sd0a2 is not a valid Linux device name; Linux does not insert a numeric drive index between the `sd` prefix and the partition number.
/dev/sd1p2 does not follow Linux SCSI naming conventions; the `p` separator and numeric drive index appear in some other Unix-like systems but not standard Linux.
Concept tested: Linux SCSI disk device file naming convention
Source: https://man7.org/linux/man-pages/man4/sd.4.html
Topics
Community Discussion
No community discussion yet for this question.