Sanjay Nadkarni writes: > Paul Kraus wrote: > > > I am looking for a programatic way to determine which disk devices are > > currently used and which are unused by any metadevices or metasets. > > > > The metadevices are fairly easy, just parse the output of metstat -p > > for the used devices. > > > > Unfortunately, metaset only provides device names for devices > > currently owned by the host. The presence of other metasets and their > > owners is indicated, but not which devices they they contain. > > > > I have thought about trying to rsh into the other hosts and grab the > > output from metaset there, but I figured there *had* to be a better > > way. > > > > The reason I want this information, is that I am working on a script > > to automate the creation of non-global Zones in our environment. I > > want to be able to automate the creation of metasets and metadevices > > as needed by the Zone as well. > > > > Thanks. > > > The best way to do this is via libdiskmgt. It covers not only the > devices used by SVM but also all other possible combinations like, ZFS, > swap and dump devices. > > -Sanjay > > _______________________________________________ > lvm-discuss mailing list > lvm-discuss at opensolaris.org
Sanjay, Are you sure that libdiskmgt will discover disks that are part of an untaken set? This seems to me to ge the crux of Paul's question. tom