Re: Removing a PV from a mirror

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Fredrik Tolf [fredrik@dolda2000.com] wrote:
> Oh, sorry; when I go back and read it, I realize that I was a bit
> unclear. :) The LV started working again once I reconnected the PV and
> rebooted again, so there's no damage done.
> 
> I'm still just wondering how to actually remove the PV from the mirror.

Since your PV is flakey (failing), probably the best way is to convert
the LV to linear first and then converting back to mirror with a new PV.

A failing PV should make the system convert to linear LV if you have
right software (works on RHEL based system). Or you can do the following
steps manually. First step may not be necessary, but it should not cause
any harm in your case.

0) Run vgcfgbackup to back up your LVM metadata. This is needed if
   something goes wrong. You have been warned. If you know, this data is
   already there in archives...
1) lvconvert --mirrorlog core <LV-name>
2) lvconvert -m0 <LV-name> <Failing-PV-name>
	Make sure this did remove the PV you wanted. If not, use
	vgcfgrestore to restore and ask for help...
3) Insert your new disk, create PV label on it, and add it to your VG
4) Run "lvconvert -m1 <LV-name> <New-PV-name>
5) If you need "disk" log, run another lvconvert to get disk log.

Hope this helps,
--Malahal.

_______________________________________________
linux-lvm mailing list
linux-lvm@redhat.com
https://www.redhat.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/

[Index of Archives]     [Gluster Users]     [Kernel Development]     [Linux Clusters]     [Device Mapper]     [Security]     [Bugtraq]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]

  Powered by Linux