Professional Web Applications Themes

Listing Disks in Solaris - Sun Solaris

Hi How can I programmatically list disks and their sizes in Solaris? Is there a way to extract lets say scsi disks from that list? Thanks...

  1. #1

    Default Listing Disks in Solaris

    Hi
    How can I programmatically list disks and their sizes in Solaris?
    Is there a way to extract lets say scsi disks from that list?
    Thanks
    babak Guest

  2. #2

    Default Re: Listing Disks in Solaris


    "babak" <berkeley.edu> wrote in message
    news:google.com... 

    You would typically use the facilities provided by libdevinfo (which reads
    the kernel device tree) to do this. Not sure about extracting SCSI disks
    only, but I guess you could try a SCSI enquiry against each.

    Cheers,
    Shaun


    Shaun Guest

  3. #3

    Default Re: Listing Disks in Solaris

    berkeley.edu (babak) wrote in message news:<google.com>... 

    I doubt there is a ready command for this.
    The easiest, IMHO, would be to write a script that ps
    output of "format" (which can be run non-interactively and gives
    the list of disks and their sizes - well, at least one can
    calculate the sizes, assuming all sectors are 512 bytes).
    "format" also gives the device path, from which the driver name
    can be derived. Knowing which drivers are SCSI ones
    (SUNW,fas SUNW,scsi etc.), helps to select the SCSI disks.

    Regards,
    Andrei
    aryzhov Guest

  4. #4

    Default Re: Listing Disks in Solaris

    com (aryzhov) wrote in message news:<google.com>... 
    >
    > I doubt there is a ready command for this.
    > The easiest, IMHO, would be to write a script that ps
    > output of "format" (which can be run non-interactively and gives
    > the list of disks and their sizes - well, at least one can
    > calculate the sizes, assuming all sectors are 512 bytes).
    > "format" also gives the device path, from which the driver name
    > can be derived. Knowing which drivers are SCSI ones
    > (SUNW,fas SUNW,scsi etc.), helps to select the SCSI disks.
    >
    > Regards,
    > Andrei[/ref]

    guess iostat -En might help you if you want the sizes of disks(not the
    size of slices in disk).
    For more info man iostat.
    Nicole Guest

  5. #5

    Default Re: Listing Disks in Solaris


    "Shaun Clowes" <spam.for.me.progsoc.org> wrote in message
    news:m8oeb.53$optus.net.au... 
    >
    > You would typically use the facilities provided by libdevinfo (which reads
    > the kernel device tree) to do this. Not sure about extracting SCSI disks
    > only, but I guess you could try a SCSI enquiry against each.[/ref]

    Sorry, I missed the bit about sizes, that can be easily retrieved from the
    vtoc, check out read_vtoc(3X) or the ioctl it calls (DKIOCGEOM) in dkio(7I)

    Cheers,
    Shaun


    Shaun Guest

Similar Threads

  1. Replies: 5
    Last Post: December 30th, 11:30 PM
  2. Jaz and Zip disks no longer work as start disks
    By Tony in forum Mac Applications & Software
    Replies: 8
    Last Post: September 6th, 06:01 AM
  3. Replies: 3
    Last Post: August 13th, 03:43 PM
  4. Help Needed: G4 freezes when using Install disks...both 9.2.2and X disks.
    By William in forum Mac Applications & Software
    Replies: 3
    Last Post: July 28th, 08:01 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139