On Jul 15, 2008, at 9:46 AM, John Mort wrote:

> My motherboard has four SATA ports and one IDE port, recently they
> were all occupied.  Then my wife's hard drive died, and I pulled out
> one of the IDE drives for her computer.  When I booted my computer
> (Ubuntu 8.04) back up I had some difficulty mounting one of my SATA
> drives, and eventually figured out that I had been mounting it as
> device /dev/sdd1, but since I removed that IDE drive it had become
> /dev/sdc1.  Is it common for hard drives to migrate from device to
> device as the environment changes? I had been under the impression
> that /dev/sdc was mapped to physical port X, and /dev/sdd was mapped
> to physical port Y, now I'm wondering if it figures things out as it
> goes along.

the "a", "b", "c", notation is determined at boot time as it finds the  
drives on the bus.

The best way around this is to use the UUID syntax in your /etc/fstab,  
instead of physical device names.

UUID=40a7133d-642a-4365-847a-47b73679f840 /mnt/space1   ext3 defaults 1 0

Will find the drive with the UUID listed, and mount that drive. How do  
you find the UUID?

$ sudo /sbin/tune2fs -l /dev/hda1 | grep UUID
Filesystem UUID:          40a7133d-642a-4365-847a-47b73679f840

Now, there's some obscure, esoteric quirks here that may be  
problematic in edge cases. If you use USB removable drives it MIGHT  
affect you, I'm not sure. If you don't deal with iSCSI or  
FibreChannel, you're done, stop reading here, the quirks definitely  
don't affect you .... :-)

If you deal with iSCSI or FibreChannel, there's a quirk to this that  
kind of sucks. The way mount works here is that it looks at the UUID  
you specified, finds the appropriate device (let's say "/dev/sda") and  
mounts it in /mnt/space1. BUT, if you do something which can cause  
your drives to be REORDERED (let's say you add a new iSCSI or  
FibreChannel LUN, and that LUN ends up logically appearing BEFORE the  
LUN for /dev/sda), then the new device will get /dev/sda and your UUID- 
specific mount will get /dev/sdb. BUT... the mounted filesystem is "/ 
dev/sda", not the UUID (because that mapping doesn't happen over and  
over again), so you will have shuffled your pre-existing mountpoint  
out of the way, and your new LUN will be sitting where the old device  
was.

Hope this helps...

Cheers,
D

_______________________________________________
Mid-Hudson Valley Linux Users Group                  http://mhvlug.org          
   
http://mhvlug.org/cgi-bin/mailman/listinfo/mhvlug                           
Upcoming Meetings (6pm - 8pm)                         MHVLS Auditorium          
        
  Jun 4 - Sqeak! and eToys
  Jul 2 - KVM (Tenative)
  Aug 6 - Zenos
  Sep 3 - TBD

Reply via email to