SUSE Support

Here When You Need Us

pvdisplay does not show the correct PV size with large PVs

This document (7000151) is provided subject to the disclaimer at the end of this document.

Environment

SUSE Linux Enterprise Desktop 10
SUSE Linux Enterprise Server 10

Situation

When creating a large PV, pvdisplay shows a wrong value for PV Size.

Resolution

This issue is solved with an update to lvm2 (lvm2-2.02.17-7.18), which is available maintenance update.

The metadata written to disk by the original lvcreate is wrong though, the metadata is not fixed by this update. Thus this has to be done manually. There are 2 different ways to fix the metadata:
 
  • The first way is to delete and recreate the VG (all data will be lost!):

    # vgremove VG-NAME
    # vgcreate /dev/device VG-NAME
     
  • The second way is to backup, modify and restore the VG configuration manually:

    # vgcfgbackup -f /tmp/vgbackup VG-NAME

    This command will backup the VG-configuration to the file /tmp/vgbackup

    # grep dev_size /etc/lvm/archive/VG-NAME_00000.vg

    This command will output the value from the inital creation of the VG, which is the correct value. The wrong value will be written to the VG config when the LV is created, so the file VG-NAME_00000.vg contains the correct value.

    # edit /tmp/vgbackup

    Now the file written by vgcfgbackup needs to be modified to contain the correct value from the last step. Replace the line containing"dev_size" by the line from the "grep" command above.

    # vgcfgrestore -f /tmp/vgbackup VG-NAME

    This will restore the modified VG configuration. From now on, the metadata in the LVM configuration is correct.

Disclaimer

This Support Knowledgebase provides a valuable tool for SUSE customers and parties interested in our products and solutions to acquire information, ideas and learn from one another. Materials are provided for informational, personal or non-commercial use within your organization and are presented "AS IS" WITHOUT WARRANTY OF ANY KIND.

  • Document ID:7000151
  • Creation Date: 21-Apr-2008
  • Modified Date:19-Mar-2021
    • SUSE Linux Enterprise Desktop
    • SUSE Linux Enterprise Server

< Back to Support Search

For questions or concerns with the SUSE Knowledgebase please contact: tidfeedback[at]suse.com

tick icon

SUSE Support Forums

Get your questions answered by experienced Sys Ops or interact with other SUSE community experts.

tick icon

Support Resources

Learn how to get the most from the technical support you receive with your SUSE Subscription, Premium Support, Academic Program, or Partner Program.

tick icon

Open an Incident

Open an incident with SUSE Technical Support, manage your subscriptions, download patches, or manage user access.