What does :

/dev/sda

stand for? What does it mean?

I have both Fedora and Ubuntu installed and if I explore them using Ext2explore from windows, I see these names :

/dev/sda6
/dev/sda9

Please explain me what does that mean? I mean the numbers there and also the /dev/sda/.

up vote 113 down vote
+50

TL;DR: It has to do with the way linux (and all unixes) name their drives, much in the way that windows uses C:, D:, etc. (NOTE: This is what we call a metaphor. In other words, a blatant lie that helps people understand without being even remotely accurate. Read on for a more detailed explanation...)

  • /dev/ is the part in the unix directory tree that contains all "device" files -- unix traditionally treats just about everything you can access as a file to read from or write to.

  • sd originally identified a SCSI device, but since the wildgrowth of USB (and other removable) data carriers it became a catch-all for any block device (another unix term; in this context, anything capable of carrying data) that wasn't already accessible via IDE. When SATA came around, the developers figured it'd be much easier and much more convenient for everyone to add it into the existing framework rather than write a whole new framework.

  • The letter immediately after sd signifies the order in which it was first found -- a,b,c...z, Aa...Az... etc. (Not that there are many situations in the real world where more than 26 discrete block devices are on the same bus...)

  • Finally, the number after that signifies the partition on the device. Note that because of the rather haphazard way PCs handle partitioning there are only four "primary" partitions, so the numbering will be slightly off from the actual count. This isn't a terrible problem as the main purpose for the naming scheme is to have a unique and recognizable identifier for each partition found in this manner...

So /dev/sda9 means the ninth partition on the first drive.

  • I didn't understand the third point. Can you please help me in that – saplingPro Feb 27 '13 at 11:24
  • 12
    Meaning that the first device found would be sda, the second would be sdb, and so on until the 26th device would be called sdz and the system would start with sdAa if you wind up having more devices than that... – Shadur Feb 27 '13 at 13:58
  • /dev/sd[A-Z][a-z] actually is considered invalid by AWS now, unless it requires extra configuration. – cxdf Jan 11 '16 at 21:04
  • shouldn't -- the dev-by-UUID nodes should be symlinks. – Shadur Jan 11 '16 at 21:12
  • A metaphor is usually related in some sort of tangential way that is more closely related to the addressee's experience than the concept or thing one wishes to explain. So one might explain the workings of a processor in terms of tractors and muddy boots to a farmer, for example. The hope is the addressee will be able to utilise the symbolic link(s) in order to mentally construct a working model of whatever the addresser is describing, without first-hand knowledge. So it's only really a lie in the same way a block-chain is a lie about a pass-phrase. In fact, a blockchain is a sort of metaphor. – Peter David Carter May 16 '16 at 15:59

/dev is your filesystem representation of devices your system understands - providing a mechanism for applications to access data on the device without needing to know specifically what the device is.

sd is for (originally) scsi disk devices, however it seems to now refer to removable devices in general and SATA devices

and the letter is just the number of the device, starting at a, with the number indicating the partition.

sd originates from the driver sd-mod. It literally stands for scsi disk.

The reason (S)ATA disks are also listed as SCSI disks is, SCSI commands pretty much provides a superset of features that can be provided by ATA commands, therefore modern systems (including Windows, AFAIK) will have an implementation of SCSI-ATA Translation Layer (SATL) in the system (in Linux it is provided by the libata driver) to talk to the (S)ATA disks, while the upper layer of the system can be generalized.

As you may not aware of, USB drives "speaks" SCSI (i.e. takes and responds to SCSI commands), no matter if it supports the USB Attached SCSI Protocol or not. Also, most of the USB HDDs/SSDs are SATA disks bridged to USB. For those the bridge provides the SATL, but not the operating system.

Your Answer

 

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.