Re: Getting EVMS working again after mdadm --grow
Brian Kuschak <[email protected]> Tue, 4 Nov 2008 13:17:21 -0800 (PST)
| Newsgroups | gmane.linux.evms.devel |
|---|---|
| Message-ID | <[email protected]> |
Steve, > What you do is select the volume and choose the expand > option. (The expand > option will not be listed if EVMS cannot find an object in > the volume that > cannot be expanded.) EVMS will then present you a list of > "expansion > points", objects that can be expanded. You select the > object you want to > expand and then EVMS takes care of the rest, expanding and > dependent > objects or file systems in the correct order. > > Your case may have been a little tricky. I think what you > would have had > to do is first replace all the disks in md/md0, as you did. > Then you would > select to expand the volume. md/md0 should then appear as > an expansion > point. I think. Expansion also gets tricky when > containers are involved, > such as your lvm_on_raid_group_120 volume group. > Expansions can be > targeted at containers. You may have had to expand the > container first, > choosing md/md0 as the expansion point, and then expand the > volume choosing > lvm2/lvm_on_raid_group_120/big_volume as the expansion > point. Thanks for the insight on how EVMS does the expansion. I tried this originally, but my Expand menu didn't show any possible expansion points, which was confusing. None for volumes nor storage objects, nor containers. I'm not sure why. This is what prompted me to use mdadm. > OK. I'm crawling through the LVM2 plug-in code. I see > the place where it > logs the warning, "Object %s recorded size > (%"PRIu64") does not match > actual size (%"PRIu64")\n", which is > what you see in your log. It is the > else side of an if clause that checks if it should display > the device size > prompt. Apparently, the setting for the device size prompt > is "no", > otherwise instead of logging a message it would have put up > a prompt asking > you if the object was indeed a PV. Look at your > /etc/evsm.conf file. In > the "lvm2" section there is an option > "device_size_prompt". I will bet it > is set to "no". Try changing it to > "yes". When you are prompted whether > md/md0 is an LVM2 PV, answer "yes". Be sure to > answer "no" for the other > objects, such as sd[acdef]. Answering "yes" for > md/md0 will cause the LVM2 > plug-in to write the correct object size to the LVM > metadata. Once you are > finished, change the setting of > "device_size_prompt" back to "no" or > else > you will be asked if sd[acdef] are PVs every time you start > EVMS. I followed your instructions and it appears that things are working again! Yea!! I do still see these messages about size mismatch, though: Nov 04 13:12:24 netdisk _6_ LVM2: read_pv_label: Found LVM2 label on object sde, sector 1. Nov 04 13:12:24 netdisk _3_ LVM2: check_pv_size: Object sde recorded size (2500527104) does not match actual size (1250263728) Nov 04 13:12:24 netdisk _6_ LVM2: read_pv_label: Found LVM2 label on object sdd, sector 1. Nov 04 13:12:24 netdisk _3_ LVM2: check_pv_size: Object sdd recorded size (2500527104) does not match actual size (1250263728) Nov 04 13:12:24 netdisk _6_ LVM2: read_pv_label: Found LVM2 label on object sdc, sector 1. Nov 04 13:12:24 netdisk _3_ LVM2: check_pv_size: Object sdc recorded size (625163264) does not match actual size (312581808) Nov 04 13:12:24 netdisk _6_ LVM2: read_pv_label: Found LVM2 label on object sda, sector 1. Nov 04 13:12:24 netdisk _3_ LVM2: check_pv_size: Object sda recorded size (625163264) does not match actual size (321672960) Do I need to worry about these? One thing that is different, however, is that previously the volumes page showed /dev/evms/big_volume as my mounted object, and this is what I activate in my sysinit script. After the fixes, this is now shown as /dev/evms/lvm2/lvm_on_raid_group_120/big_volume. I updated my init script with this object and it mounts properly. I'm just curious: why the change? -Brian > > Thank you for your assistance! > > Hope this helps. Let me know if this works. > > > Best Regards, > > Brian > > Steve D. > > > --- On Tue, 11/4/08, Steve Dobbelstein > <[email protected]> wrote: > > > > > From: Steve Dobbelstein <[email protected]> > > > Subject: Re: [Evms-devel] Getting EVMS working > again after mdadm --grow > > > To: [email protected] > > > Date: Tuesday, November 4, 2008, 8:45 AM > > > Brian Kuschak <[email protected]> wrote on > 11/02/2008 > > > 04:51:45 PM: > > > > > > > I replaced all 3 disks in a RAID5 array with > larger > > > capacity drives, > > > > one at a time, and then used mdadm --grow to > expand > > > the array. > > > > Afterwards evms was unable to read the LV > that was > > > using that MD device. > > > > > > > > I was able to get things working using the > mdadm, lvm2 > > > tools, and > > > > the partition is mountable. However, > I'd like to > > > get EVMS to working > > > again. > > > > > > > > Each time I run evmsn, it reports > "LVM2: The PV > > > with index 0 was not > > > > found when discovering container > > > lvm2/lvm_on_raid_group_120. An > > > > "error" object will be created in > it's > > > place." > > > > > > > > How can I get evms to properly recognize > this newly > > > expanded LV? > > > > > > > > > > > > My procedure was as follows: > > > > > > > > - purchased three new 640GB drives > > > > - replace each of the 120GB drives sdd, sde, > sdf one > > > at a time, and run > > > > evms to add new drive to degraded /dev/md0 > array. > > > > - after third new drive is done, the > /dev/md0 is still > > > only 240GB, so > > > > resize the md0 array by running mdadm > --grow > > > > - mdadm --grow /dev/md0 --size max > > > > - md0 is now 1.2 TB (640GB x 2 + spare) > > > > - increased size of lvm VG by running: lvm > pvresize > > > /dev/md0 > > > > - pvscan now shows increased size: > > > > PV /dev/md0 VG lvm_on_raid_group_120 > lvm2 [1.16 > > > TB / 968.81 GB > > > free] > > > > PV /dev/md1 VG lvm_on_raid_group_120 > lvm2 > > > [298.06 GB / 0 free] > > > > - expand size of the LV itself: > > > > lvresize -l 100%VG > > > /dev/lvm_on_raid_group_120/big_volume > > > > - activate LV: lvm vgchange -ay > > > > - mount the big_volume on a temp location: > > > > > /dev/mapper/lvm_on_raid_group_120-big_volume > > > > 522G 499G 24G 96% > /mnt/tmp > > > > - now grow XFS filesystem: xfs_growfs > /mnt/tmp > > > > - df now shows: > > > > /dev/mapper/lvm_on_raid_group_120-big_volume > > > > 1.5T 499G 993G 34% > /mnt/tmp > > > > > > Hi, Brian. > > > > > > For starters, in general it is not good to mix > EVMS with > > > other > > > configuration utilities as things like this can > happen. > > > The standard > > > utilities don't know about how EVMS manages > its > > > metadata and can mess > > > things up. EVMS maintains metadata compatibility > with the > > > standard > > > utilities as much as possible, but sometimes > there > > > additional things EVMS > > > must do to coordinate the whole configuration. > Also, if > > > people don't know > > > what they are doing with the standard utilities > (though it > > > sounds like you > > > do) they can mess things up, especially if they > don't > > > know how EVMS works. > > > You should have been able to accomplish this task > by using > > > EVMS (though I > > > must admit that users have had problems on > occasion). But > > > you are beyond > > > that now, so let's look at your situation. > > > > > > It looks like EVMS is either not discovering the > newly > > > sized md0 device or > > > that the EVMS LVM2 code is not finding its > metadata > > > correctly on md0. If > > > you bring up the EVMS user interface, do you see > and entry > > > for md/md0? If > > > not, then the problem is with the MD plug-in. If > you do > > > see md/md0, then > > > the problem is with the LVM2 plug-in. > > > > > > Run evms, evmsn, or evmsgui with the > "-d" option > > > to turn on debugging > > > output, e.g., "evmsn -d". Then look at > the debug > > > log, /var/log/evms-engine.log. There will be a > lot of > > > messages in the log > > > as the EVMS engine and the plug-ins report on > their > > > activity. There will > > > be messages from the MD plug-in about what it > discovered > > > and from the LVM2 > > > plug-in about what it discovered. There may be > some clues > > > in there as to > > > what is going wrong. If you need help looking at > the log, > > > gzip it and > > > email it to me and I will take a look. Hopefully > knowing > > > what went wrong > > > will enable us to easily fix it and get thing > working. > > > > > > Steve D., > > > > > > ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Evms-devel mailing list [email protected] To subscribe/unsubscribe, please visit: https://lists.sourceforge.net/lists/listinfo/evms-devel