github.com/NVIDIA/aistore@v1.3.23-0.20240517131212-7df6609be51d/docs/cli/advanced.md (about)

     1  ---
     2  layout: post
     3  title: ADVANCED
     4  permalink: /docs/cli/advanced
     5  redirect_from:
     6   - /cli/advanced.md/
     7   - /docs/cli/advanced.md/
     8  ---
     9  
    10  # `ais advanced` commands
    11  
    12  Commands for special use cases (e.g. scripting) and *advanced* usage scenarios, whereby a certain level of understanding of possible consequences is implied and required:
    13  
    14  ```console
    15  $ ais advanced --help
    16  NAME:
    17     ais advanced - special commands intended for development and advanced usage
    18  
    19  USAGE:
    20     ais advanced command [command options] [arguments...]
    21  
    22  COMMANDS:
    23     gen-shards        generate and write random TAR shards, e.g.:
    24                       - gen-shards 'ais://bucket1/shard-{001..999}.tar' - write 999 random shards (default sizes) to ais://bucket1
    25                       - gen-shards 'gs://bucket2/shard-{01..20..2}.tgz' - 10 random gzipped tarfiles to Cloud bucket
    26                       (notice quotation marks in both cases)
    27     resilver          resilver user data on a given target (or all targets in the cluster): fix data redundancy
    28                       with respect to bucket configuration, remove migrated objects and old/obsolete workfiles
    29     preload           preload object metadata into in-memory cache
    30     remove-from-smap  immediately remove node from cluster map (advanced usage - potential data loss!)
    31     random-node       print random node ID (by default, random target)
    32     random-mountpath  print a random mountpath from a given target
    33     rotate-logs       rotate logs
    34  ```
    35  
    36  AIS CLI features a number of miscellaneous and advanced-usage commands.
    37  
    38  ## Table of Contents
    39  - [Manual Resilvering](#manual-resilvering)
    40  - [Preload bucket](#preload-bucket)
    41  - [Remove node from Smap](#remove-node-from-smap)
    42  
    43  ## Manual Resilvering
    44  
    45  `ais advanced resilver [TARGET_ID]`
    46  
    47  Start resilvering objects across all drives on one or all targets.
    48  If `TARGET_ID` is specified, only that node will be resilvered. Otherwise, all targets will be resilvered.
    49  
    50  ### Examples
    51  
    52  ```console
    53  $ ais advanced resilver # all targets will be resilvered
    54  Started resilver "NGxmOthtE", use 'ais show job xaction NGxmOthtE' to monitor the progress
    55  
    56  $ ais advanced resilver BUQOt8086  # resilver a single node
    57  Started resilver "NGxmOthtE", use 'ais show job xaction NGxmOthtE' to monitor the progress
    58  ```
    59  
    60  ## Preload bucket
    61  
    62  `ais advanced preload BUCKET`
    63  
    64  Preload bucket's objects metadata into in-memory caches.
    65  
    66  ### Examples
    67  
    68  ```console
    69  $ ais advanced preload ais://bucket
    70  ```
    71  
    72  ## Remove node from Smap
    73  
    74  `ais advanced remove-from-smap NODE_ID`
    75  
    76  Immediately remove node from the cluster map.
    77  
    78  Beware! When the node in question is ais target, the operation may (and likely will) result in a data loss that cannot be undone. Use decommission and start/stop maintenance operations to perform graceful removal.
    79  
    80  Any attempt to remove from the cluster map `primary` - ais gateway that currently acts as the primary (aka leader) - will fail.
    81  
    82  ### Examples
    83  
    84  ```console
    85  $ ais show cluster proxy
    86  PROXY            MEM USED %      MEM AVAIL       UPTIME
    87  BcnQp8083        0.17%           31.12GiB        6m50s
    88  xVMNp8081        0.16%           31.12GiB        6m50s
    89  MvwQp8080[P]     0.18%           31.12GiB        6m40s
    90  NnPLp8082        0.16%           31.12GiB        6m50s
    91  
    92  
    93  $ ais advanced remove-from-smap MvwQp8080
    94  Node MvwQp 8080 is primary: cannot remove
    95  
    96  $ ais advanced remove-from-smap p[xVMNp8081]
    97  $ ais show cluster proxy
    98  PROXY            MEM USED %      MEM AVAIL       UPTIME
    99  BcnQp8083        0.16%           31.12GiB        8m
   100  NnPLp8082        0.16%           31.12GiB        8m
   101  MvwQp8080[P]     0.19%           31.12GiB        7m50s
   102  ```
   103  
   104  
   105  ## Rotate logs: individual nodes or entire cluster
   106  
   107  Usage: `ais advanced rotate-logs [NODE_ID]`
   108  
   109  Example:
   110  
   111  ```console
   112  $ ais show log t[kOktEWrTg]
   113  
   114  Started up at 2023/11/07 18:06:22, host u2204, go1.21.1 for linux/amd64
   115  W 18:06:22.930488 config:1713 load initial global config "/root/.ais1/ais.json"
   116  ...
   117  ...
   118  ```
   119  
   120  Now, let's go ahead and rotate:
   121  
   122  ```console
   123  $ ais advanced rotate-logs t[kOktEWrTg]
   124  t[kOktEWrTg]: rotated logs
   125  
   126  $ ais show log t[kOktEWrTg]
   127  Rotated at 2023/11/07 18:07:31, host u2204, go1.21.1 for linux/amd64
   128  Node t[kOktEWrTg], Version 3.21.1.69a90d64b, build time 2023-11-07T18:06:19-0500, debug false, CPUs(16, runtime=16)
   129  ...
   130  ```