Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

When adding a new drive, it took over /dev/sda1. Now my old drive is /dev/sda2 and it messes with the current fstab setup of the server. I know I can get away with using UUID or labels (what I just did), but I would still prefer having the primary drive take /dev/sda1...

So, how do I force a disk to take a particular device number?

share|improve this question

2 Answers 2

up vote 4 down vote accepted

The correct way is to use UUIDs. Its is especilay important if you use multipath.

If you want to make /dev/sda be alvway specific drive, you will have to mess around with UDEV scripts. Personaly I think its not worth it.

There are some good QA on this site about how to use udev.

share|improve this answer
1  
Don't forget /dev/disk/by-id –  ultrasawblade Feb 17 '11 at 18:16

As far as I know, the best way is to use UUIDs or labels as you have done, although you can use by-path to associate them by their interface.

share|improve this answer

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.