After a do-release-upgrade – in my case from Ubuntu 18.04 to 20.04 – the same warning showed up with every kernel update and every LVM command, several times in a row:
WARNING: PV /dev/sda5 in VG hostname-vg is using an old PV header, modify the VG to update.
WARNING: PV /dev/sda5 in VG hostname-vg is using an old PV header, modify the VG to update.
WARNING: PV /dev/sda5 in VG hostname-vg is using an old PV header, modify the VG to update.
The message appears with update-grub, update-initramfs, pvs or lvs, among others. It is harmless but annoying – and a single command gets rid of it.
Where does the warning come from?
LVM stores a header with management data on every physical volume (PV). Volumes created with an older LVM version still carry the old header format. Starting with the LVM version shipped with Ubuntu 20.04 and Debian 11, this format is still read, but LVM complains about it on every access. Your data is not at risk – LVM merely asks you to write the metadata once in the new format.
The warning typically affects systems that have been through several release upgrades, i.e. Ubuntu 20.04, 22.04 or 24.04 and Debian 11 or newer on top of an originally older installation.
1. Find the name of the volume group
sudo vgs
The name is listed in the VG column; on default Ubuntu installations it is usually <hostname>-vg or ubuntu-vg. sudo pvs shows which disks (PVs) belong to it.
2. Back up the metadata (just in case)
LVM automatically keeps copies of the metadata in /etc/lvm/backup/ anyway. A fresh backup does not hurt, though:
sudo vgcfgbackup hostname-vg
3. Update the header
sudo vgck hostname-vg
sudo vgck --updatemetadata hostname-vg
The first command checks the volume group once more and shows the warning one last time. The second one writes the metadata in the current format to all PVs in the group. This works on a running system; no reboot is required. Replace hostname-vg with your own name from step 1, of course.
If you have several volume groups, a loop handles all of them:
for vg in $(sudo vgs --noheadings -o vg_name); do
sudo vgck --updatemetadata "$vg"
done
4. Verify
sudo pvs
sudo update-grub
Both commands should now run without the “old PV header” warning.
More clean-up after a release upgrade
After a major upgrade it is also worth looking at leftover old kernels and third-party sources – see removing old kernels, removing a PPA and removing PHP from ppa:ondrej/php.
Originally published in 2022, revised in December 2026. Source of the first version: itrig.de (in German).