[Gllug] Removing LVM (RHEL4)
Rich Walker
rw at shadow.org.uk
Wed Oct 19 12:50:57 UTC 2005
Bruce Richardson <itsbruce at uklinux.net> writes:
>
> LVM really does not add much complexity and actually makes maintenance
> considerably easier if you use it properly.
Well, until it gets confused.
I have /dev/md1 built up like this:
md0 : active raid1 hda1[0]
19583168 blocks [2/1] [U_]
md1 : active raid5 hdf2[0] hdk2[2] hdi2[3] hdg2[4] hde2[1]
638904576 blocks level 5, 32k chunk, algorithm 2 [5/5] [UUUUU]
I then use md1 as a pv:
thoth:~# pvdisplay
/dev/hdg2: lseek 4611824548433201152 failed: Invalid argument
/dev/hdg2: lseek 4611824548433201152 failed: Invalid argument
/dev/hdg2: lseek 4611824548433201152 failed: Invalid argument
/dev/hdg2: lseek 4611824548433201152 failed: Invalid argument
--- Physical volume ---
PV Name /dev/md1
VG Name bulk
PV Size 609.30 GB / not usable 0
Allocatable yes
PE Size (KByte) 4096
Total PE 155982
Free PE 14670
Allocated PE 141312
PV UUID GKnn7Q-FDnz-NsYB-9Sd4-pLko-5yGH-vY6kji
--- NEW Physical volume ---
PV Name /dev/hdg2
VG Name
PV Size 510334.04 TB
Allocatable NO
PE Size (KByte) 0
Total PE 0
Free PE 0
Allocated PE 0
PV UUID ϵ¦i¾¯-C ú- §?-9 4- L -5 GH- Y6
Unfortunately, at some time the system has decided /dev/hdg2 is a
separate PV.
So on boot, it's a race between md and lvm as to who grabs hdg2
first. Typically, this means:
lvm hangs on to hdg2
pd assembles /dev/md1 without hdg2
lvm might or might not manage to assemble VG bulk and the corresponding
devices
booting finishes
I do mdadm --add /dev/md1 /dev/hdg2
I have tried a number of ways to remove /dev/hdg2 without breaking
/dev/md1. So far, most of them have resulted in broken arrays ...
(Backup and restore isn't an option)
cheers, Rich.
--
rich walker | Shadow Robot Company | rw at shadow.org.uk
technical director 251 Liverpool Road |
need a Hand? London N1 1LX | +UK 20 7700 2487
www.shadow.org.uk/products/newhand.shtml
--
Gllug mailing list - Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug
More information about the GLLUG
mailing list