Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have Ubuntu Server 10.04 1 system disk, and 5 disks in RAID-5 configuration. The problem is that names of these disks are changed from time to time, they are being randomly mixed from time to time (sda,b,c,d,e,f - so system disks might be sda, or sdc at different time for example)....

is there any way to fix drive names, so that even if it's disconnected for example, no other drive can occupy this letter based on disk UUID or something?

share|improve this question
1  
Why do you want that? No program should rely on those names; that's what UUIDs are for. –  htorque Mar 2 '11 at 11:51
1  
Every time I see a dropped drive or check munin performance graphs - I have to use these names, and these are different... –  BarsMonster Mar 2 '11 at 13:09
add comment

2 Answers

up vote 4 down vote accepted

It's best to always refer to the disks by UUID; you can use the symlinks in /dev/disk/by-uuid/ (or by-id if that's more suitable) to refer to the device nodes.

The /dev/sdxN names are never guaranteed to be consistent, so relying on fixed names is not a good idea.

share|improve this answer
add comment

IF you do insist on stable names you may be able to use udev rules to fix the names on mount. In your case you may need to use serial numbers or something equivelent to identify the disks.

I don't know if upstart will be taking over disk mounting. If so, you would need to implement the equivalent rules there.

Alternatively, you could create symlinks to /dev/disk/by-uuid to use for monitoring.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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