Skip to content

serviced-storage

The serviced-storage command manages Control Center storage.

Use this command to create LVM thin pools for Docker and Control Center.

USAGE

serviced-storage [GlobalOptions] Command [CommandOptions]

GLOBAL OPTIONS

[--help|-h]

Show the help message.

-o DeviceMapperOption=Value

Specify a device mapper option. Applies only to device mapper drivers.

-v

Display verbose logging.

COMMANDS

check

Check for orphaned devices.

create

Create a volume on a driver.

create-thin-pool

Create an LVM thin pool.

disable

Disable a driver.

init

Initialize a driver.

list

Print volumes on a driver.

mount

Mount an existing volume from a driver.

remove

Remove an existing volume from a driver.

resize

Resize an existing volume.

set

Set the default driver.

status

Print the driver status

sync

Sync data from a volume to another volume.

unset

Unset the default driver.

version

Print the version and exit.

serviced-storage check

The serviced-storage check command searches for orphaned snapshot devices in the serviced application data thin pool and removes them, if requested. This command requires the path of serviced tenant volumes, which is determined by the SERVICED_VOLUMES_PATH variable in /etc/default/serviced. The default path is /opt/serviced/var/volumes.

Syntax:

serviced-storage [GlobalOptions] check [-c|--clean] Path

Command options:

[-c|–clean]

Remove orphaned snapshot devices.

EXAMPLES

Identify the serviced application data thin pool, and then remove orphaned snapshot devices.

ls /dev/mapper | grep serviced
serviced-storage -o dm.thinpooldev=/dev/mapper/zenoss-serviced--pool \
  check -c /opt/serviced/var/volumes

serviced-storage create-thin-pool

The serviced-storage create-thin-pool command creates an LVM thin pool either for Docker data or for Control Center application data. When devices are specified, the command creates an LVM volume group.

Syntax:

serviced-storage [GlobalOptions] create-thin-pool \ [-s|--size]=[Value][G|%] [docker|serviced] \ [DevicePath [DevicePath...]|VolumeGroupName]

Command options:

[-s|–size]=[Value][G|%]

The size of the thin pool to create. The size can be a fixed value (in gigabytes) or a relative value (a percentage) of the available storage. When this option is not used, the thin pool size defaults to 90% of the specified storage resource.

EXAMPLES

Create an LVM volume group named zenoss and use it for both thin pools:

vgcreate zenoss /dev/sdb /dev/sdc
serviced-storage create-thin-pool --size=50G docker zenoss
serviced-storage create-thin-pool --size=50% serviced zenoss

If you specify devices or partitions, serviced-storage creates an LVM volume group with the same name as the thin pool. The following example yields the same result as the previous, except the name of the volume group is docker instead of zenoss:

serviced-storage create-thin-pool docker /dev/sdb /dev/sdc
serviced-storage create-thin-pool serviced docker

Create thin pools on separate block devices:

serviced-storage create-thin-pool docker /dev/sdb
serviced-storage create-thin-pool serviced /dev/sdc

Create thin pools on separate partitions:

serviced-storage create-thin-pool docker /dev/sdb1
serviced-storage create-thin-pool serviced /dev/sdc3

serviced-storage resize

The serviced-storage resize command increases the size of a serviced tenant device in its LVM thin pool. Like LVM thin pools, the size of a serviced tenant device can never decrease.

Stop the serviced daemon before running serviced-storage resize.

Syntax:

serviced-storage [GlobalOptions] resize [-d|--driver]=Value TenantID NewSize

Command options:

[-d|–driver]=Value

The path of the tenant volume.

EXAMPLES

Increase the size of the serviced LVM thin pool, and then increase the size of a serviced tenant device.

lvextend -L+300G zenoss/serviced-pool
systemctl stop serviced
serviced-storage resize -o dm.thinpooldev=/dev/mapper/serviced-serviced--pool \
  -d /opt/serviced/var/volumes 58uuetj38draeu9alp6002b1y 200G
systemctl start serviced