Mailing List Archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [tlug] Trouble with external USB hard disk: drive order; hard and optical drive names



David Bernat wrote:

> What rules govern drive order in Kubuntu? 

That's an good question. 

For hard drives that are connected _after_ the system has booted, 
each drive is assigned the lowest sdx name available as it is inserted. 
I.e., they seem to be assigned sdx names in the order inserted. 
Experimentation corroborates this. If I unplug all the external 
hard drives and then replug them in a new order, they are 
given names different than before. 

For external hard drives that are connected _before_ the system 
boots, each drive is likely assigned the lowest sdx name 
_in_the_order_discovered/enumerated_. The order of discovery/
enumeration is probably the same for ports each boot, 
but the order of discovery is a very dangerous thing to rely on. 

The moral of all this sdx enumeration stuff is that relying on a 
name like /dev/sdb1 in /etc/fstab for external drives is risky 
and insufficient. If you want to specify partitions for external 
drives in /etc/fstab, likely you need to nail down the 
identification of partitions with more precise information like 
UUIDs, (as is used for partitions of sda), or partition labels 
(man e2label). I don't know if fstab allows you to specify 
VFAT volume labels. That's an exercise for you to figure out 
much later. 

Similarly internal and external optical drives are given 
/dev/scdn names, not /dev/sdx names. Experimentation 
corroborates this. 

> jep200404 wrote:
> 
> > Are today's sdb1 DVD-RAM drive and yesterday's sdc DVD drive the same drive? 
> 
> Yes, sdb1 and sdc are the same drive.

Neither sdb1 nor sdc smell right for a DVD drive. 

How did you determine that either sdb1 or sdc were for the 
DVD-RAM drive? 

> I have no /dev/scd0 in my system. 

How did you determine that? 

What is the output of: 

   ls -l /dev/scd*
   ls -ld /sys/block/s*

By the way, using DVD-RAM is uncommon. 
Are you actually using DVD-RAM, or is this a DVD+/-RW drive 
that can also handle DVD-RAM media 
(but does not have DVD-RAM media)? 

I could imagine DVD-RAM media being partitioned 
and having hard drive style partitions like ext3 or vfat, 
but it would be unusual. 

1. My experience is that optical drives (both internal and 
   external) are given /dev/scdn names and are _not_ given 
   /dev/sdx names in Ubuntu. (same for Centos)

2. Now focusing on the 1 in sdb1: this is very strange for 
   optical media. The vast majority of optical media have 
   ISO-9660 format, for which one just mounts the whole drive, 
   without specifying partitions thereof. It _is_ possible 
   to partition a CD/DVD (and even put extn partitions on it), 
   but that's really rare. 



Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links