Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to set hard disk recognition order

 
jing hu
Ranch Hand
Posts: 63
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am using suse 11.

I have 3 hard disks. 3 SATA. I installed suse 11 in one SATA. the other hard disk is for data storegy.
I find they will change the order in which they recognise my disks when insert a new STAT hard disk . I used "sudo fdisk -l".
The order will be 1:
/dev/sda <---suse 11
/dev/sdb <---data1
/dev/sdc <---data2

NOW, I insert a new hard disk, the order will be

/dev/sda <---suse 11
/dev/sdb <---new hard disk
/dev/sdc <---data1
/dev/sdd <---data2

I don't want the order will change when I insert a new hard disk.
can I set the hard disk recognition order? or the new hard disk will be added the last. like this :

/dev/sda <---suse 11
/dev/sdb <---data1
/dev/sdc <---data2
/dev/sdd <---new hard disk.

Thanks for any reply.
 
Peter Johnson
author
Bartender
Posts: 5852
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think that the order that the disk are numbered is dependent on the SATA ports that the disks are connected into. To keep the numbering constant, make sure you fill the SATA ports in order.
 
Tim Holloway
Saloon Keeper
Pie
Posts: 18274
56
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is a fairly common problem and it has a number of solutions. One of them is simply not to care.

If you label the disks, you can mount by label ID irrespective of assigned device ID. Red Hat, in fact, was fond of mounting "/1" on "/" (root) for quite a few releases, although I think they've gon on to other conventions now.

Labels, however, don't have to be unique, so if you absolutely positively want the mount to be on a certain disk/partition, mount by its UUID.

On the other hand, you may actually need a consistent device ID, as for example when you're planning to to things with it while it's unmounted. In that case, take a look at the "udev" facility.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic