---
title: block-device
description: Canonical makes open source secure, reliable and easy to use, providing
  support for Ubuntu and a portfolio of enterprise-grade technologies. Founded in
  2004, Canonical operates globally with team members in over 80 countries.
url: https://canonical-com-2934.demos.haus/maas/docs/block-device?format=md
---

*Submit*

# block-device

Enter keyword arguments in the form `key=value`.

## [Add a tag](https://canonical-com-2934.demos.haus/maas/docs/block-device?format=md#p-4546-add-a-tag)

```
maas $PROFILE block-device add-tag [--help] [-d] [-k] system_id id [data ...]
```

#### Positional arguments

* system\_id
* id

Add a tag to block device on a given machine.

#### Keyword “tag”

Required String. The tag being added.

#### Command-line options

| Option | Effect |
| --- | --- |
| –help, -h | Show this help message and exit. |
| -d, --debug | Display more information about API responses. |
| -k, --insecure | Disable SSL certificate check |

## [Delete a block device](https://canonical-com-2934.demos.haus/maas/docs/block-device?format=md#p-4546-delete-a-block-device)

```
maas $PROFILE block-device delete [--help] [-d] [-k] system_id id [data ...]
```

#### Positional arguments

* system\_id
* id

Delete block device on a given machine.

#### Command-line options

| Option | Effect |
| --- | --- |
| –help, -h | Show this help message and exit. |
| -d, --debug | Display more information about API responses. |
| -k, --insecure | Disable SSL certificate check |

## [Format block device](https://canonical-com-2934.demos.haus/maas/docs/block-device?format=md#p-4546-format-block-device)

```
maas $PROFILE block-device format [--help] [-d] [-k] system_id id [data ...]
```

#### Positional arguments

* system\_id
* id

Format block device with filesystem.

#### Keyword “fstype”

Required String. Type of filesystem.

#### Keyword “uuid”

Optional String. UUID of the filesystem.

#### Command-line options

| Option | Effect |
| --- | --- |
| –help, -h | Show this help message and exit. |
| -d, --debug | Display more information about API responses. |
| -k, --insecure | Disable SSL certificate check |

## [Mount a filesystem](https://canonical-com-2934.demos.haus/maas/docs/block-device?format=md#p-4546-mount-a-filesystem)

```
maas $PROFILE block-device mount [--help] [-d] [-k] system_id id [data ...]
```

#### Positional arguments

* system\_id
* id

Mount the filesystem on block device.

#### Keyword “mount\_point”

Required String. Path on the filesystem to mount.

#### Keyword “mount\_options”

Optional String. Options to pass to mount(8).

#### Command-line options

| Option | Effect |
| --- | --- |
| –help, -h | Show this help message and exit. |
| -d, --debug | Display more information about API responses. |
| -k, --insecure | Disable SSL certificate check |

## [Read a block device](https://canonical-com-2934.demos.haus/maas/docs/block-device?format=md#p-4546-read-a-block-device)

```
maas $PROFILE block-device read [--help] [-d] [-k] system_id id [data ...]
```

#### Positional arguments

* system\_id
* id

Read a block device on a given machine.

#### Command-line options

| Option | Effect |
| --- | --- |
| –help, -h | Show this help message and exit. |
| -d, --debug | Display more information about API responses. |
| -k, --insecure | Disable SSL certificate check |

## [Remove a tag](https://canonical-com-2934.demos.haus/maas/docs/block-device?format=md#p-4546-remove-a-tag)

```
maas $PROFILE block-device remove-tag [--help] [-d] [-k] system_id id [data ...]
```

#### Positional arguments

* system\_id
* id

Remove a tag from block device on a given machine.

#### Keyword “tag”

Optional String. The tag being removed.

#### Command-line options

| Option | Effect |
| --- | --- |
| –help, -h | Show this help message and exit. |
| -d, --debug | Display more information about API responses. |
| -k, --insecure | Disable SSL certificate check |

## [Set boot disk](https://canonical-com-2934.demos.haus/maas/docs/block-device?format=md#p-4546-set-boot-disk)

```
maas $PROFILE block-device set-boot-disk [--help] [-d] [-k] system_id id [data ...]
```

#### Positional arguments

* system\_id
* id

Set a block device as the boot disk for the machine.

#### Command-line options

| Option | Effect |
| --- | --- |
| –help, -h | Show this help message and exit. |
| -d, --debug | Display more information about API responses. |
| -k, --insecure | Disable SSL certificate check |

