[Novalug] "clandestine" lvm disk move? (SOLVED)
Kurt Yoder
ktynovalug at yoderhome.com
Fri Apr 6 07:53:26 EDT 2007
On Apr 6, 2007, at 7:33 AM, Michael Stone wrote:
> On Thu, Apr 05, 2007 at 11:26:58PM -0400, Kurt Yoder wrote:
>> device names. So I need to figure out where lvm keeps its device
>> names and modify it.
>
> The lvm configuration is stored on the disks. It doesn't care what
> they are called. One thing you *do not* want to do is activate lvm
> when both disks are in the system. (Make sure you "vgchange -an"
> before you start your copy, and don't turn it back on until you're
> done. If root or another critical fs area is on the lvm you'll have
> to use knoppix or somesuch to do the copy.)
Thanks. I tried a few things already before checking the list this
morning, and now my lvm group is back up. This is is a Debian system,
so I have an /etc/init.d/lvm init script. This gave me a place to start:
root at corn:~# /etc/init.d/lvm start
Setting up LVM Volume Groups...
Reading all physical volumes. This may take a while...
Found duplicate PV f9SBB2eKbQeaVo1Kr2cKT9Gkj5xtTfm7: using /dev/
hdc not /dev/sda
Found volume group "mygroup" using metadata type lvm2
Found duplicate PV f9SBB2eKbQeaVo1Kr2cKT9Gkj5xtTfm7: using /dev/
hdc not /dev/sda
1 logical volume(s) in volume group "mygroup" now active
root at corn:~# /etc/init.d/lvm stop
Shutting down LVM Volume Groups...
Found duplicate PV f9SBB2eKbQeaVo1Kr2cKT9Gkj5xtTfm7: using /dev/
hdc not /dev/sda
0 logical volume(s) in volume group "mygroup" now active
root at corn:~# pvremove /dev/sda
Found duplicate PV f9SBB2eKbQeaVo1Kr2cKT9Gkj5xtTfm7: using /dev/
hdc not /dev/sda
Found duplicate PV f9SBB2eKbQeaVo1Kr2cKT9Gkj5xtTfm7: using /dev/
sda not /dev/hdc
Found duplicate PV f9SBB2eKbQeaVo1Kr2cKT9Gkj5xtTfm7: using /dev/
hdc not /dev/sda
Can't pvremove physical volume "/dev/sda" of volume group
"mygroup" without -ff
root at corn:~# pvremove -ff /dev/sda
Found duplicate PV f9SBB2eKbQeaVo1Kr2cKT9Gkj5xtTfm7: using /dev/
hdc not /dev/sda
Found duplicate PV f9SBB2eKbQeaVo1Kr2cKT9Gkj5xtTfm7: using /dev/
sda not /dev/hdc
Found duplicate PV f9SBB2eKbQeaVo1Kr2cKT9Gkj5xtTfm7: using /dev/
hdc not /dev/sda
Really WIPE LABELS from physical volume "/dev/sda" of volume group
"mygroup" [y/n]? y
WARNING: Wiping physical volume label from /dev/sda of volume
group "mygroup"
Labels on physical volume "/dev/sda" successfully wiped
From there, I was able to start LVM normally. I didn't even need to
remove the disk out of the system for it to work. Thanks for the
information about not needing to think about possible moving disks
though. I was lucky and only lost 32 K off the bad disk, so that's
only a few seconds of some random Myth recording.
--
Kurt Yoder
http://yoderhome.com
More information about the Novalug
mailing list