Re: Getting "Bay" information
Re: Getting "Bay" information
- Subject: Re: Getting "Bay" information
- From: Eric Anderson <email@hidden>
- Date: Wed, 18 Mar 2009 13:41:51 -0500
On Mar 18, 2009, at 1:37 PM, Dan Markarian wrote:
Hey Karl,
It is best to use the volume UUID to identify a volume uniquely, not
aspects of the device it resides on. We support the UUID=
expression in fstab(8) for that very reason. eg.
# diskutil info /dev/disk0s3 | grep UUID
Volume UUID: 39605337-AB61-48DF-81C9-348947666FB9
# echo "UUID=39605337-AB61-48DF-81C9-348947666FB9 /export hfs rw" > /
etc/fstab
Woops - I think (hope) you mean '>>'. :)
Eric
On 16 Mar 2009, at 2:44 PM, Karl Kuehn wrote:
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
_______________________________________________
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