RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 2164226 - renaming logical volumes to previously existing volume names causes confusion when lvresize calls fsadm to extend
Summary: renaming logical volumes to previously existing volume names causes confusion...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: lvm2
Version: 9.2
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: rc
: ---
Assignee: David Teigland
QA Contact: cluster-qe@redhat.com
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-01-24 20:20 UTC by Corey Marthaler
Modified: 2023-05-09 10:38 UTC (History)
8 users (show)

Fixed In Version: lvm2-2.03.17-7.el9
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-05-09 08:23:51 UTC
Type: Bug
Target Upstream Version:
Embargoed:
pm-rhel: mirror+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker CLUSTERQE-6375 0 None None None 2023-01-26 21:08:04 UTC
Red Hat Issue Tracker RHELPLAN-146612 0 None None None 2023-01-26 20:37:03 UTC
Red Hat Product Errata RHBA-2023:2544 0 None None None 2023-05-09 08:24:05 UTC

Description Corey Marthaler 2023-01-24 20:20:27 UTC
Description of problem:
This scenario is a regression check failure for bug 1320735. 
Basically, rename the volumes while mounted, and attempt to resize the initially named first volume and see what happens. Per bug 1320735, it should be determined that LVM is attempting to resize a mounted filesystem that is using a device that is referencing a new device now, and that the filesystem needs to be unmounted in order to continue with a resize attempt. The new/current 9.2 behavior is that LVM does the resize of the LV, but then trips up on the fsadm resize.


[root@virt-557 ~]# lvcreate --yes  --type mirror -m 1 -n resizeA -L 200M --corelog mirror_sanity
  Wiping ext4 signature on /dev/mirror_sanity/resizeA.
  Logical volume "resizeA" created.
[root@virt-557 ~]# lvcreate --yes  --type mirror -m 1 -n resizeB -L 200M --corelog mirror_sanity
  Wiping ext4 signature on /dev/mirror_sanity/resizeB.
  Logical volume "resizeB" created.

[root@virt-557 ~]# mkfs.ext4 /dev/mirror_sanity/resizeA
mke2fs 1.46.5 (30-Dec-2021)
[...]
Writing superblocks and filesystem accounting information: done 
[root@virt-557 ~]# mkfs.ext4 /dev/mirror_sanity/resizeB
mke2fs 1.46.5 (30-Dec-2021)
[...]
Writing superblocks and filesystem accounting information: done 

[root@virt-557 ~]# mount /dev/mirror_sanity/resizeA /mnt/resizeA
[root@virt-557 ~]# mount /dev/mirror_sanity/resizeB /mnt/resizeB

[root@virt-557 ~]# lvrename /dev/mirror_sanity/resizeA /dev/mirror_sanity/resizeC
  Renamed "resizeA" to "resizeC" in volume group "mirror_sanity"
[root@virt-557 ~]# lvrename /dev/mirror_sanity/resizeB /dev/mirror_sanity/resizeA
  Renamed "resizeB" to "resizeA" in volume group "mirror_sanity"

[root@virt-557 ~]# lvs -a -o +devices
  LV                 VG            Attr       LSize   Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert Devices                                
  resizeA            mirror_sanity mwi-aom--- 200.00m                                    100.00           resizeA_mimage_0(0),resizeA_mimage_1(0)
  [resizeA_mimage_0] mirror_sanity iwi-aom--- 200.00m                                                     /dev/sda(50)                           
  [resizeA_mimage_1] mirror_sanity iwi-aom--- 200.00m                                                     /dev/sdb(50)                           
  resizeC            mirror_sanity mwi-aom--- 200.00m                                    100.00           resizeC_mimage_0(0),resizeC_mimage_1(0)
  [resizeC_mimage_0] mirror_sanity iwi-aom--- 200.00m                                                     /dev/sda(0)                            
  [resizeC_mimage_1] mirror_sanity iwi-aom--- 200.00m                                                     /dev/sdb(0)                            

[root@virt-557 ~]# df -h
Filesystem                         Size  Used Avail Use% Mounted on
/dev/mapper/mirror_sanity-resizeA  182M   14K  168M   1% /mnt/resizeA
/dev/mapper/mirror_sanity-resizeB  182M   14K  168M   1% /mnt/resizeB


