[olug] controlling Linux's assignments of sda, sdb, etc.

Noel Leistad noel at metc.net
Wed Jul 27 15:22:02 UTC 2011


On 07/27/2011 09:35 AM, Kevin wrote:
> I don't think that you can change it once they're detected. But you
> can mount /dev/disk/by-{id,label,path,uuid}, and these shouldn't
> change.
>
> On Wed, Jul 27, 2011 at 09:08, Obi-Wan <obiwan at jedi.com> wrote:
>>> This issue came up a few months back, and I don't know that any answer
>>> was confidently arrived at.  Let's say Linux arbitrarily starts changing
>>> your drive names, so that what was once sda is now sdb, your USB drive
>>> (formerly sdc) is now sda, and the like.  Is there any way to force
>>> Linux to assign sda only to one single drive, and never to any other drive?
>> That was me that complained about that, and I'm still haunted by it.
>> My problem is that, along with the drive letter switching, SNMP will
>> reorder the drives, so every time I reboot, I have to change the numbers
>> in my mrtg.cfg file to keep my graphs consistent.  I'd love to find a
>> pretty solution.
>>
>>
>> --
>> Ben "Obi-Wan" Hollingsworth    obiwan at jedi.com    PrairieRimImages.com
>>   The stuff of earth competes for the allegiance I owe only to the
>>     Giver of all good things, so if I stand, let me stand on the
>>       promise that You will pull me through.  -- Rich Mullins
>> _______________________________________________
>> OLUG mailing list
>> OLUG at olug.org
>> https://lists.olug.org/mailman/listinfo/olug
>>
> _______________________________________________
> OLUG mailing list
> OLUG at olug.org
> https://lists.olug.org/mailman/listinfo/olug
>
>
This is what I've used for 2 usb drives that are randomly inter-changed
in one of my systems....
<from fstab>
UUID=8ec052d6-c43c-45c8-8d11-d3d876890297       /media/mediabay        
ext3 defaults 1 0
UUID="a5f30842-7421-4750-8f62-3298bb3acbc6"     /media/pocket          
ext3 defaults 1 0
</from fstab>


check out man uuidgen and man tune2fs for generating the UUID and
assigning to the drive.

It's worked for me long enough I had to research how to repeat .... :-|

-- 
#######################################################
#  Noel Leistad, CISSP                                #
#  noel at metc.net                                      #
#######################################################


That all men should be brothers is the dream of people who have no brothers.
		-- Charles Chincholles, "Pensees de tout le monde"




More information about the OLUG mailing list