jQuery in Action, 3rd edition
The moose likes Linux / UNIX and the fly likes how to set hard disk recognition order Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » Linux / UNIX
Bookmark "how to set hard disk recognition order" Watch "how to set hard disk recognition order" New topic

how to set hard disk recognition order

jing hu
Ranch Hand

Joined: Jun 30, 2009
Posts: 63
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

Joined: May 14, 2008
Posts: 5852

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.

JBoss In Action
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 17410

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.

An IDE is no substitute for an Intelligent Developer.
I agree. Here's the link: http://aspose.com/file-tools
subject: how to set hard disk recognition order
It's not a secret anymore!