Latest news!
The script given here has totally been rewritten as Perl modules. These have been much more tested than this old script. Please use theses modules on CPAN than this script, still here for history.
The modules on CPAN permit much more than just a mere text view of the configuration:
These modules are available in my CPAN directory.
SDS/SVM manager
Solstice Disksuite (aka. Solaris Volume Manager) is a beast to administer. When you have to create lots of volumes, when you need to use for these a huge number of soft-partitions, you'll rapidly get lost.
I was in that situation, so I wrote the following script, which I use and augment from time to time to ease SDS administration. The Perl written there may not be clean, lean nor idiomatic, but it works™.
You can download it sds.pl.
The changelog is included in the script, but is mostly in french, as most of the messages (especially error messages).
Here is the usage banner:
SDS Manager - Jerome Fenal, LogicaCMG France $Revision: 1.5 $ ./sds.pl [-c] [-i id] command ... Options: [-f <metastat-p.txt>] : use <metastat-p.txt> as "metastat -p" cmd output [-c] : turn coloured output on [-h] : show this help text [-i <newdevid>] : use newdevid as new metadevice id instead of first avail. Commands: showaxis : show available axis showpart : show partitions of all the disks involved getnextdev : retrieve the next free device isdevfree [d]num : is the device <dnum> free ? showconfig : view all the config showsp [<dev|slice>+] : view all devices on device or slices getphysdevs <dev> : show physical device(s) underlying a SDS device getsubdevs <dev> : show underlying device(s) for a SDS device explaindev <dev> : tries to explain a SDS device in pure english mpondev <dev> : mount point on <dev> mpondisk <disk> : mount point on <disk> (in a form present in SDS) devs4mp </mountpoint> : what are the devices underlying a mount point disks4mp </mountpoint> : what are the physical devices underlying a mount point mkmirror <axis> <size> [<mp>] : make mirror on specified axis axis : from $o showaxis size : see man metainit (section Soft Partitions) mp : mount point (optional) <dev> has the form dnumber as in d1 or d165 <slice> has the form cxtydzst as in c0t0d0s0
and more not yet documented...
Do not forget to update the %Axis hash if you want to create new devices (mirrors).
Feel free to mail me at jfenal AT free.fr for updates, comments, patches, and so on.