aspose file tools*
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
Author

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
author
Bartender

Joined: May 14, 2008
Posts: 5845
    
    7

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: 16305
    
  21

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.


Customer surveys are for companies who didn't pay proper attention to begin with.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how to set hard disk recognition order