Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
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.
Description of problem:
lvresize in test mode sends BLKDISCARD to SSD block devices, this will result in the file system corruption.
Version-Release number of selected component (if applicable):
lvm2-2.02.178
How reproducible:
Can reproduce this problem stably with the below steps.
Steps to Reproduce:
1) create a LV on a SSD based partition, then format this LV with ext4 file system, and mount this LV.
e.g.
linux-cy2k:/ # lsblk
...
sdc 8:32 0 37.3G 0 disk
├─sdc1 8:33 0 2G 0 part [SWAP]
├─sdc2 8:34 0 14.7G 0 part
│ └─cluster--vg1-test--lv 254:20 0 14G 0 lvm /mnt/ext4 <<= this LV
└─sdc3 8:35 0 20.6G 0 part
2) enable issue discards to a logical volumes's underlying physical volume via edit "/etc/lvm/lvm.conf" file.
e.g.
linux-cy2k:/ # vi /etc/lvm/lvm.conf
set "issue_discards = 1"
3) run lvresize command in test mode.
e.g.
inux-cy2k:/ # lvresize -v -n -L -10GB /dev/cluster-vg1/test-lv --test
4) unmount this LV, then mount this LV again.
You will probably encounter the file system on this LV is corrupted.
e.g.
linux-cy2k:~ # mount /dev/cluster-vg1/test-lv /mnt/ext4/
mount: wrong fs type, bad option, bad superblock on /dev/mapper/cluster--vg1-test--lv,
missing codepage or helper program, or other error
In some cases useful info is found in syslog - try
dmesg | tail or so.
linux-cy2k:~ # dmesg
[3711112.342424] JBD2: no valid journal superblock found
[3711112.342429] EXT4-fs (dm-20): error loading journal
Actual results:
lvresize in test mode sends BLKDISCARD to SSD block devices, this will result in the file system corruption.
Expected results:
lvresize in test mode should not do anything about changing the block device.
Additional info:
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, 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-2018:3193
Description of problem: lvresize in test mode sends BLKDISCARD to SSD block devices, this will result in the file system corruption. Version-Release number of selected component (if applicable): lvm2-2.02.178 How reproducible: Can reproduce this problem stably with the below steps. Steps to Reproduce: 1) create a LV on a SSD based partition, then format this LV with ext4 file system, and mount this LV. e.g. linux-cy2k:/ # lsblk ... sdc 8:32 0 37.3G 0 disk ├─sdc1 8:33 0 2G 0 part [SWAP] ├─sdc2 8:34 0 14.7G 0 part │ └─cluster--vg1-test--lv 254:20 0 14G 0 lvm /mnt/ext4 <<= this LV └─sdc3 8:35 0 20.6G 0 part 2) enable issue discards to a logical volumes's underlying physical volume via edit "/etc/lvm/lvm.conf" file. e.g. linux-cy2k:/ # vi /etc/lvm/lvm.conf set "issue_discards = 1" 3) run lvresize command in test mode. e.g. inux-cy2k:/ # lvresize -v -n -L -10GB /dev/cluster-vg1/test-lv --test 4) unmount this LV, then mount this LV again. You will probably encounter the file system on this LV is corrupted. e.g. linux-cy2k:~ # mount /dev/cluster-vg1/test-lv /mnt/ext4/ mount: wrong fs type, bad option, bad superblock on /dev/mapper/cluster--vg1-test--lv, missing codepage or helper program, or other error In some cases useful info is found in syslog - try dmesg | tail or so. linux-cy2k:~ # dmesg [3711112.342424] JBD2: no valid journal superblock found [3711112.342429] EXT4-fs (dm-20): error loading journal Actual results: lvresize in test mode sends BLKDISCARD to SSD block devices, this will result in the file system corruption. Expected results: lvresize in test mode should not do anything about changing the block device. Additional info: