4 Replies Latest reply: May 21, 2013 10:51 AM by raovolvoadmin RSS

Question: Spare disks in Filer

raovolvoadmin
Currently Being Moderated

Hi,

 

I m working on the "aggr create" workflow.I want to display the existing available "Spare disks" with the size in the workflow using the SQL query.

 

How to get the Spare disks info using the SQL query?.

 

Regards

Rao.

  • Re: Question: Spare disks in Filer
    shailaja
    Currently Being Moderated

    Hi,

     

    Disk information in WFA cache is available only from 2.0.1 release and so I hope you are using the 2.0.1 release which is the latest.

    Once the cache acquisition is done from your OnCommand data source, you can use queries to know spare disk information.

     

    Something like:

     

    Array user input:

    ------------------

    SELECT

        array.ip AS 'Array Primary Address',

        array.name AS 'Array Name',

        COUNT(disk.name) AS 'Spare Disk Count',

        SUM(disk.size_mb) AS 'Total Spare Disk Size (MB)'

    FROM

        storage.array,

        storage.disk

    WHERE

        disk.array_id = array.id

        AND disk.role = 'spare'

    GROUP BY

        disk.array_id

     

     

    Spare Disk list:

    ------------------

    SELECT

        disk.name AS DiskName,

        disk.type AS Type,

        disk.size_mb AS 'Size (MB)'

    FROM

        storage.disk,

        storage.array

    WHERE

        role = 'spare'

        AND array.id = disk.array_id

        AND array.ip = '${ArrayIP}'

     

    These queries can be modified based on what exactly you would like to display or in filters based on your workflow design.

     

    Attachments:

    - A sample output of the first query from some test systems.

    - A sample output of the second query from some test systems.

    - Definition of "storage.Disk" dictionary entry which internally becomes the cache table definition.

     

    Thanks,

    Shailaja

     

    array_spare_disk_info.png

     

    disk_user_input.png

     

    disk_dictionary_entry.png

More Like This

  • Retrieving data ...