3.4. Creating and mounting an LVM-VDO volume


You can create a VDO logical volume (LV) on a VDO pool LV by using the lvcreate command.

Choose a name for your LVM-VDO, such as vdo1. You must use a different name and device for each LVM-VDO on the system.

Prerequisites

  • Install the VDO software. For more information, see Installing VDO.
  • An LVM volume group with free storage capacity exists on your system.

Procedure

  1. Create the LVM-VDO:

    # lvcreate --type vdo \
               --name vdo1 \
               --size 1T \
               --virtualsize 10T \
               <vg_name>

    Replace 1T with the physical size. If the physical size is larger than 16 TiB, add the following option to increase the slab size on the volume to 32 GiB:

    --vdosettings 'vdo_slab_size_mb=32768'

    If you use the default slab size of 2 GiB on a physical size larger than 16 TiB, the lvcreate command fails with the following error:

    ERROR - vdoformat: formatVDO failed on '/dev/<device>': VDO Status: Exceeds maximum number of slabs supported

    Replace 10T with the logical storage that the LVM-VDO will present.

    Replace <vg_name> with the name of an existing LVM volume group where you want to place the LVM-VDO.

    重要

    If creating the LVM-VDO volume fails, use lvremove <vg_name> to remove the volume. Depending on the reason of the failure, you might also need to add two force options (-ff).

  2. Create a file system on the LVM-VDO:

    • For the XFS file system:

      # mkfs.xfs -K /dev/<vg_name>/<vdo_name>
    • For the ext4 file system:

      # mkfs.ext4 -E nodiscard /dev/<vg_name>/<vdo_name>
  3. Mount the file system on the LVM-VDO volume:

    • To mount the file system persistently, add the following line to the /etc/fstab file:

      /dev/<vg_name>/<vdo_name> <mount_point> <file_system_type> defaults 0 0

      Replace <file_system_type> with your file system, such as xfs or ext4.

    • To mount the file system manually, use the mount command:

      # mount /dev/<vg_name>/<vdo_name> <mount_point>

      If the LVM-VDO volume is located on a block device that requires network, such as iSCSI, add the _netdev mount option. For iSCSI and other block devices requiring network, see the systemd.mount(5) man page for information about the _netdev mount option.

Verification

  • Verify that an LVM-VDO volume is created:

    # lvs
Red Hat logoGithubredditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。 了解我们当前的更新.

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

Theme

© 2026 Red Hat
返回顶部