# This command properly fails, but not before it does the resize of "resizeA".
[root@virt-557 ~]# lvextend -r -n -f -L 800M /dev/mirror_sanity/resizeA
  Extending 2 mirror images.
  Size of logical volume mirror_sanity/resizeA changed from 200.00 MiB (50 extents) to 800.00 MiB (200 extents).
  File system ext4 found on mirror_sanity/resizeA mounted at /mnt/resizeB.
  Extending file system ext4 to 800.00 MiB (838860800 bytes) on mirror_sanity/resizeA...
resize2fs /dev/mirror_sanity/resizeA
resize2fs 1.46.5 (30-Dec-2021)
Filesystem at /dev/mirror_sanity/resizeA is mounted on /mnt/resizeA; on-line resizing required
old_desc_blocks = 2, new_desc_blocks = 7
resize2fs: No space left on device While checking for on-line resizing support
resize2fs failed
File system extend failed.
  Failed to extend file system with lvresize_fs_helper.
  File system extend error.
  Logical volume mirror_sanity/resizeA successfully resized.
[root@virt-557 ~]# echo $?
5


[root@virt-557 ~]# df -h
Filesystem                         Size  Used Avail Use% Mounted on
/dev/mapper/mirror_sanity-resizeA  182M   14K  168M   1% /mnt/resizeA
/dev/mapper/mirror_sanity-resizeB  182M   14K  168M   1% /mnt/resizeB

[root@virt-557 ~]# lvs -a -o +devices
  LV                 VG            Attr       LSize   Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert Devices                                
  resizeA            mirror_sanity mwi-aom--- 800.00m                                    100.00           resizeA_mimage_0(0),resizeA_mimage_1(0)
  [resizeA_mimage_0] mirror_sanity iwi-aom--- 800.00m                                                     /dev/sda(50)                           
  [resizeA_mimage_1] mirror_sanity iwi-aom--- 800.00m                                                     /dev/sdb(50)                           
  resizeC            mirror_sanity mwi-aom--- 200.00m                                    100.00           resizeC_mimage_0(0),resizeC_mimage_1(0)
  [resizeC_mimage_0] mirror_sanity iwi-aom--- 200.00m                                                     /dev/sda(0)                            
  [resizeC_mimage_1] mirror_sanity iwi-aom--- 200.00m                                                     /dev/sdb(0)                            




Version-Release number of selected component (if applicable):
kernel-5.14.0-239.el9    BUILT: Thu Jan 19 04:29:56 PM CET 2023
lvm2-2.03.17-4.el9    BUILT: Tue Jan 10 06:40:12 PM CET 2023
lvm2-libs-2.03.17-4.el9    BUILT: Tue Jan 10 06:40:12 PM CET 2023


How reproducible:
Everytime

Comment 1 Corey Marthaler 2023-01-24 20:39:11 UTC
The same scenario, but with a reduce, prompts that the filesystem needs to be unmounted and then does just that.


[root@virt-557 ~]# mount /dev/mirror_sanity/resizeA /mnt/resizeA
[root@virt-557 ~]# mount /dev/mirror_sanity/resizeB /mnt/resizeB
[root@virt-557 ~]# df -h
Filesystem                         Size  Used Avail Use% Mounted on
/dev/mapper/mirror_sanity-resizeA  365M   14K  341M   1% /mnt/resizeA
/dev/mapper/mirror_sanity-resizeB  365M   14K  341M   1% /mnt/resizeB

[root@virt-557 ~]# lvs -a -o +devices
  LV                 VG            Attr       LSize   Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert Devices                                
  resizeA            mirror_sanity mwi-aom--- 400.00m                                    100.00           resizeA_mimage_0(0),resizeA_mimage_1(0)
  [resizeA_mimage_0] mirror_sanity iwi-aom--- 400.00m                                                     /dev/sda(0)                            
  [resizeA_mimage_1] mirror_sanity iwi-aom--- 400.00m                                                     /dev/sdb(0)                            
  resizeB            mirror_sanity mwi-aom--- 400.00m                                    100.00           resizeB_mimage_0(0),resizeB_mimage_1(0)
  [resizeB_mimage_0] mirror_sanity iwi-aom--- 400.00m                                                     /dev/sda(100)                          
  [resizeB_mimage_1] mirror_sanity iwi-aom--- 400.00m                                                     /dev/sdb(100)                          

