Created
November 14, 2014 14:56
-
-
Save qknight/7c95f95da12ec7409de9 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
i want to remove /dev/sdb from the Vg ve-daivb but it fails with the error below, so what do do now? | |
vgreduce ve-daivb /dev/sdb5 | |
Physical volume "/dev/sdb5" still in use | |
before vgreduce i did pvmove: | |
# pvmove /dev/sdb5 /dev/sda3 | |
Skipping mirror LV root | |
Skipping mirror log LV root_mlog | |
Skipping mirror image LV root_mimage_0 | |
Skipping mirror image LV root_mimage_1 | |
/dev/sdb5: Moved: 0,3% | |
/dev/sdb5: Moved: 16,7% | |
/dev/sdb5: Moved: 33,6% | |
/dev/sdb5: Moved: 50,7% | |
/dev/sdb5: Moved: 67,4% | |
/dev/sdb5: Moved: 84,5% | |
/dev/sdb5: Moved: 100,0% | |
===== important information ==== | |
pvs -o+pv_used :( | |
PV VG Fmt Attr PSize PFree Used | |
/dev/sda1 ve-daivb lvm2 a- 160,00g 70,70g 89,30g | |
/dev/sda2 ve-daivb lvm2 a- 1,00g 1,00g 4,00m | |
/dev/sda3 ve-daivb lvm2 a- 537,62g 533,80g 3,83g | |
/dev/sdb5 ve-daivb lvm2 a- 148,81g 59,51g 89,30g | |
pvdisplay | |
--- Physical volume --- | |
PV Name /dev/sdb5 | |
VG Name ve-daivb | |
PV Size 148,81 GiB / not usable 2,00 MiB | |
Allocatable yes | |
PE Size 4,00 MiB | |
Total PE 38095 | |
Free PE 15234 | |
Allocated PE 22861 | |
PV UUID pbX3wC-eNWx-20Pe-aL4T-aqLC-P1ws-ajx05O | |
--- Physical volume --- | |
PV Name /dev/sda1 | |
VG Name ve-daivb | |
PV Size 160,00 GiB / not usable 4,00 MiB | |
Allocatable yes | |
PE Size 4,00 MiB | |
Total PE 40959 | |
Free PE 18098 | |
Allocated PE 22861 | |
PV UUID lTJ1xw-4rGO-cuOq-vNZg-1i5c-iQip-O9BGwf | |
--- Physical volume --- | |
PV Name /dev/sda2 | |
VG Name ve-daivb | |
PV Size 1,01 GiB / not usable 1,20 MiB | |
Allocatable yes | |
PE Size 4,00 MiB | |
Total PE 257 | |
Free PE 256 | |
Allocated PE 1 | |
PV UUID Zk7ZwZ-KFgH-aEid-G2VC-UJoh-2TKK-jTVVSo | |
--- Physical volume --- | |
PV Name /dev/sda3 | |
VG Name ve-daivb | |
PV Size 537,63 GiB / not usable 4,18 MiB | |
Allocatable yes | |
PE Size 4,00 MiB | |
Total PE 137632 | |
Free PE 136652 | |
Allocated PE 980 | |
PV UUID gbQ2j2-JRP1-J4aq-3AFk-wcx2-vmgz-TkTEL0 | |
vgdisplay | |
--- Volume group --- | |
VG Name ve-daivb | |
System ID | |
Format lvm2 | |
Metadata Areas 4 | |
Metadata Sequence No 13 | |
VG Access read/write | |
VG Status resizable | |
MAX LV 0 | |
Cur LV 2 | |
Open LV 2 | |
Max PV 0 | |
Cur PV 4 | |
Act PV 4 | |
VG Size 847,43 GiB | |
PE Size 4,00 MiB | |
Total PE 216943 | |
Alloc PE / Size 46703 / 182,43 GiB | |
Free PE / Size 170240 / 665,00 GiB | |
VG UUID oEdxY8-rTWb-PVEg-2pZ0-2DBu-UQ2d-kYJes4 | |
lvdisplay | |
--- Logical volume --- | |
LV Name /dev/ve-daivb/root | |
VG Name ve-daivb | |
LV UUID MU8sq0-4ZTS-jgu6-lWir-xBDh-c0q7-92rrPF | |
LV Write Access read/write | |
LV Status available | |
# open 1 | |
LV Size 89,30 GiB | |
Current LE 22861 | |
Mirrored volumes 2 | |
Segments 1 | |
Allocation inherit | |
Read ahead sectors auto | |
- currently set to 256 | |
Block device 252:4 | |
--- Logical volume --- | |
LV Name /dev/ve-daivb/swap_1 | |
VG Name ve-daivb | |
LV UUID GwjWLH-xrUr-btmY-jjjB-lMTd-fgyX-HLTL16 | |
LV Write Access read/write | |
LV Status available | |
# open 2 | |
LV Size 3,83 GiB | |
Current LE 980 | |
Segments 1 | |
Allocation inherit | |
Read ahead sectors auto | |
- currently set to 256 | |
Block device 252:5 | |
Author
qknight
commented
Nov 14, 2014
cause
the problem with the move was that LV / was mirrored
solution
optimal solution would be to remove the mirror which was on /dev/sdb5 but that would require:
Converts mirror logical volume "vg00/lvmirror1" to linear, freeing physical extents from /dev/sda: lvconvert -m0 vg00/lvmirror1 /dev/sda
but since i already typed: "lvconvert -m0 /dev/ve-daivb/root" i have to wait for pvmove ...
# lvconvert -m0 /dev/ve-daivb/root
The link /dev/ve-daivb/root_mimage_0 should had been created by udev but it was not found. Falling back to direct link creation.
The link /dev/ve-daivb/root_mimage_0 should have been removed by udev but it is still present. Falling back to direct link removal.
Logical volume root converted.
# pvmove -v /dev/sdb5 /dev/sda3
Finding volume group "ve-daivb"
Archiving volume group "ve-daivb" metadata (seqno 18).
Creating logical volume pvmove0
Moving 22861 extents of logical volume ve-daivb/root
Found volume group "ve-daivb"
Updating volume group metadata
Found volume group "ve-daivb"
Found volume group "ve-daivb"
Suspending ve--daivb-root (252:4) with device flush
Found volume group "ve-daivb"
Creating ve--daivb-pvmove0
Loading ve--daivb-pvmove0 table (252:0)
Resuming ve--daivb-pvmove0 (252:0)
Found volume group "ve-daivb"
Loading ve--daivb-pvmove0 table (252:0)
Suppressed ve--daivb-pvmove0 identical table reload.
Loading ve--daivb-root table (252:4)
Resuming ve--daivb-root (252:4)
Creating volume group backup "/etc/lvm/backup/ve-daivb" (seqno 19).
Checking progress before waiting every 15 seconds
/dev/sdb5: Moved: 0,0%
/dev/sdb5: Moved: 0,8%
/dev/sdb5: Moved: 1,6%
/dev/sdb5: Moved: 2,4%
/dev/sdb5: Moved: 3,2%
/dev/sdb5: Moved: 4,1%
/dev/sdb5: Moved: 5,0%
/dev/sdb5: Moved: 5,9%
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment