All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Bernd Broermann" <bernd@broermann.com>
To: dm-devel@redhat.com
Subject: DM inconsistent after disk migration
Date: Thu, 20 Oct 2011 16:47:17 +0200	[thread overview]
Message-ID: <780ff8d84fb70f7ddf8beb696ff02ddf.squirrel@webmail.xlab.net> (raw)

Hallo

I can not remove an unused LUN , because devicemapper is inconsistent
under /sys/block.

Red Hat Enterprise Linux Server release 5.5 (Tikanga)
Linux xxxxxxx 2.6.18-194.el5 #1 SMP Tue Mar 16 21:52:39 EDT 2010 x86_64
x86_64 x86_64 GNU/Linux
device-mapper-multipath-0.4.7-34.el5


we have two hosts (MASTER,SLAVE) , which are connected to a shared storage
 (EMC SAN and SRDF)  with two equal sized disks.
One of the disk contains a Logical Volume in one Volume Group.

we wanted to migrate ("move") data from disk1 to disk2 , and remove disk1
afterwards.


MASTER                             SLAVE
disk1 (vg01/lvdata)   <-srdf->     disk3 (vg01/lvdata)
disk2 (empty)         <-srdf->     disk4 (empty)

On MASTER we "move" disk1 to disk2 with following commands.
Because of the SRDF mirror disk3 is copied simultaneous to disk4.



CODE "move" script
# mirror
pvcreate /dev/disk2
vgextend vg01  /dev/disk2
lvconvert -m1 --mirrorlog core /dev/vg01/lvdata  /dev/disk2
# split
lvconvert -m0 --mirrorlog core /dev/vg01/lvdata  /dev/disk1
vgreduce vg01  /dev/disk1
pvremove  /dev/disk1


The "move" process runs without error.
On MASTER disk1 can be removed without error.
On SLAVE  removing disk3 gives an error like

powermt  remove dev=disk3
Cannot remove device that is in use: disk3
( in real /dev/disk3 is /dev/emcpower$(belonging disk3 )


i analyzed the /sys filesystem on SLAVE and saw , that vg01-lvdata is
blocks by /dev/disk3.


find /sys -name '*disk3*' -ls
 29486    0 lrwxrwxrwx   1 root     root            0 Jul 27 09:10
/sys/block/dm-9/slaves/disk3 -> ../../../block/disk3
ls -l /dev/mapper/vg01-lvdata
brw-rw---- 1 root disk 253, 9 Jul 27 09:09 /dev/mapper/vg01-lvdata

My assumption is that SLAVE reconfigures the device-mapper not correct,
when doing the "move" operations on MASTER.

How can I reconfigure the device-mapper stuff on SLAVE to avoid an reboot ?


A bit complex, but i hope i could make the problem clear to you.

regards
bernd

             reply	other threads:[~2011-10-20 14:47 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-20 14:47 Bernd Broermann [this message]
2011-10-20 15:09 ` DM inconsistent after disk migration Bryn M. Reeves
2011-10-28 14:06   ` Bernd Broermann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=780ff8d84fb70f7ddf8beb696ff02ddf.squirrel@webmail.xlab.net \
    --to=bernd@broermann.com \
    --cc=dm-devel@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.