Launchpad has imported 12 comments from the remote bug at
https://bugzilla.redhat.com/show_bug.cgi?id=832392.

If you reply to an imported comment from within Launchpad, your comment
will be sent to the remote bug automatically. Read more about
Launchpad's inter-bugtracker facilities at
https://help.launchpad.net/InterBugTracking.

------------------------------------------------------------------------
On 2012-06-15T10:07:58+00:00 Zdenek wrote:

Description of problem:

If user enables issue_discards=1  and runs PV move command, and
underlaying devices supports discard  he will loose data from move
chunks.

Here is short log of what is going on:
(chunk is release and discarded prior it's move)

#metadata/lv_manip.c:3013   Creating logical volume pvmove0
#metadata/lv_manip.c:3938     Inserting layer pvmove0 for segments of lvol0 on 
/dev/loop0
#metadata/lv_manip.c:3852       Matched PE range /dev/loop0:0-126 against 
/dev/loop0 0 len 1
#metadata/lv_manip.c:3798     Inserting /dev/loop0:0-0 of test/lvol0
#libdm-config.c:853     Setting devices/issue_discards to 1
#device/device.c:428     Device /dev/loop0 queue/discard_max_bytes is 
4294966784 bytes.
#device/device.c:428     Device /dev/loop0 queue/discard_granularity is 4096 
bytes.
#metadata/pv_manip.c:223       Discarding 1 extents offset 2048 sectors on 
/dev/loop0.
#device/dev-io.c:577       Closed /dev/loop0
#device/dev-io.c:524       Opened /dev/loop0 RW O_DIRECT
#device/dev-io.c:318       Discarding 4194304 bytes offset 1048576 bytes on 
/dev/loop0.
#metadata/lv_manip.c:432     Stack lvol0:0[0] on LV pvmove0:0
#metadata/lv_manip.c:86     Adding lvol0:0 as an user of pvmove0
#pvmove.c:164   Moving 1 extents of logical volume test/lvol0
#mm/pool-fast.c:59       Created fast mempool allocation at 0x16f1810
#libdm-config.c:866     allocation/mirror_logs_require_separate_pvs not found 
in config: defaulting to 0
#libdm-config.c:866     allocation/maximise_cling not found in config: 
defaulting to 1
#metadata/pv_map.c:55       Allowing allocation on /dev/loop1 start PE 0 length 
127
#metadata/lv_manip.c:967       Parallel PVs at LE 0 length 1: /dev/loop0 
#metadata/lv_manip.c:2023       Trying allocation using contiguous policy.
#metadata/lv_manip.c:1635       Still need 1 total extents:
#metadata/lv_manip.c:1638         1 (1 data/0 parity) parallel areas of 1 
extents each
#metadata/lv_manip.c:1640         0 mirror logs of 0 extents each
#metadata/lv_manip.c:1329       Considering allocation area 0 as /dev/loop1 
start PE 0 length 1 leaving 126.
#metadata/lv_manip.c:1112       Allocating parallel area 0 on /dev/loop1 start 
PE 0 length 1.


Version-Release number of selected component (if applicable):
lvm 2.02.96

How reproducible:


Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:

As a workaround - set issue_discards=0

Reply at:
https://bugs.launchpad.net/ubuntu/+source/lvm2/+bug/1082325/comments/0

------------------------------------------------------------------------
On 2012-06-15T10:21:47+00:00 Milan wrote:

This is critical bug btw, it means that you will lose your data
completely if using pvmove with issue_discards=1.

Reply at:
https://bugs.launchpad.net/ubuntu/+source/lvm2/+bug/1082325/comments/1

------------------------------------------------------------------------
On 2012-06-15T13:33:16+00:00 Zdenek wrote:

Original report from lvm-devel list:

https://www.redhat.com/archives/lvm-devel/2012-June/msg00025.html

Reply at:
https://bugs.launchpad.net/ubuntu/+source/lvm2/+bug/1082325/comments/2

------------------------------------------------------------------------
On 2012-06-15T13:39:12+00:00 Alasdair wrote:

Note that issue_discards is NOT enabled by default.  So this only
affects people who explicitly turned it on.

Reply at:
https://bugs.launchpad.net/ubuntu/+source/lvm2/+bug/1082325/comments/3

------------------------------------------------------------------------
On 2012-06-15T14:22:53+00:00 Martin wrote:


    Technical note added. If any revisions are required, please edit the 
"Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content 
Services team.
    
    New Contents:
When issue_discards=1 is configured in the /etc/lvm/lvm.conf file, moving 
physical volumes via the pvmove command results in data loss. To work around 
this issue, ensure that issue_discards=0 is set in your lvm.conf file before 
moving any physical volumes.

Reply at:
https://bugs.launchpad.net/ubuntu/+source/lvm2/+bug/1082325/comments/4

------------------------------------------------------------------------
On 2012-06-15T18:46:35+00:00 Alasdair wrote:

Discards are issued when releasing a PV segment.  But this code is used
both when deleting the space AND when moving it elsewhere.  (Need to
check whether or not some lvconvert code paths are affected too.)

The code was added in 2.02.85, so RHEL6.2 might be affected too.

Reply at:
https://bugs.launchpad.net/ubuntu/+source/lvm2/+bug/1082325/comments/5

------------------------------------------------------------------------
On 2012-06-28T00:24:05+00:00 Alasdair wrote:

Proposed fix:

https://lists.fedorahosted.org/pipermail/lvm2-commits/2012-June/000037.html
https://lists.fedorahosted.org/pipermail/lvm2-commits/2012-June/000038.html
https://lists.fedorahosted.org/pipermail/lvm2-commits/2012-June/000039.html

Reply at:
https://bugs.launchpad.net/ubuntu/+source/lvm2/+bug/1082325/comments/6

------------------------------------------------------------------------
On 2012-07-27T15:58:52+00:00 Corey wrote:

Adding QA ack for 6.4.

Devel will need to provide unit testing results however before this bug can be
ultimately verified by QA.

Reply at:
https://bugs.launchpad.net/ubuntu/+source/lvm2/+bug/1082325/comments/7

------------------------------------------------------------------------
On 2012-08-13T14:43:57+00:00 Tom wrote:

If I understand correctly, if this patch goes in, then the current
Technical Note

("...issue_discards=1...results in data loss...ensure that
issue_discards=0 is set in your lvm.conf file before moving any physical
volumes.")

is not needed in 6.4.

It is needed in earlier releases. (Should we propose the fix for 6.3.z?)

Reply at:
https://bugs.launchpad.net/ubuntu/+source/lvm2/+bug/1082325/comments/8

------------------------------------------------------------------------
On 2012-08-13T19:08:34+00:00 Alasdair wrote:


    Technical note updated. If any revisions are required, please edit the 
"Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content 
Services team.
    
    Diffed Contents:
@@ -1 +1 @@
-When issue_discards=1 is configured in the /etc/lvm/lvm.conf file, moving 
physical volumes via the pvmove command results in data loss. To work around 
this issue, ensure that issue_discards=0 is set in your lvm.conf file before 
moving any physical volumes.+Without this fix, when issue_discards=1 is 
configured in the /etc/lvm/lvm.conf file, moving physical volumes via the 
pvmove command results in data loss.

Reply at:
https://bugs.launchpad.net/ubuntu/+source/lvm2/+bug/1082325/comments/9

------------------------------------------------------------------------
On 2012-10-23T06:17:40+00:00 Nenad wrote:

Moving to Verified (SanityOnly).

All single machine pvmove regression tests passed.

kernel-2.6.32-330.el6.x86_64
lvm2-2.02.98-2.el6.x86_64
device-mapper-1.02.77-2.el6.x86_64

Reply at:
https://bugs.launchpad.net/ubuntu/+source/lvm2/+bug/1082325/comments/10

------------------------------------------------------------------------
On 2013-02-21T08:10:41+00:00 errata-xmlrpc wrote:

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.

http://rhn.redhat.com/errata/RHBA-2013-0501.html

Reply at:
https://bugs.launchpad.net/ubuntu/+source/lvm2/+bug/1082325/comments/15


** Changed in: lvm2
       Status: Unknown => Fix Released

** Changed in: lvm2
   Importance: Unknown => Critical

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1082325

Title:
  pvmove wipes data when issue_discards=1 on SSD

To manage notifications about this bug go to:
https://bugs.launchpad.net/lvm2/+bug/1082325/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to