502
Celerra Network Server Command Reference Manual
Using Celerra Command Scripts
Following is an example of a query to view unused disks:
nas_disk -query:inuse==n -format:'%s\n' -Fields:Id
To filter root disks, refer to the List all non-root disks that are not in use
in Table 10.
Examples
Use the following commands to view the tags (fields) that you can
query:
nas_disk –query:tags
nas_fs –query:tags
nas_volume –query:tags
nas_slice -query:tags
Table 2 contains a list of examples to help you get started. Note that
these commands can be run on the Control Station CLI, so the
hardcoded values can be replaced with shell script variables.
Table 2 Task and query examples (Sheet 1 of 2)
Task Example
Query the ID of a named file system nas_fs -query:Name==RLL_fs10 -format:'%s\n'
-Fields:Id
Query the ID of a named file system
without the new line
nas_fs -query:Name==RLL_fs10 -format:'%s'
-Fields:Id
Query the name of a file system ID that
corresponds to a particular ID
nas_fs -query:id==20 -format:'%s\n' -Fields:Name
List of all server IDs nas_server -query:* -format:'%s\n' -Fields:Id
List of all server names nas_server -query:* -format:'%s\n' -Fields:Name
List of all the checkpoint file systems nas_fs -query:type==ckpt -fields:name
-format:"%s\n"
List type of file system with ID 20 nas_fs -query:id==20 -format:'%s\n' -Fields:Type
List the file systems that are in use nas_fs -query:inuse==y -format:'%s\n' -Fields:Name
or
nas_fs -query:inuse==y -format:'%s\n' -Fields:Id
Identify file system of which file system ID
28 is a backup
nas_fs -query:id==28 -format:'%s' -Fields:BackupOf