github.com/anth0d/nomad@v0.0.0-20221214183521-ae3a0a2cad06/website/content/docs/commands/volume/status.mdx (about)

     1  ---
     2  layout: docs
     3  page_title: 'Commands: volume status'
     4  description: |
     5    Display information and status of volumes.
     6  ---
     7  
     8  # Command: volume status
     9  
    10  The `volume status` command displays status information for [Container
    11  Storage Interface (CSI)][csi] volumes.
    12  
    13  ## Usage
    14  
    15  ```plaintext
    16  nomad volume status [options] [volume]
    17  ```
    18  
    19  This command accepts an optional volume ID or prefix as the sole argument. If there
    20  is an exact match based on the provided volume ID or prefix, then information about
    21  the specific volume is queried and displayed. Otherwise, a list of matching volumes
    22  and information will be displayed.
    23  
    24  If the ID is omitted, the command lists out all of the existing volumes and a few
    25  of the most useful status fields for each.
    26  
    27  When ACLs are enabled, this command requires a token with the
    28  `csi-read-volume` and `csi-list-volumes` capability for the volume's
    29  namespace.
    30  
    31  ## General Options
    32  
    33  @include 'general_options.mdx'
    34  
    35  ## Status Options
    36  
    37  - `-type`: Display only volumes of a particular type. Currently only
    38    the `csi` type is supported, so this option can be omitted when
    39    querying the status of CSI volumes.
    40  
    41  - `-plugin_id`: Display only volumes managed by a particular [CSI
    42    plugin][csi_plugin].
    43  
    44  - `-short`: Display short output. Used only when a single volume is
    45    being queried. Drops verbose volume allocation data from the
    46    output.
    47  
    48  - `-verbose`: Show full information. Allocation create and modify times are
    49    shown in `yyyy/mm/dd hh:mm:ss` format. When listing volumes, this flag will
    50    cause Nomad to query the storage provider for volumes that are known to the
    51    storage provider but not yet registered with Nomad. This may include volumes
    52    that have been created by the [`volume create`] command that are not yet
    53    schedulable.
    54  
    55  ## Examples
    56  
    57  List of all volumes:
    58  
    59  ```shell-session
    60  $ nomad volume [-type csi] status
    61  ID            Name      Plugin ID  Schedulable  Access Mode
    62  ebs_prod_db1  database  ebs-prod   true         single-node-writer
    63  ```
    64  
    65  List of all volumes, with external provider info:
    66  
    67  ```shell-session
    68  $ nomad volume [-type csi] status -verbose
    69  ID            Name      Plugin ID  Schedulable  Access Mode
    70  ebs_prod_db1  database  ebs-prod   true         single-node-writer
    71  
    72  External ID   Condition                         Nodes
    73  vol-abcedf    OK                                i-abc123f2,i-14a12df13
    74  vol-cd46df    Abnormal (provider message here)  i-14a12df13
    75  ```
    76  
    77  Short view of a specific volume:
    78  
    79  ```shell-session
    80  $ nomad volume status [-verbose] [-plugin=ebs-prod] ebs_prod_db1
    81  ID                   = ebs_prod_db1
    82  Name                 = database
    83  Type                 = csi
    84  External ID          = vol-23452345
    85  Plugin ID            = ebs-prod
    86  Provider             = aws.ebs
    87  Version              = 1.0.1
    88  Schedulable          = true
    89  Controllers Healthy  = 1
    90  Controllers Expected = 1
    91  Nodes Healthy        = 1
    92  Nodes Expected       = 1
    93  Access Mode          = single-node-writer
    94  Attachment Mode      = file-system
    95  Mount Options        = fs_type: ext4 flags: ro
    96  Namespace            = default
    97  ```
    98  
    99  Full status information of a volume:
   100  
   101  ```shell-session
   102  $ nomad volume status [-verbose] [-plugin=ebs-prod] ebs_prod_db1
   103  ID                   = ebs_prod_db1
   104  Name                 = database
   105  Type                 = csi
   106  External ID          = vol-23452345
   107  Plugin ID            = ebs-prod
   108  Provider             = aws.ebs
   109  Version              = 1.0.1
   110  Schedulable          = true
   111  Controllers Healthy  = 1
   112  Controllers Expected = 1
   113  Nodes Healthy        = 1
   114  Nodes Expected       = 1
   115  Access Mode          = single-node-writer
   116  Attachment Mode      = file-system
   117  Mount Options        = fs_type: ext4 flags: ro
   118  Namespace            = default
   119  
   120  Allocations
   121  ID        Node ID   Access Mode   Task Group  Version  Desired  [...]
   122  b00fa322  28be17d5  write         csi         0        run
   123  ```
   124  
   125  [csi]: https://github.com/container-storage-interface/spec
   126  [csi_plugin]: /docs/job-specification/csi_plugin
   127  [`volume create`]: /docs/commands/volume/create