lsvol

Displays a list of available volumes.

Read syntax diagramSkip visual syntax diagram
>>-lsvol--+----------+--+-------------------------------+------->
          +- –?----+  |          .-default----------. |
          +- –h----+  '- –fmt--+-delim--character-+-'
          '- –help-'             '-xml--------------'

>--+----------------+--+------------------+--------------------->
   |        .-off-. |  |          .-on--. |
   '- –p--+-on--+-'  '- –hdr--+-off-+-'

>--+---------------+--+----------------+--+-------+------------->
   '- –r--number-'  |        .-off-. |  +- –l-+
                      '- –v--+-on--+-'  '- –s-'

>--+-------------------------+--+--------------------------+---->
   '- –pool--+-default---+-'  '- –state--+-activated-+-'
               +-pool_name-+                 +-removed---+
               '-system----'                 '-suspended-'

>--+-----------------+-----------------------------------------><
   | .-------------. |
   | V             | |
   +---volume_name-+-+
   '- – -----------'

Parameters

–? | –h | –help
Displays a detailed description of this command, including syntax, parameter descriptions, and examples. If you specify a help option, all other command options are ignored.
–fmt
Specifies the format of the output. You can specify one of the following values:
default
Specifies to display output in a tabular format using spaces as the delimiter between the columns. This is the default value. For example:
Name   State           Pool        Size (MB)   Used (MB)   Used (%)
===================================================================
Vol1   Activated       P_Accting         700         350         50
delim character
Specifies to display output in a tabular format using the specified character to separate the columns. If you use a shell metacharacter (for example, * or \t) as the delimiting character, enclose the character in single quotation marks (') or double quotation marks ("). A blank space is not a valid character. For example:
Vol1,Activated,P_Accting,700,350,50
xml
Specifies to display output using XML format, for example:
<IRETURNVALUE>
<INSTANCE CLASSNAME="STC_Volume">
<PROPERTY NAME="StoragePoolName" TYPE="string"><VALUE TYPE="string">
P_Accting</VALUE></PROPERTY>
<PROPERTY NAME="Name" TYPE="string"><VALUE TYPE="string">Vol1</VALUE>
</PROPERTY>
<PROPERTY NAME="State" TYPE="uint32"><VALUE TYPE="uint32">0</VALUE>
</PROPERTY>
<PROPERTY NAME="Size" TYPE="uint64"><VALUE TYPE="uint64">700</VALUE>
</PROPERTY>
<PROPERTY NAME="SizeAllocated" TYPE="uint64"><VALUE TYPE="uint64">350
</VALUE></PROPERTY>
<PROPERTY NAME="SizeAllocatedPercentage" TYPE="uint16"><VALUE
TYPE="uint16">50</VALUE></PROPERTY>
</INSTANCE>
</IRETURNVALUE>
–p
Specifies whether to display one page of text at a time or all text at once.
off
Displays all text at one time. This is the default value when the sfscli command is run in single-shot mode.
on
Displays one page of text at time. Pressing any key displays the next page. This is the default value when the sfscli command is run in interactive mode.
–hdr
Specifies whether to display the table header.
on
Displays the table header. This is the default value.
off
Does not display the table header.
–r number
Specifies the number of rows per page to display when the –p parameter is on. The default is 24 rows. You can specify a value from 1 to 100.
–v
Specifies whether to enable verbose mode.
off
Disables verbose mode. This is the default value.
on
Enables verbose mode.
–l
Displays additional information about the volumes.
–s
Displays only the name of the volumes.
–pool pool_name
Specifies the name of the storage pool to display. You can specify one of the following values:
  • default (for the default storage pool)
  • User-defined storage pool name
  • system (for the system storage pool)
–state
Displays only information for those storage pools that match the specified type. Possible types are:
activated
Displays information for all volumes with a status of Activated.
removed
Displays information for all volumes with a status of Being Removed.
suspended
Displays information for all volumes with a status of Suspended.
volume_name
Specifies the names of one or more volumes to list. If unspecified, displays all volume names.
Specifies that you want to read the names of one or more volumes to list from stdin (for example, – << /work/vol_list.txt).

Prerequisites

You must be logged in to the operating system on the engine hosting the master metadata server to run this command.

Description

When you specify multiple parameters in this command, these behaviors apply:
  • Flags work as AND coordinators.
  • Objects work as OR coordinators.
  • When flags and objects are combined, the they are listed in this manner: WHERE flag_1 AND flag_2 AND ... AND flag_n AND (object_1 OR object_2 OR ... OR object_m).
  • When flags or objects are not required and not specified, this command searches all possible values unless a default overrides this rule.
For example, if you specify –pool, –state, and two volume names, the search would be performed in the following manner: WHERE pool AND state AND (volume_name_1 OR volume_name_2).
If you do not specify a listing parameter, this command displays the following default information for each volume:
  • The name of the volume.
  • The state of the volume.
  • The size of the volume, in MB.
    Note: When the metadata server creates a volume, it uses some space for its internal bookkeeping (including the disk label). This command reports the size of the volume as the amount of space that can be used to store data, which does not include the space used for bookkeeping.
  • The amount of space being used, in MB.
  • The percent of space being used.
If you specify the –l listing parameter, this command displays the following information in addition to the default information for each volume:
  • The operating-system device path.
  • The SAN File System volume ID.
  • The volume description.

Example

Display a list of volumes The following example lists all the attributes of all the volumes:
sfscli> lsvol –l

Name   State           Pool        Size (MB)   Used (MB)   Used (%)
===================================================================
Vol1   Activated       P_Accting         700         350         50
Vol2   Being Removed   P_Accting         700         175         25

Device Path     Vol ID   Description
=====================================
/dev/hrvpatha   912478   Department 1
/dev/hrvpathb   807890   Department 2

Parent topic: Administrative commands

Related reference
activatevol
chvol
expandvol
lslun
mkvol
rediscoverluns
reportvolfiles
rmvol
suspendvol

Terms of use | Feedback
(C) Copyright IBM Corporation 2003, 2004. All Rights Reserved.