Find root disk
Hello ,
I want to find out which is the root disk from the available 4 internal disks?
When there is veritas I used ->
vxprint -g rootdg | grep dm | awk '{print $3}'
This works good without mirroring. But this fails after mirroring.
If my machine has solstice even then above will fail...
So I want a generic way to find out the root disk in a machine irrespective of mirroring and veritas/solstice volume manager..
how can i do this? thanx...
[497 byte] By [
peaj7] at [2007-11-26 8:18:19]

# 1
> Hello ,
> I want to find out which is the root disk from the
> available 4 internal disks?
>
> When there is veritas I used ->
> vxprint -g rootdg | grep dm | awk '{print $3}'
>
> This works good without mirroring. But this fails
> after mirroring.
>
> If my machine has solstice even then above will
> fail...
>
> So I want a generic way to find out the root disk in
> a machine irrespective of mirroring and
> veritas/solstice volume manager..
>
> how can i do this? thanx...
you could always just run 'format' and look at the partion types, IE: root.
You can always boot it as a Solaris device even if the disk is normally Veritas encapsulated.
# 2
Consider:
At OBP do ...
OK printenv boot-device
else,
Up in a functional Solaris environment, do ...
$ eeprom
(then search for the line item of boot-device)
Compare either of those device path results to what you may find
in the output of format or of iostat (with the -En command switch).
# 3
> So I want a generic way to find out the root disk in
> a machine irrespective of mirroring and
> veritas/solstice volume manager..
When you are doing mirroring, then you have more than one root disk.Use 'df' to see what device root comes from, then use 'format' or your volume manager to see how the device is created (either 'vxprint' or 'metastat').
Is that what you're looking for? Why are you trying to find "the" root disk in this case?
--
Darren