@akamai/openapi-ts
    Preparing search index...

    Function postAddLinodeDisk

    • Create a disk

      Add a new disk to an existing Linode. You can create an empty disk to manually configure it later. You can also target a stored image to build the disk using a pre-configured file system--either through an image you've created or via a StackScript. For added security with all disks, you should supply SSH keys for the disk's root_pass user, using the authorized_keys field.

      📘

      A Linode can have up to 50 disks.

      Empty disks

      • When creating an empty disk, a label is required.

      • The default file system for an empty disk is ext4.

      Disks created from an image

      • A root_pass is required for a disk created from a stored image.

      • A created disk inherits both the label and the filesystem from the target image, unless you specify otherwise.

      • We offer an example workflow to create a disk using a stored image.

      Disks created from a StackScript

      • You can run List StackScripts to review available StackScripts.

      • You need to include a StackScript-compatible image when creating the disk. Run Get a StackScript to review available images.

      <>


      • CLI.
      linode-cli linodes disk-create 123 \
      --size 1300 \
      --authorized_keys "ssh-rsa AAAA_valid_public_ssh_key_123456785== user@their-computer" \
      --authorized_users "myUser" \
      --authorized_users "secondaryUser" \
      --root_pass aComplex@Password \
      --image "linode/debian9" \
      --stackscript_id 10079 \
      --stackscript_data '{"gh_username": "linode"}'

      Learn more...

      • OAuth scopes.
      linodes:read_write
      

      Learn more...

      Type Parameters

      • ThrowOnError extends boolean = true

      Returns RequestResult<
          PostAddLinodeDiskResponses,
          PostAddLinodeDiskErrors,
          ThrowOnError,
          "data",
      >