From: Peter Petrakis <peter.petrakis@gmail.com>
To: linux-lvm@redhat.com
Subject: [linux-lvm] restoring LV after VG has been "reduced"
Date: Wed, 7 Oct 2009 15:11:11 -0400 [thread overview]
Message-ID: <a422b4da0910071211we119340u1c85ac47a92b1529@mail.gmail.com> (raw)
Hi All,
I'm running LVM through it's paces on Centos 5.3 for the purposes of writing
management code. One of the challenges I'm trying to address is a striped
volume, where the PV that backs it goes away, and later returns but not
before we run 'vgreduce --removemissing --force VolData' to able to work with
the volume group in the meantime.
So I have all the UUIDs of everything that matters stashed away and a dump
of dmsetup table before I insert the fault. After I make the VG consistent again
I add the same disk back into the system, recognize it's meta-data signature
as something I've worked with before and 'vgextend' it back into the
volume group.
Now I presume that LVM would have enough information in the on disk meta
data to re-assemble the logical volumes but I was wrong. Even after vgscan,
the one striped volume failed to show up. So I resorted to using dmsetup
dmsetup create VolData-striped_lv --table "0 8388608 striped 2 128
8:51 384 8:3 4063616"
dmsetup load VolData-striped_lv --table "0 8388608 striped 2 128 8:51
384 8:3 4063616"
The second dmsetup command may have been unnecessary but I was discouraged from
the results where the LVM tools failed to notice the device but I
clearly see it in /dev/mapper.
[root@node1 ~]# lvs
LV VG Attr LSize Origin Snap% Move Log Copy% Convert
data_vol VolData -wi-ao 1.94G
testlv VolData -wi-a- 1.00G
rootfs VolSys -wi-ao 9.75G
swapfs VolSys -wi-ao 1.94G
I'm using the LVs as backing stores for DRBD, so if I didn't have to
resync the entire volume
that would be great e.g. recreate the LV from scratch with the same name.
So I guess my questions are.
1) Can I use LVM tools to bring this volume back into service and how?
2) Why can't the LVM tools see what I've done using the dmsetup incantations
mentioned above?
3) In addition, is there a "better way" to bring back a striped LV if say I had
to install a new blank disk and the volume group had been "reduced" in
the meanwhile?
Thanks!
Peter
P.S. requisite version information
lvm2-2.02.40-6.el5
kernel-PAE-2.6.18-128.el5
device-mapper-1.02.28-2.el5
device-mapper-multipath-0.4.7-23.el5
device-mapper-event-1.02.28-2.el5
reply other threads:[~2009-10-07 19:11 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=a422b4da0910071211we119340u1c85ac47a92b1529@mail.gmail.com \
--to=peter.petrakis@gmail.com \
--cc=linux-lvm@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).