[root@virt-557 ~]# lvrename /dev/mirror_sanity/resizeA /dev/mirror_sanity/resizeC
  Renamed "resizeA" to "resizeC" in volume group "mirror_sanity"
[root@virt-557 ~]# lvrename /dev/mirror_sanity/resizeB /dev/mirror_sanity/resizeA
  Renamed "resizeB" to "resizeA" in volume group "mirror_sanity"

[root@virt-557 ~]# lvreduce -r -f -L 200M /dev/mirror_sanity/resizeA
  File system ext4 found on mirror_sanity/resizeA mounted at /mnt/resizeB.
  File system size (400.00 MiB) is larger than the requested size (200.00 MiB).
  File system reduce is required using resize2fs.
  File system unmount is needed for reduce.
  File system fsck will be run before reduce.
Continue with ext4 file system reduce steps: unmount, fsck, resize2fs? [y/n]:
  WARNING: Invalid input ''.
Continue with ext4 file system reduce steps: unmount, fsck, resize2fs? [y/n]:y
  Reducing file system ext4 to 200.00 MiB (209715200 bytes) on mirror_sanity/resizeA...
unmount /mnt/resizeB
unmount done
e2fsck /dev/mirror_sanity/resizeA
/dev/mirror_sanity/resizeA: 11/102400 files (0.0% non-contiguous), 36256/409600 blocks
e2fsck done
resize2fs /dev/mirror_sanity/resizeA 204800k
resize2fs 1.46.5 (30-Dec-2021)
Resizing the filesystem on /dev/mirror_sanity/resizeA to 204800 (1k) blocks.
The filesystem on /dev/mirror_sanity/resizeA is now 204800 (1k) blocks long.

resize2fs done
remount /dev/mirror_sanity/resizeA /mnt/resizeB
remount done
  Reduced file system ext4 on mirror_sanity/resizeA.
  Size of logical volume mirror_sanity/resizeA changed from 400.00 MiB (100 extents) to 200.00 MiB (50 extents).
  Logical volume mirror_sanity/resizeA successfully resized.

[root@virt-557 ~]# df -h
Filesystem                         Size  Used Avail Use% Mounted on
/dev/mapper/mirror_sanity-resizeA  365M   14K  341M   1% /mnt/resizeA
/dev/mapper/mirror_sanity-resizeA  178M   14K  164M   1% /mnt/resizeB

[root@virt-557 ~]# lvs -a -o +devices
  LV                 VG            Attr       LSize   Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert Devices                                
  resizeA            mirror_sanity mwi-aom--- 200.00m                                    100.00           resizeA_mimage_0(0),resizeA_mimage_1(0)
  [resizeA_mimage_0] mirror_sanity iwi-aom--- 200.00m                                                     /dev/sda(100)                          
  [resizeA_mimage_1] mirror_sanity iwi-aom--- 200.00m                                                     /dev/sdb(100)                          
  resizeC            mirror_sanity mwi-aom--- 400.00m                                    100.00           resizeC_mimage_0(0),resizeC_mimage_1(0)
  [resizeC_mimage_0] mirror_sanity iwi-aom--- 400.00m                                                     /dev/sda(0)                            
  [resizeC_mimage_1] mirror_sanity iwi-aom--- 400.00m                                                     /dev/sdb(0)

Comment 2 David Teigland 2023-01-26 20:33:56 UTC
fixed in main:
https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=5374a44c57127cdd832a675545c1d2bbf0b3751a

$ lvcreate -n foo -L 200M test
  Logical volume "foo" created.
$ mkfs.ext4 /dev/test/foo
mke2fs 1.46.5 (30-Dec-2021)
Discarding device blocks: done                            
Creating filesystem with 204800 1k blocks and 51200 inodes
Filesystem UUID: 92a5babf-bb20-434f-b962-cce7fcc06ff7
Superblock backups stored on blocks: 
        8193, 24577, 40961, 57345, 73729

Allocating group tables: done                            
Writing inode tables: done                            
Creating journal (4096 blocks): done
Writing superblocks and filesystem accounting information: done 

$ mount /dev/test/foo /foo
$ lvrename test/foo test/bar
  Renamed "foo" to "bar" in volume group "test"
$ lvresize -L+32M -r test/bar
  LV /dev/mapper/test-bar mounted at /foo may have been renamed (from /dev/mapper/test-foo).
  File system resizing not supported: fs utilities do not support renamed devices.

Comment 3 Corey Marthaler 2023-02-13 19:35:00 UTC
kernel-5.14.0-252.el9    BUILT: Wed Feb  1 03:30:10 PM CET 2023
lvm2-2.03.17-6.el9    BUILT: Thu Feb  9 09:52:52 PM CET 2023
lvm2-libs-2.03.17-6.el9    BUILT: Thu Feb  9 09:52:52 PM CET 2023
lvm2-dbusd-2.03.17-6.el9    BUILT: Thu Feb  9 09:52:42 PM CET 2023


[root@virt-486 ~]# lvcreate --yes  --type mirror -m 1 -n resizeA -L 200M --corelog mirror_sanity
  Wiping ext4 signature on /dev/mirror_sanity/resizeA.
  Logical volume "resizeA" created.
[root@virt-486 ~]# lvcreate --yes  --type mirror -m 1 -n resizeB -L 200M --corelog mirror_sanity
  Wiping ext4 signature on /dev/mirror_sanity/resizeB.
  Logical volume "resizeB" created.
 
[root@virt-486 ~]#  mkfs.ext4 /dev/mirror_sanity/resizeA
mke2fs 1.46.5 (30-Dec-2021)
Creating filesystem with 204800 1k blocks and 51200 inodes
Filesystem UUID: 66e70274-8666-44bd-9a08-d54c5599d9ef
Superblock backups stored on blocks:
        8193, 24577, 40961, 57345, 73729
 
Allocating group tables: done                            
Writing inode tables: done                            
Creating journal (4096 blocks): done
Writing superblocks and filesystem accounting information: done
 
[root@virt-486 ~]#  mkfs.ext4 /dev/mirror_sanity/resizeB
mke2fs 1.46.5 (30-Dec-2021)
Creating filesystem with 204800 1k blocks and 51200 inodes
Filesystem UUID: 2ba12acc-d7e3-48d1-b064-45ed4a26f4b7
Superblock backups stored on blocks:
        8193, 24577, 40961, 57345, 73729
 
Allocating group tables: done                            
Writing inode tables: done                            
Creating journal (4096 blocks): done
Writing superblocks and filesystem accounting information: done
 
[root@virt-486 ~]# mount /dev/mirror_sanity/resizeA /mnt/resizeA
[root@virt-486 ~]# mount /dev/mirror_sanity/resizeB /mnt/resizeB
[root@virt-486 ~]# lvrename /dev/mirror_sanity/resizeA /dev/mirror_sanity/resizeC
  Renamed "resizeA" to "resizeC" in volume group "mirror_sanity"
[root@virt-486 ~]# lvrename /dev/mirror_sanity/resizeB /dev/mirror_sanity/resizeA
  Renamed "resizeB" to "resizeA" in volume group "mirror_sanity"
[root@virt-486 ~]# lvextend -r -n -f -L 800M /dev/mirror_sanity/resizeA
  Extending 2 mirror images.
