0

In my system when I attach my USB HDD, it is showing it as sdc instead of sdb. I do not have any other HDD attached.

[root@localmirror ~]# ls /sys/block/
dm-0/ dm-1/ dm-2/ sda/  sdc/  sr0/

Am i missing something?

2
  • Can you provide more outputs? i.e: ls /dev/sd*, dmesg, mount... when the device is attached Jan 23, 2017 at 9:26
  • Search for sdb in /var/log/messages.
    – andcoz
    Jan 23, 2017 at 9:59

2 Answers 2

2

/dev/sdx is not the "correct hdd name", and you never should rely on a specific device node, especially for removable devices. You usually can rely on the UUID of the device/partition, or on the file system label (if any).

In /etc/fstab, instead of /dev/sdx you can specify UUID= or LABEL=

Additionally, there should be entries in /dev/disk/by-uuid and eventually /dev/disk/by-label, which should be links to the actual device nodes. So, for manual access, you may mount/dev/disk/by-uuid/<UUID> od /dev/disk/by-label/<LABEL>. To find out UUID and/or LABEL, just do ls -l /dev/disk/by-uuid and ls -l /dev/disk/by-label.

1

I have a couple of ideas:
1- sdb device is in reality the dm one
2- sdb device was created (before sdc detection) and then destroyed (after the sdc detection)

Further reading: I suggest you reading some documentations if you have not yet done it
e.g. http://www.tldp.org/HOWTO/Partition-Mass-Storage-Definitions-Naming-HOWTO/x99.html
http://tldp.org/HOWTO/Partition/devices.html

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .