Bug 2061997 - read only vpool conversion attempt could give better failure output, or state it's not supported
Summary: read only vpool conversion attempt could give better failure output, or state...
Keywords:
Status: NEW
Alias: None
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: lvm2
Version: 9.0
Hardware: x86_64
OS: Linux
unspecified
low
Target Milestone: rc
: ---
Assignee: Zdenek Kabelac
QA Contact: cluster-qe
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-03-08 21:29 UTC by Corey Marthaler
Modified: 2023-08-10 15:40 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker RHELPLAN-114888 0 None None None 2022-03-08 21:39:42 UTC

Description Corey Marthaler 2022-03-08 21:29:39 UTC
Description of problem:
Read only volume creations are supported, however when attempting to convert (or even just --test convert) an existing RO pool volume, the cmd fails (which is some what expected). If it's not supported, the stderr could provide more as to why? That said, both the of the failing commands do indirectly state "couldn't write to vdo pool" so maybe what currently exists is good enough?


# Readonly create

[root@hayes-02 ~]# lvcreate -p r --yes --type vdo --name vdo_lv --vdopool vdopool -L 6G --virtualsize 6G -ay vdo_sanity
    The VDO volume can address 2 GB in 1 data slab.
    It can grow to address at most 16 TB of physical storage in 8192 slabs.
    If a larger maximum size might be needed, use bigger slabs.
  Logical volume "vdo_lv" created.
[root@hayes-02 ~]# lvs -a -o +devices
  LV              VG         Attr       LSize Pool    Origin Data%  Meta%  Move Log Cpy%Sync Convert Devices
  vdo_lv          vdo_sanity vri-a-v--- 6.00g vdopool        0.00                                    vdopool(0)
  vdopool         vdo_sanity dwi------- 6.00g                66.69                                   vdopool_vdata(0)
  [vdopool_vdata] vdo_sanity Dwi-ao---- 6.00g                                                        /dev/sdc1(0)


# Readonly conversion of existing (RO) pool
[root@hayes-02 ~]# lvcreate --yes --type linear -n vdo_pool -L 25G vdo_sanity
  Wiping vdo signature on /dev/vdo_sanity/vdo_pool.
  Logical volume "vdo_pool" created.
[root@hayes-02 ~]# lvchange -ay -pr  vdo_sanity/vdo_pool
  Logical volume vdo_sanity/vdo_pool changed.
  WARNING: Combining activation change with other commands is not advised.

# First, attempt w/ --test
[root@hayes-02 ~]# lvconvert --test --yes --type vdo-pool --name vdo_lv --virtualsize 5G vdo_sanity/vdo_pool
  TEST MODE: Metadata will NOT be updated and volumes will not be (de)activated.
  WARNING: Converting logical volume vdo_sanity/vdo_pool to VDO pool volume with formating.
  THIS WILL DESTROY CONTENT OF LOGICAL VOLUME (filesystem etc.)
  Command /usr/bin/vdoformat failed.
  Cannot format VDO pool volume vdo_sanity/vdo_pool.
[root@hayes-02 ~]# echo $?
5

# Second, full attempt
[root@hayes-02 ~]# lvconvert --yes --type vdo-pool --name vdo_lv --virtualsize 5G vdo_sanity/vdo_pool
  WARNING: Converting logical volume vdo_sanity/vdo_pool to VDO pool volume with formating.
  THIS WILL DESTROY CONTENT OF LOGICAL VOLUME (filesystem etc.)
  Failed to initialize logical volume vdo_sanity/vdo_pool at position 0 and size 4096.
  Aborting. Failed to wipe VDO data store.




Version-Release number of selected component (if applicable):
kernel-5.14.0-58.el9    BUILT: Thu Feb 10 11:18:21 AM CST 2022
lvm2-2.03.14-4.el9    BUILT: Wed Feb 16 06:01:21 AM CST 2022
lvm2-libs-2.03.14-4.el9    BUILT: Wed Feb 16 06:01:21 AM CST 2022


Note You need to log in before you can comment on or make changes to this bug.