github.com/containers/podman/v2@v2.2.2-0.20210501105131-c1e07d070c4c/docs/source/markdown/podman-volume-create.1.md (about)

     1  % podman-volume-create(1)
     2  
     3  ## NAME
     4  podman\-volume\-create - Create a new volume
     5  
     6  ## SYNOPSIS
     7  **podman volume create** [*options*]
     8  
     9  ## DESCRIPTION
    10  
    11  Creates an empty volume and prepares it to be used by containers. The volume
    12  can be created with a specific name, if a name is not given a random name is
    13  generated. You can add metadata to the volume by using the **--label** flag and
    14  driver options can be set using the **--opt** flag.
    15  
    16  ## OPTIONS
    17  
    18  #### **--driver**=*driver*
    19  
    20  Specify the volume driver name (default local).
    21  
    22  #### **--help**
    23  
    24  Print usage statement
    25  
    26  #### **--label**=*label*, **-l**
    27  
    28  Set metadata for a volume (e.g., --label mykey=value).
    29  
    30  #### **--opt**=*option*, **-o**
    31  
    32  Set driver specific options.
    33  For the default driver, `local`, this allows a volume to be configured to mount a filesystem on the host.
    34  For the `local` driver the following options are supported: `type`, `device`, and `o`.
    35  The `type` option sets the type of the filesystem to be mounted, and is equivalent to the `-t` flag to **mount(8)**.
    36  The `device` option sets the device to be mounted, and is equivalent to the `device` argument to **mount(8)**.
    37  The `o` option sets options for the mount, and is equivalent to the `-o` flag to **mount(8)** with two exceptions.
    38  The `o` option supports `uid` and `gid` options to set the UID and GID of the created volume that are not normally supported by **mount(8)**.
    39  Using volume options with the `local` driver requires root privileges.
    40  
    41  ## EXAMPLES
    42  
    43  ```
    44  $ podman volume create myvol
    45  
    46  $ podman volume create
    47  
    48  $ podman volume create --label foo=bar myvol
    49  
    50  # podman volume create --opt device=tmpfs --opt type=tmpfs --opt o=nodev,noexec myvol
    51  
    52  # podman volume create --opt device=tmpfs --opt type=tmpfs --opt o=uid=1000,gid=1000 testvol
    53  ```
    54  
    55  ## SEE ALSO
    56  podman-volume(1), mount(8)
    57  
    58  ## HISTORY
    59  November 2018, Originally compiled by Urvashi Mohnani <umohnani@redhat.com>