*** buffer overflow detected ***: terminated
Aborted (core dumped)
 
 
Core was generated by `lvextend -r -n -f -L 800M /dev/mirror_sanity/resizeA'.
Program terminated with signal SIGABRT, Aborted.
#0  0x00007fcbb52a154c in __pthread_kill_implementation () from /lib64/libc.so.6
Missing separate debuginfos, use: dnf debuginfo-install glibc-2.34-58.el9.x86_64 libaio-0.3.111-13.el9.x86_64 libblkid-2.37.4-9.el9.x86_64 libcap-2.48-8.el9.x86_64 libedit-3.1-37.20210216cvs.el9.x86_64 libgcc-11.3.1-4.3.el9.x86_64 libgcrypt-1.10.0-8.el9_0.x86_64 libgpg-error-1.42-5.el9.x86_64 libselinux-3.5-0.rc2.1.el9.x86_64 libzstd-1.5.1-2.el9.x86_64 lz4-libs-1.9.3-5.el9.x86_64 ncurses-libs-6.2-8.20210508.el9.x86_64 pcre2-10.40-2.el9.x86_64 systemd-libs-252-3.el9.x86_64 xz-libs-5.2.5-8.el9_0.x86_64
(gdb) bt
#0  0x00007fcbb52a154c in __pthread_kill_implementation () from /lib64/libc.so.6
#1  0x00007fcbb5254d46 in raise () from /lib64/libc.so.6
#2  0x00007fcbb52287f3 in abort () from /lib64/libc.so.6
#3  0x00007fcbb5229130 in __libc_message.cold () from /lib64/libc.so.6
#4  0x00007fcbb535d55b in __fortify_fail () from /lib64/libc.so.6
#5  0x00007fcbb535bfa6 in __chk_fail () from /lib64/libc.so.6
#6  0x00007fcbb535b9e9 in __strncpy_chk () from /lib64/libc.so.6
#7  0x000055718fde2cf8 in strncpy (__len=4095, __src=<optimized out>, __dest=0x7fffa55d9b50 "") at /usr/include/bits/string_fortified.h:95
#8  fs_mount_state_is_misnamed (cmd=0x557191e209e0, lv=0x557191f6f3d0, lv_path=<optimized out>, fstype=0x7fffa55dbd30 "ext4") at ../lib/device/filesystem.c:265
#9  0x000055718fd6a35f in lv_resize (cmd=0x557191e209e0, lv=<optimized out>, lp=0x7fffa55e0280) at ../lib/metadata/lv_manip.c:6932
#10 0x000055718fcca20e in _lvresize_single (cmd=cmd@entry=0x557191e209e0, lv=0x557191f6f3d0, handle=handle@entry=0x557191f1bbb0)
    at /usr/src/debug/lvm2-2.03.17-6.el9.x86_64/tools/lvresize.c:348
#11 0x000055718fce425e in process_each_lv_in_vg (cmd=cmd@entry=0x557191e209e0, vg=vg@entry=0x557191f6e580, arg_lvnames=arg_lvnames@entry=0x7fffa55e01c0,
    tags_in=tags_in@entry=0x7fffa55e01b0, stop_on_error=stop_on_error@entry=0, handle=handle@entry=0x557191f1bbb0, check_single_lv=<optimized out>,
    process_single_lv=<optimized out>) at /usr/src/debug/lvm2-2.03.17-6.el9.x86_64/tools/toollib.c:3420
#12 0x000055718fce6220 in _process_lv_vgnameid_list (process_single_lv=0x55718fcca1d0 <_lvresize_single>, check_single_lv=0x0, handle=0x557191f1bbb0,
    arg_tags=0x7fffa55e01b0, arg_lvnames=0x7fffa55e0190, arg_vgnames=0x7fffa55e01a0, vgnameids_to_process=0x7fffa55e0170, read_flags=1048576, cmd=0x557191e209e0)
    at /usr/src/debug/lvm2-2.03.17-6.el9.x86_64/tools/toollib.c:3896
#13 process_each_lv (cmd=0x557191e209e0, argc=<optimized out>, argv=<optimized out>, one_vgname=<optimized out>, one_lvname=<optimized out>, read_flags=<optimized out>,
    handle=0x557191f1bbb0, check_single_lv=<optimized out>, process_single_lv=<optimized out>) at /usr/src/debug/lvm2-2.03.17-6.el9.x86_64/tools/toollib.c:4056
#14 0x000055718fcca6b0 in lvresize_cmd (cmd=0x557191e209e0, argc=<optimized out>, argv=<optimized out>) at /usr/src/debug/lvm2-2.03.17-6.el9.x86_64/tools/lvresize.c:396
#15 0x000055718fcc4cbf in lvm_run_command (cmd=<optimized out>, argc=<optimized out>, argv=<optimized out>)
    at /usr/src/debug/lvm2-2.03.17-6.el9.x86_64/tools/lvmcmdline.c:3314
#16 0x000055718fcc6b31 in lvm2_main (argc=7, argv=0x7fffa55e0768) at /usr/src/debug/lvm2-2.03.17-6.el9.x86_64/tools/lvmcmdline.c:3847
#17 0x00007fcbb523feb0 in __libc_start_call_main () from /lib64/libc.so.6
#18 0x00007fcbb523ff60 in __libc_start_main_impl () from /lib64/libc.so.6
#19 0x000055718fca0f05 in _start ()

Comment 4 David Teigland 2023-02-13 21:36:18 UTC
I'm not able to reproduce this when I build the lvm2.git rhel-9.2.0, so I wonder if there's a problem with the build, or if there's some difference in the config settings I'm using?


$ lvcreate -n A -L256M test
  Wiping ext4 signature on /dev/test/A.
  Logical volume "A" created.
$ lvcreate -n B -L256M test
  Wiping ext4 signature on /dev/test/B.
  Logical volume "B" created.
$ lvcreate -n C -L256M test
  Wiping ext4 signature on /dev/test/C.
  Logical volume "C" created.
$ mkfs.ext4 /dev/test/A
mke2fs 1.46.5 (30-Dec-2021)
Discarding device blocks: done                            
Creating filesystem with 262144 1k blocks and 65536 inodes
Filesystem UUID: 0ca0d46a-f5b9-4496-832e-059116d185d9
Superblock backups stored on blocks: 
        8193, 24577, 40961, 57345, 73729, 204801, 221185

Allocating group tables: done                            
Writing inode tables: done                            
Creating journal (8192 blocks): done
Writing superblocks and filesystem accounting information: done 

$ mkfs.ext4 /dev/test/B
mke2fs 1.46.5 (30-Dec-2021)
Discarding device blocks: done                            
Creating filesystem with 262144 1k blocks and 65536 inodes
Filesystem UUID: e3612576-8183-47aa-91b2-51fdd22efa99
Superblock backups stored on blocks: 
        8193, 24577, 40961, 57345, 73729, 204801, 221185

Allocating group tables: done                            
Writing inode tables: done                            
Creating journal (8192 blocks): done
Writing superblocks and filesystem accounting information: done 

$ mkfs.ext4 /dev/test/C
mke2fs 1.46.5 (30-Dec-2021)
Discarding device blocks: done                            
Creating filesystem with 262144 1k blocks and 65536 inodes
Filesystem UUID: 142be6a9-3c03-4858-8434-70fd50b34883
Superblock backups stored on blocks: 
        8193, 24577, 40961, 57345, 73729, 204801, 221185

Allocating group tables: done
Writing inode tables: done
Creating journal (8192 blocks): done
Writing superblocks and filesystem accounting information: done

$ mount /dev/test/A /A
$ mount /dev/test/B /B
$ mount /dev/test/C /C
$ df
Filesystem            1K-blocks    Used Available Use% Mounted on
/dev/mapper/test-A       235431      14    218214   1% /A
/dev/mapper/test-B       235431      14    218214   1% /B
/dev/mapper/test-C       235431      14    218214   1% /C

$ lvrename test/A test/D
  Renamed "A" to "D" in volume group "test"
$ lvresize -L+4M -r test/D
  LV /dev/mapper/test-D mounted at /A may have been renamed (from /dev/mapper/test-A).
  File system resizing not supported: fs utilities do not support renamed devices.

$ lvrename test/B test/A
  Renamed "B" to "A" in volume group "test"
$ lvresize -L+4M -r test/A
  LV /dev/mapper/test-A mounted at /A may have been renamed (from /dev/mapper/test-A).
  LV /dev/mapper/test-A mounted at /B may have been renamed (from /dev/mapper/test-B).
  File system resizing not supported: fs utilities do not support renamed devices.

$ lvrename test/C test/B
  Renamed "C" to "B" in volume group "test"
$ lvresize -L+4M -r test/B
  LV /dev/mapper/test-B mounted at /B may have been renamed (from /dev/mapper/test-B).
  LV /dev/mapper/test-B mounted at /C may have been renamed (from /dev/mapper/test-C).
  File system resizing not supported: fs utilities do not support renamed devices.


$ lvresize -L+4M -r -n -f test/A
  LV /dev/mapper/test-A mounted at /A may have been renamed (from /dev/mapper/test-A).
  LV /dev/mapper/test-A mounted at /B may have been renamed (from /dev/mapper/test-B).
  File system resizing not supported: fs utilities do not support renamed devices.
$ lvresize -L+4M -r -n -f test/B
  LV /dev/mapper/test-B mounted at /B may have been renamed (from /dev/mapper/test-B).
  LV /dev/mapper/test-B mounted at /C may have been renamed (from /dev/mapper/test-C).
  File system resizing not supported: fs utilities do not support renamed devices.
$ lvresize -L+4M -r -n -f test/D
  LV /dev/mapper/test-D mounted at /A may have been renamed (from /dev/mapper/test-A).
  File system resizing not supported: fs utilities do not support renamed devices.

Comment 5 David Teigland 2023-02-13 22:27:22 UTC
I get the same failure when using the rhel build, so rhel is probably using some build options that I'm not using that trigger the problem.

The segfault is appearing at a buggy strncpy which is already fixed on main with commit:

cf0dc9a13cf3 filesystem: use PATH_MAX for linux paths

I'm guessing that fixes the problem, but unless I can reproduce the problem with some new build options I won't be able to verify it.

Comment 7 Corey Marthaler 2023-02-15 20:04:44 UTC
The scratch build fixes this new issue.

kernel-5.14.0-252.el9    BUILT: Wed Feb  1 03:30:10 PM CET 2023
lvm2-2.03.17-7.el9    BUILT: Wed Feb 15 07:08:45 PM CET 2023
lvm2-libs-2.03.17-7.el9    BUILT: Wed Feb 15 07:08:45 PM CET 2023


[root@virt-008 ~]# lvextend -r -n -f -L 800M /dev/mirror_sanity/resizeA
  Extending 2 mirror images.
  LV /dev/mapper/mirror_sanity-resizeA mounted at /mnt/resizeA may have been renamed (from /dev/mapper/mirror_sanity-resizeA).
  LV /dev/mapper/mirror_sanity-resizeA mounted at /mnt/resizeB may have been renamed (from /dev/mapper/mirror_sanity-resizeB).
  File system resizing not supported: fs utilities do not support renamed devices.

Comment 8 Corey Marthaler 2023-02-16 16:31:08 UTC
Marking Verified:Tested with the official build.

kernel-5.14.0-252.el9    BUILT: Wed Feb  1 03:30:10 PM CET 2023
lvm2-2.03.17-7.el9    BUILT: Thu Feb 16 03:24:54 PM CET 2023
lvm2-libs-2.03.17-7.el9    BUILT: Thu Feb 16 03:24:54 PM CET 2023
lvm2-dbusd-2.03.17-7.el9    BUILT: Thu Feb 16 03:25:07 PM CET 2023
lvm2-lockd-2.03.17-7.el9    BUILT: Thu Feb 16 03:24:54 PM CET 2023


[root@virt-008 ~]# lvextend -r -n -f -L 800M /dev/mirror_sanity/resizeA
  Extending 2 mirror images.
  LV /dev/mapper/mirror_sanity-resizeA mounted at /mnt/resizeA may have been renamed (from /dev/mapper/mirror_sanity-resizeA).
  LV /dev/mapper/mirror_sanity-resizeA mounted at /mnt/resizeB may have been renamed (from /dev/mapper/mirror_sanity-resizeB).
  File system resizing not supported: fs utilities do not support renamed devices.

Comment 12 errata-xmlrpc 2023-05-09 08:23:51 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (lvm2 bug fix and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2023:2544


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