Getting "Bay" information
Getting "Bay" information
- Subject: Getting "Bay" information
- From: Karl Kuehn <email@hidden>
- Date: Mon, 16 Mar 2009 14:44:09 -0700
Good afternoon,
I realize that my question might not completely on-topic for this
list, but have not been able to find a list that comes closer
(pointers are very welcome).
I am working on a system the controls where volumes get mounted on a
series of systems that I control. I do this by making entries in to /
etc/fstab, checking the mounted volumes against that, and watching for
new mount requests and checking that they should wind up where I want
them to be. But I have stumbled across some questions in this project,
and am hoping that someone can shed a little light on them:
1) Some of the machines that I control are MacPro's with a pair of
hard drives in the internal bay. I have found that there seems to be
some randomness about which drive gets labeled "disk0" and which gets
"disk1". The internal drives always get labeled first (so disk0
usually winds up disk0 even in a netboot environment). Things are a
little less random when I put the disks in bay 1 and bay 3, but I am
not happy with this solution (nor do I completely trust it).
I am hoping that there is some way of reading out what bay a drive is
in. I have looked through all of the keys that DADiskCopyDescription
returns, and it looks like the third element in the DAMediaPath entry
seems to change reliably, but this just screams "HACK" to me, and I am
trying to do this to increase reliability, and I have a feeling that
when I start to run this on other models I am going to get in trouble
relying on this. Anyone have a better route for me to go? Oh.. and I
am trying to avoid shelling out to system_profiler or diskutil.
2) My solution for controlling the mount point by using fstab entries
does not feel like the right solution to me. It feels like I should be
able to set the desired mount point during a
DARegisterDiskMountApprovalCallback, but there does not seem to be any
handle that I have found for adding/changing the mount path outside of
using DADiskMount with a path after I have rejected the normal mount.
Is there something I am missing, or should I be filing an enhancement
request on this?
--
Karl Kuehn
email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Filesystem-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden