64

When I do sudo apt-get upgrade, I have the following message:

 WARNING: PV /dev/sda3 in VG ubuntu-vg is using an old PV header,
 modify the VG to update.

What can I do?

iBug
  • 1,529
  • 3
  • 16
  • 30
JarsOfJam-Scheduler
  • 863
  • 1
  • 6
  • 12

1 Answers1

98

'VG' in the warning means volume group. This is applicable to systems using logical volume management. 'PV' stands for physical volume, that is the actual partitions on disk(s). Headers contains information about the volume group's layout which can be used for data recovery.

You can try to resolve this with the tool vgck, which checks volume group metadata, and can correct it with the --updatemetadata option. You need to give the name of the volume group mentioned in your warning - in your case it says that the physical volume /dev/sda3 in volume group ubuntu-vg is using an old header, so you need to use that volume group as the argument:

sudo vgck --updatemetadata ubuntu-vg

This will issue the same warning; to prove that it fixed the issue, simply run

sudo vgck --updatemetadata ubuntu-vg

once more, and the warning should not appear.

Reinier Post
  • 431
  • 4
  • 15
sotirov
  • 1,400
  • 11
  • 15
  • is it useful or not? – JarsOfJam-Scheduler Dec 12 '20 at 19:46
  • 1
    It is. I had the same problem and have fixed it this way. – Azrael Jan 10 '21 at 22:07
  • 10
    Ensure that you replace `ubuntu-vg` with the actual volume group name from your own specific error message, as it may vary. ;-) – Ben Johnson Jan 26 '21 at 21:37
  • 3
    How will this solve the issue? PRovide some explanation for how this command solves the problem, please. – Thomas Ward Feb 16 '21 at 00:25
  • 1
    This answer is still relevant as I had this issue today also useful ref: https://manpages.ubuntu.com/manpages/focal/man8/vgck.8.html – Antony Feb 24 '21 at 14:14
  • 3
    Could anyone write another answer ou complete this one? Even with the `man` provided by @Antony , we technically don't know the drawbacks of this command, nor what it does, nor when to use it, etc. – JarsOfJam-Scheduler Mar 17 '21 at 08:11
  • @BenJohnson otherwise what would happens? Feel free to edit this answer since your comment may be important for people looking at the question. – JarsOfJam-Scheduler Mar 17 '21 at 08:12
  • 1
    @JarsOfJam-Scheduler It looks like @Zanna has improved the answer and incorporated my previous comment, but to answer your question, using a non-existent volume group name would yield two errors, `Volume group "ubuntu-vg" not found` and `Cannot process volume group ubuntu-vg`. – Ben Johnson Mar 22 '21 at 16:46
  • I have rewritten the ending to explain how to check the results. – Reinier Post Feb 02 '22 at 13:05
  • 1
    @ReinierPost Thanks for this. BTW - Doing a `sudo update-grub` will also prove the warning has gone away. – B. Shea Apr 07 '22 at 17:30
  • 1
    `sudo vgscan` triggers it as well. – rjt Sep 17 '22 at 08:48
  • What bad things will happen if I ignore the warning? – SomeoneElse Sep 22 '22 at 13:59
  • 1
    @SomeoneElse probably nothing; some new features may not work. This may (will, according to Murphy's law) inevitably trip up some scripts that rely on newer features over time, so it is good practice to keep up to date even though it will not have an immediate impact in the foreseeable future. – sehe Feb 09 '23 at 03:31
  • Yes, as root "vgck blah; vgck --updatemetadata blah; vgck blah" gave no output on the final "vgck". – SomeoneElse Feb 10 '23 at 20:53
  • 1
    Out of an abundance of caution, I suggest manually backing up the volume group metadata before updating it. [Run `vgcfgbackup`, then `cp -r /etc/lvm ~/my/backup/dir`](https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/4/html/cluster_logical_volume_manager/vg_backup). – holocronweaver Apr 18 '23 at 23:21