2

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?

2
  • 1
    Why do you want that? No program should rely on those names; that's what UUIDs are for.
    – htorque
    Mar 2, 2011 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... Mar 2, 2011 at 13:09

2 Answers 2

4

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.

2

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.

You must log in to answer this question.

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