* [linux-lvm] Renaming Loopback 'Mounted' Volume Group
@ 2007-11-23 21:35 Tod
2007-11-26 8:28 ` Bryn M. Reeves
0 siblings, 1 reply; 3+ messages in thread
From: Tod @ 2007-11-23 21:35 UTC (permalink / raw)
To: linux-lvm
Please take a look at this old thread first ...
http://linux.derkeiler.com/Mailing-Lists/Fedora/2007-02/msg02237.html
This was back in February and I'm just now trying to get back into
recovery mode. I've mounted the image like so:
/sbin/losetup /dev/loop0 ./recover.img
/sbin/kpartx -lv /dev/loop0
/sbin/kpartx -av /dev/loop0
This gives me /dev/mapper/loop0p1, and /dev/mapper/loop0p2 which seem to
be my original boot drive and VolGroup00. When I do an lvscan I get:
WARNING: Duplicate VG name VolGroup00: Existing
Vmi02d-0hr7-7NVb-vYZi-1fbD-E9n5-ixWu0a (created here) takes precedence
over D7avZX-pVCb-ibTN-tyvs-7Q62-rzR9-tquBi9
Presumably the latter is the UUID of the volume group on my disk image.
Is there a way that I can now rename this original volume group so it
doesn't conflict with my currently mounted one so I can start the data
recovery process? I tried vgrename, which I thought could use UUID's as
input, but that didn't work. Any ideas?
FC6
lvm2-2.02.17-1.fc6
Thanks - Tod
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [linux-lvm] Renaming Loopback 'Mounted' Volume Group
2007-11-23 21:35 [linux-lvm] Renaming Loopback 'Mounted' Volume Group Tod
@ 2007-11-26 8:28 ` Bryn M. Reeves
2007-11-27 2:58 ` Tod
0 siblings, 1 reply; 3+ messages in thread
From: Bryn M. Reeves @ 2007-11-26 8:28 UTC (permalink / raw)
To: LVM general discussion and development
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Tod wrote:
> Please take a look at this old thread first ...
>
> http://linux.derkeiler.com/Mailing-Lists/Fedora/2007-02/msg02237.html
>
>
> This was back in February and I'm just now trying to get back into
> recovery mode. I've mounted the image like so:
>
> /sbin/losetup /dev/loop0 ./recover.img
> /sbin/kpartx -lv /dev/loop0
> /sbin/kpartx -av /dev/loop0
>
> This gives me /dev/mapper/loop0p1, and /dev/mapper/loop0p2 which seem to
> be my original boot drive and VolGroup00. When I do an lvscan I get:
>
> WARNING: Duplicate VG name VolGroup00: Existing
> Vmi02d-0hr7-7NVb-vYZi-1fbD-E9n5-ixWu0a (created here) takes precedence
> over D7avZX-pVCb-ibTN-tyvs-7Q62-rzR9-tquBi9
See the steps I posted last Friday, with some corrections/improvements
from Alasdair:
https://www.redhat.com/archives/linux-lvm/2007-November/msg00039.html
https://www.redhat.com/archives/linux-lvm/2007-November/msg00040.html
Regards,
Bryn.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org
iD8DBQFHSoOk6YSQoMYUY94RAkp1AKCixiD85e6gtb+fju0M0VJbiyrFwACg0vLQ
dkdB8lPKZxzueFAutdkptP8=
=qyM4
-----END PGP SIGNATURE-----
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [linux-lvm] Renaming Loopback 'Mounted' Volume Group
2007-11-26 8:28 ` Bryn M. Reeves
@ 2007-11-27 2:58 ` Tod
0 siblings, 0 replies; 3+ messages in thread
From: Tod @ 2007-11-27 2:58 UTC (permalink / raw)
To: LVM general discussion and development
Bryn M. Reeves wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Tod wrote:
>> Please take a look at this old thread first ...
>>
>> http://linux.derkeiler.com/Mailing-Lists/Fedora/2007-02/msg02237.html
>>
>>
>> This was back in February and I'm just now trying to get back into
>> recovery mode. I've mounted the image like so:
>>
>> /sbin/losetup /dev/loop0 ./recover.img
>> /sbin/kpartx -lv /dev/loop0
>> /sbin/kpartx -av /dev/loop0
>>
>> This gives me /dev/mapper/loop0p1, and /dev/mapper/loop0p2 which seeoupNew
>> be my original boot drive and VolGroup00. When I do an lvscan I get:
>>
>> WARNING: Duplicate VG name VolGroup00: Existing
>> Vmi02d-0hr7-7NVb-vYZi-1fbD-E9n5-ixWu0a (created here) takes precedence
>> over D7avZX-pVCb-ibTN-tyvs-7Q62-rzR9-tquBi9
>
> See the steps I posted last Friday, with some corrections/improvements
> from Alasdair:
>
> https://www.redhat.com/archives/linux-lvm/2007-November/msg00039.html
> https://www.redhat.com/archives/linux-lvm/2007-November/msg00040.html
Thanks Bryn.
Before I make a mess I'd like to recite my steps to see if they seem
reasonable to you. I've made a little progress (I think) since the post
above that might allow me to streamline things.
Of the two 'partitions' on my disk image, only the LVM one has content
that is important to me and I already know its offset. Combining both
your's and Alasdair's steps:
1. /sbin/losetup /dev/loop0 ./recover.img
2. /sbin/losetup -o 106928640 /dev/loop1 /dev/loop0
3. Running pvscan shows me the loopback PV, and gives me expected
warning regarding the duplicate VG name
4. Setup temp LVM dir and set LVM_SYSTEM_DIR to point to it
5. Copy lvm.conf to that dir and apply filter = [ "r|/dev/loop[01]|",
"a|.*|" ] to it
6. Clone the PV -> dd if=/dev/loop1 of=/dev/loop2
7. pvchange --uuid /dev/loop2
8. vgchange --uuid VolGroup00
9. vgrename VolGroup00 VolGroupNew
10. Discard LVM_SYSTEM_DIR env var & directory
11. Activate new VG -> vgchange -ay VolGroupNew
Does this look right? The one concern I had was step 8 since both my
currently active VG and the one from the disk image share the same name.
I'm guessing steps 4 and 5 will prevent that?
Thanks for all of your help.
- Tod
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2007-11-27 2:59 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-11-23 21:35 [linux-lvm] Renaming Loopback 'Mounted' Volume Group Tod
2007-11-26 8:28 ` Bryn M. Reeves
2007-11-27 2:58 ` Tod
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.