Pretending to be a Solaris admin

I’m always, always forgetting how to discover the available disks on a Solaris/OpenSolaris machine.

As I was having another (un-successful) crack at getting a disk controller (other than the motherboard’s IDE controller) to work with Nexenta Core v2, I’d again forgotten how I was meant to discover the disks as-probed by the OpenSolaris kernel.

Of course, Nexenta includes Ubuntu Hardy’s userland tools, but anything kernel/device-related is still very different to what I’m used to.

I finally found a particularly well-written post by Pascal Gienger, whom notes that:

First we will try to look up the disks accessible by our system:

# format
Searching for disks...done
AVAILABLE DISK SELECTIONS:
0. c0d0
/pci@0,0/pci-ide@1f,1/ide@0/cmdk@0,0
1. c1d0

/pci@0,0/pci-ide@1f,1/ide@1/cmdk@0,0
Specify disk (enter its number): ^C

Type CTRL-C to quit “format”.

If your disks do not show up, use devfsadm:

# devfsadm
# format
Searching for disks...done
AVAILABLE DISK SELECTIONS:
0. c0d0
/pci@0,0/pci-ide@1f,1/ide@0/cmdk@0,0
1. c0d1

/pci@0,0/pci-ide@1f,1/ide@0/cmdk@1,0
2. c1d0

/pci@0,0/pci-ide@1f,1/ide@1/cmdk@0,0
3. c1d1

/pci@0,0/pci-ide@1f,1/ide@1/cmdk@1,0
Specify disk (enter its number): ^C

You’ll notice that the virtual disks are mapped as IDE/ATA drives, so the disk device names don’t have a target specification “t”.

Which has helped me to finally find out that my second-hand (i.e. ‘borrowed’ from an old work machine) Adaptec RAID card, doesn’t work with Nexenta Core v2. Still, Core v3 will be out in a few months – maybe I’ll try again then.

Also worth noting, as it may be useful, iostat -En prints out similar information useful when searching for disks to use with ZFS.

3 Comments

  1. dave says:

    You could also have used the command ‘disks’ It took me some digging to find that when new disks wern’t showing up that i had connected to my Supermicro SATA card, see my post here http://www.lewty.org.uk/blog/?p=250

  2. Tom says:

    Thanks for that, Dave! :)

    Presumably you would need to run ‘disks’ only if hot-swapping new disks?

  3. dave says:

    I don’t know tbh, i had rebooted several times with the new disks in and i was scratching my head trying to figure out how to make them show up! Eventually after much googling i came across the ‘disks’ command. It has no output though which is a bit strange. Maybe devfsadm is the ‘proper’ way.

Leave a Reply

You must be logged in to post a comment.