Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I have 3 physical drives in my Mac Pro with OSX 10.6.4. Occasionally after rebooting the machine, the disk numbering changes such that the /dev/disk# does not reference the same drive as it did before the reboot.

Example

/dev/disk0 -> 64GB SSD drive
/dev/disk1 -> 640GB Hitachi
/dev/disk2 -> 160GB WD (BootCamp)

After rebooting the mapping might be

/dev/disk0 -> 160GB WD (BootCamp)
/dev/disk1 -> 640GB Hitachi
/dev/disk2 -> 64GB SSD drive

Even more confusing is that the remapping is not consistent. For most stuff this is irrelevant. However I also have Parallels installed to allow access to the BootCamp partition from within OSX. Parallels uses the /dev/disk# path in it's configuration file so, after rebooting OSX I launch Parallels and it tells me that the disk is no longer present.

Is there a way to tell OSX to always assign a given drive to /dev/disk0?

share|improve this question
    
Is it possible to setup Parallels so that it uses /Volumes/WD (BootCamp) instead of /dev/disk# ? –  mouviciel Sep 18 '10 at 9:33
2  
Can you use the UUID instead of the device number? –  Falmarri Sep 19 '10 at 0:51
    
You might also want to try asking this on apple.stackexchange.com , since no one here seems to know. –  Macha Oct 29 '10 at 13:56
add comment

2 Answers

No, there's no way to force disk devices to particular /dev/disk names short of powering up the drives in a particular order. /dev devices are assigned to physical devices by the kernel, and there's nothing in userland that affects those assignments.

On *BSD systems, the normal way to force disk/device linkage is by building a kernel with configuration lines like

sd* at scsibus? target ? lun ?

with the metacharacters replaced by actual numbers if you wanted to tie device names to specific SCSI targets. Under Mac OS X, you're not building your own kernels so this option is not open to you.

share|improve this answer
add comment

You can use the UUID to tie down the mount points.

  1. Find out the UUID of each disk using the command

    sudo blkid
    
  2. Add the device in your /etc/fstab by specifying the device along with UUID (rather than /dev/disk*:

    UUID=<UUID> [Other options for fstab entry]
    
share|improve this answer
    
why has this answer been downvoted? please add a comment if the reason is not glaringly obvious... this seems like a legitimate answer. –  NixNinja Nov 13 '10 at 13:02
    
Upvoted. AFAIK, it is legit. OpenSuSE does this by default. –  pboin Nov 26 '10 at 14:05
    
It looks like the problem is with Parallels, not with OS X, actually. –  SamB Dec 19 '10 at 2:06
2  
The downvote might be something to do with the fact that the O.P. was asking about OS X, whereas the answer was specific to Linux. In case it's not glaringly obvious by now, the answer has no relevance to OS X (the "blkid" command only exists on Linux, and OS X does not use /etc/fstab). –  Jeremy Visser Nov 8 '11 at 8:16
add comment

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.