Manually extend a ZFS-based Zesty Disk filesystem

Manually extend a ZFS-based Zesty Disk filesystem

This topic describes how to manually extend a ZFS-based Zesty Disk filesystem.

Manual actions may be reverted automatically by the Zesty Disk backend according to the Zesty Disk algorithm and the state of the filesystem.

You can extend in the following ways:

Extend a volume that is already part of a Zesty Disk filesystem

This section describes how to manually extend a ZFS filesystem by extending a volume that is part of that filesystem.

Prerequisites

Limitations

To see the AWS requirements for modifying an EBS volume, see Requirements for Amazon EBS volume modifications (opens in new tab). After modifying a volume, that volume cannot be further modified for at least six hours.

To extend a volume:

  1. From the Zesty platform, select Zesty Disk.

  2. In the Managed filesystems tab, select the filesystem to extend.

The filesystem disk details and devices are displayed.

  1. From the Overview tab, identify the relevant EBS volume to increase.

Use the value in the Volume ID column to identify the volume in the AWS console.

  1. Extend the EBS volume in your AWS console, as described in Request Amazon EBS volume modifications (opens in new tab).

  2. Connect to the instance with CLI root access.

  3. Identify the pool name by running the following command:

zfs list

Output similar to the following is displayed:

  1. Identify the device name of the extended device by running the following command:

ls -l /dev/disk/by-id/ | grep <id>

Where is the ID number (only) of the AWS volume ID.

Output similar to the following is displayed:

Find the device name that aligns with the volume ID (from step 3). In our example, the device name is nvme8n1.

  1. Instruct the ZFS filesystem to expand the pool by running the following command:

zpool online -e <pool_name> <device_name>

Example: zpool online -e mnt nvme8n1

This command updates the capacity that ZFS uses to the maximum available capacity for the volume in the ZFS pool.

Where:

  1. (Optional) You can see the new pool capacity by running the zpool list command.

Add a new EBS volume

This section describes how to manually extend a ZFS filesystem by adding a new EBS volume to the filesystem.

Prerequisites

Limitations

AWS limits the amount of EBS volumes that can be attached to an EC2 instance, as described in Amazon EBS volume limits for Amazon EC2 instances (opens in new tab).

To add a new volume:

  1. From the AWS console, create a new EBS volume with the desired size following these guidelines:
  1. Attach the volume to the instance.

For more information, see Attach an Amazon EBS volume to an Amazon EC2 instance (opens in new tab).

  1. Connect to the instance with CLI root access.

  2. Identify the device path of the new attached EBS:

  3. Run the following command:

lsblk -o NAME,SERIAL,MOUNTPOINT -n | awk '$2 ~ /^vol/ {print $1,$2}' | sed s/vol/vol-/g

The output contains pairs of device names and the corresponding AWS volume IDs. For example:

  1. Identify the device name that is associated with the EBS volume. In our example, the created volume ID (from AWS) is “vol-0db571ecc7fc9cf95,” so the device name is /dev/nvme1n1.
  2. Add the new device to the ZFS pool by running the following command:

zpool add <pool_name> <device_name>

Example: zpool add zdata /dev/nvme1n1

  1. (Optional) You can see the new pool capacity by running the zpool list command.