## [Unformat a block device](https://canonical-com-2934.demos.haus/maas/docs/block-device?format=md#p-4546-unformat-a-block-device)

```
maas $PROFILE block-device unformat [--help] [-d] [-k] system_id id [data ...]
```

#### Positional arguments

* system\_id
* id

Unformat a previously formatted block device.

#### Command-line options

| Option | Effect |
| --- | --- |
| –help, -h | Show this help message and exit. |
| -d, --debug | Display more information about API responses. |
| -k, --insecure | Disable SSL certificate check |

## [Unmount a filesystem](https://canonical-com-2934.demos.haus/maas/docs/block-device?format=md#p-4546-unmount-a-filesystem)

```
maas $PROFILE block-device unmount [--help] [-d] [-k] system_id id [data ...]
```

#### Positional arguments

* system\_id
* id

Unmount the filesystem on block device.

#### Command-line options

| Option | Effect |
| --- | --- |
| –help, -h | Show this help message and exit. |
| -d, --debug | Display more information about API responses. |
| -k, --insecure | Disable SSL certificate check |

## [Update a block device](https://canonical-com-2934.demos.haus/maas/docs/block-device?format=md#p-4546-update-a-block-device)

```
maas $PROFILE block-device update [--help] [-d] [-k] system_id id [data ...]
```

#### Positional arguments

* system\_id
* id

Update block device on a given machine.

Machines must have a status of Ready to have access to all options. Machines with Deployed status can only have the name, model, serial, and/or id\_path updated for a block device. This is intented to allow a bad block device to be replaced while the machine remains deployed.

#### Keyword “name”

Optional String. (Physical devices) Name of the block device.

#### Keyword “model”

Optional String. (Physical devices) Model of the block device.

#### Keyword “serial”

Optional String. (Physical devices) Serial number of the block device.

#### Keyword “id\_path”

Optional String (physical device). Only used if model and serial cannot be provided. This should be a path that is fixed and doesn’t change depending on the boot order or kernel version.

#### Keyword “size”

Optional String. (Physical devices) Size of the block device.

#### Keyword “block\_size”

Optional String. (Physical devices) Block size of the block device.

#### Keyword “name”

Optional String. (Virtual devices) Name of the block device.

#### Keyword “uuid”

Optional String. (Virtual devices) UUID of the block device.

#### Keyword “size”

Optional String. (Virtual devices) Size of the block device. (Only allowed for logical volumes.)

#### Command-line options

| Option | Effect |
| --- | --- |
| –help, -h | Show this help message and exit. |
| -d, --debug | Display more information about API responses. |
| -k, --insecure | Disable SSL certificate check |

## [Create a block device](https://canonical-com-2934.demos.haus/maas/docs/block-device?format=md#p-4546-create-a-block-device)

```
maas $PROFILE block-devices create [--help] [-d] [-k] system_id [data ...]
```

#### Positional arguments

* system\_id

Create a physical block device.

#### Keyword “name”

Required String. Name of the block device.

#### Keyword “model”

Optional String. Model of the block device.

#### Keyword “serial”

Optional String. Serial number of the block device.

#### Keyword “id\_path”

Optional String. Only used if model and serial cannot be provided. This should be a path that is fixed and doesn’t change depending on the boot order or kernel version.

#### Keyword “size”

Required String. Size of the block device.

#### Keyword “block\_size”

Required String. Block size of the block device.

#### Command-line options

| Option | Effect |
| --- | --- |
| –help, -h | Show this help message and exit. |
| -d, --debug | Display more information about API responses. |
| -k, --insecure | Disable SSL certificate check |

## [List block devices](https://canonical-com-2934.demos.haus/maas/docs/block-device?format=md#p-4546-list-block-devices)

```
maas $PROFILE block-devices read [--help] [-d] [-k] system_id [data ...]
```

#### Positional arguments

* system\_id

List all block devices belonging to a machine.

#### Command-line options

| Option | Effect |
| --- | --- |
| –help, -h | Show this help message and exit. |
| -d, --debug | Display more information about API responses. |
| -k, --insecure | Disable SSL certificate check |

---

[Previous

bcache-cache-set](https://canonical-com-2934.demos.haus/maas/docs/bcache-cache-set)
[Next

boot-resource](https://canonical-com-2934.demos.haus/maas/docs/boot-resource)

Last updated 1 year, 6 months ago. [Help improve this document in the forum](https://discourse.maas.io/t/block-device/2357).
