Bug 164668 - mirror log doesn't get removed sometimes when removing the mirror
Summary: mirror log doesn't get removed sometimes when removing the mirror
Keywords:
Status: CLOSED WORKSFORME
Alias: None
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: lvm2
Version: 4.0
Hardware: All
OS: Linux
medium
high
Target Milestone: ---
: ---
Assignee: Alasdair Kergon
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2005-07-29 20:30 UTC by Corey Marthaler
Modified: 2007-11-30 22:07 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2006-03-08 17:29:09 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Corey Marthaler 2005-07-29 20:30:36 UTC
Description of problem:
Deleting the mirror lv should cause the mirror log to also be deleted (as it
usually does), however sometimes it does not. It then needs to be deleted by
hand before another mirror can be created.  

How reproducible:
seldom

Comment 1 Alasdair Kergon 2005-08-08 20:02:28 UTC
If it happens again, record the exact state of the system: dmsetup info -c, lvs
-va, the command you just ran which didn't work correctly, and supply the
relevant metadata backup and archive files (eg. create tarball of /etc/lvm). 
Also check the kernel message log for errors.

Comment 2 Corey Marthaler 2005-08-09 16:36:24 UTC
Here we have the mirror in all it's glory:

[root@link-12 ~]# lvscan
  ACTIVE            '/dev/coreyvg/mirror' [28.00 MB] inherit
  ACTIVE            '/dev/coreyvg/mirror_mlog' [4.00 MB] inherit
  ACTIVE            '/dev/coreyvg/mirror_mimage_0' [28.00 MB] inherit
  ACTIVE            '/dev/coreyvg/mirror_mimage_1' [28.00 MB] inherit
  ACTIVE            '/dev/gfs/gfs' [270.00 GB] inherit

Here we delete the mirror (supposedly):

[root@link-12 ~]# lvremove /dev/coreyvg/mirror
Do you really want to remove active logical volume "mirror"? [y/n]: y
  Logical volume "mirror" successfully removed

[root@link-12 ~]# dmsetup info -c
Name             Maj Min Stat Open Targ Event  UUID
gfs-gfs          253   0 L--w    0    1      0
C1h3cK7NMqlKqx47YoyzrkcusKa7aqn7p91NAyW6waa2lMsGjm5JSlFkAa5auxey
coreyvg-mirror_mimage_1 253   3 L--w    0    1      0
7jvLT7v2vpVgq7PlLrBcubcvB1xsMHwi537Ksx0T8zyO7swGqE0Xp2CawOAYiFW1
coreyvg-mirror_mimage_0 253   2 L--w    0    1      0
7jvLT7v2vpVgq7PlLrBcubcvB1xsMHwiIqdBG9WM4OMKJdKeb2fWtfnU0BB3AQBS
coreyvg-mirror_mlog 253   1 L--w    0    1      0
7jvLT7v2vpVgq7PlLrBcubcvB1xsMHwiMJrw9SWMFNbGgvh90GRbtmxkUgOkt3Qi


[root@link-12 ~]# lvs -va
    Finding all logical volumes
  LV   VG   #Seg Attr   LSize   Maj Min KMaj KMin Origin Snap%  Move Copy%  Log
LV UUID
  gfs  gfs     1 -wi-a- 270.00G  -1  -1 253  0                                 
p91NAy-W6wa-a2lM-sGjm-5JSl-FkAa-5auxey

Looks like the mirror stuff is all gone:

[root@link-12 ~]# lvscan
  ACTIVE            '/dev/gfs/gfs' [270.00 GB] inherit

A new mirror attempt fails:

[root@link-12 ~]# lvcreate -m 1 -n mirror -L 500M coreyvg
  /dev/coreyvg/mirror_mlog: not found: device not zeroed
  Aborting. Failed to wipe mirror log. Remove new LV and retry.

Is this the log left over from the previous mirror?

[root@link-12 ~]# lvscan
  ACTIVE            '/dev/coreyvg/mirror_mlog' [4.00 MB] inherit
  ACTIVE            '/dev/gfs/gfs' [270.00 GB] inherit


Comment 3 Corey Marthaler 2005-08-09 16:40:03 UTC
continuation from last comment...

I attempt to delete the left over vol again:

[root@link-12 lvm]# lvremove /dev/coreyvg/mirror_mlog
Do you really want to remove active logical volume "mirror_mlog"? [y/n]: y
  Logical volume "mirror_mlog" successfully removed

Now the creation works:

[root@link-12 lvm]# lvcreate -m 1 -n mirror -L 500M coreyvg
  Logical volume "mirror" created


This is very reproducable (almost everytime)

Comment 4 Corey Marthaler 2005-08-12 15:35:04 UTC
Here dmsetup shows that the (GFS-mirror) mirror vols which I deleted are still
there:

[root@link-08 ~]# lvscan
  ACTIVE            '/dev/VolGroup00/LogVol00' [52.81 GB] inherit
  ACTIVE            '/dev/VolGroup00/LogVol01' [1.94 GB] inherit
  ACTIVE            '/dev/link08/mirror' [75.00 GB] inherit
  ACTIVE            '/dev/link08/mirror_mlog' [4.00 MB] inherit
  ACTIVE            '/dev/link08/mirror_mimage_0' [75.00 GB] inherit
  ACTIVE            '/dev/link08/mirror_mimage_1' [75.00 GB] inherit



root@link-08 redhat]# dmsetup table
link08-mirror_mimage_1: 0 157286400 linear 8:17 384
link08-mirror_mimage_0: 0 157286400 linear 8:1 384
GFS-mirror_mlog: 0 8192 linear 8:65 384    
link08-mirror_mlog: 0 8192 linear 8:33 384
GFS-mirror_mimage_1: 0 20971520 linear 8:17 384
GFS-mirror_mimage_0: 0 20971520 linear 8:1 384
VolGroup00-LogVol01: 0 4063232 linear 3:6 110756224
VolGroup00-LogVol00: 0 110755840 linear 3:6 384
link08-mirror: 0 157286400 mirror disk 2 253:5 1024 2 253:6 0 253:7 0




Comment 10 Alasdair Kergon 2006-03-08 17:19:29 UTC
Can you still reproduce this or can we close it?

Comment 11 Corey Marthaler 2006-03-08 17:29:09 UTC
I'll reopen if I see this again.


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