Bug 503116 - Some VGs are not activated at boot when lvm cache is not uptodate
Summary: Some VGs are not activated at boot when lvm cache is not uptodate
Keywords:
Status: CLOSED DEFERRED
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: lvm2
Version: 5.3
Hardware: All
OS: Linux
low
medium
Target Milestone: rc
: ---
Assignee: LVM and device-mapper development team
QA Contact: Cluster QE
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-05-28 22:58 UTC by Takahiro Yasui
Modified: 2014-07-25 05:07 UTC (History)
13 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-10-21 16:25:01 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Takahiro Yasui 2009-05-28 22:58:03 UTC
Description of problem:
  At system boot, vgscan command needs to be called to update lvm cache,
  /etc/lvm/cache/.cache, to keep correct device information, but vgscan
  is called only from init script in initrd and the cache on rootfs is not
  updated because rootfs is not mounted yet.

  If the cache is not uptodate due to some reasons, such as lvm.conf udpate,
  device configuration change, some VGs are not recognized and activated
  by vgchange in rc.sysinit. Moreover, lvm commands, such as vgs and lvs
  will show wrong results even after system boot completed.

Version-Release number of selected component (if applicable):
  Any versions of initscripts in RHEL5

Expected results:
  vgscan is executed after rootfs is mounted and the cache is refreshed
  to keep correct device information. And VGs on all devices excluding
  filtered devices by lvm.conf are activated.

Additional info:
  vgscan was removed from rc.sysinit to fix bug 191879 in RHEL4.5.

Comment 1 Bill Nottingham 2009-05-29 01:43:09 UTC
Is there a reason the tools can't be able to handle an out of date cache when necessary? (Given that the system isn't read/write at that point, perhaps the proper solution is to link the cache to /dev/null.

Comment 2 Alasdair Kergon 2009-05-29 02:40:19 UTC
It depends how the tools are used...

If you don't specify a list of VGs in a command and the cache exists, it should use the cache to determine which devices to use - other devices will be ignored.  It's for initrd/initscripts to deal with that e.g. making the cache dir writable and retaining it across pivotroot, or having the dir empty.  (Its location can be overridden if that makes things easier to copy it about.)

Alternatively if you do specify a list of VGs and any of the VG names cannot be found, it will automatically rescan to search for it.

Ultimately, we should have both: the list of VGs to be activated at boot should be specified, and the cache files should be moved around so they are always writable and retained.

But as we get further along with the udev/upstart integration work, this will probably all end up changing anyway.

Comment 4 Milan Broz 2011-10-21 16:25:01 UTC
With change to reading list of block devices from udev cache becomes obsolete (not used), so in RHEL6.2 this should now work.

For RHEL5 we do not plan to change this functionality, administrator should run vgscan to update cache if you want vgchange without VG specified to run properly.


Note You need to log in before you can comment on or make changes to this bug.