--- Begin Message ---
In the meantime I figured out what happened and would like to share my findings 
for everyone else to avoid my mistake.

The mentioned change to lvm.conf is done by set_lvm_conf in the postinst script 
of pve-manager (see /var/lib/dpkg/info/pve-manager.postinst).

During the update I had accidentally pressed Enter when asked what should 
happen with /etc/lvm/lvm.conf.

======================
Setting up lvm2 (2.03.16-2) ...

Configuration file '/etc/lvm/lvm.conf'
 ==> Modified (by you or by a script) since installation.
 ==> Package distributor has shipped an updated version.
   What would you like to do about it ?  Your options are:
    Y or I  : install the package maintainer's version
    N or O  : keep your currently-installed version
      D     : show the differences between the versions
      Z     : start a shell to examine the situation
 The default action is to keep your current version.
*** lvm.conf (Y/I/N/O/D/Z) [default=N] ? 
…
Setting up pve-cluster (8.0.3) ...
…
Setting up pve-manager (8.0.4) ...
...
======================

That kept the currently-installed /etc/lvm/lvm.conf and saved the (Debian) 
package maintainer's version in /etc/lvm/lvm.conf.dpkg-dist.
The currently-installed lvm.conf (from PVE7.4) contained the correct 
global_filter and was therefore subsequently not touched by 
pve-manager.postinst during the upgrade to 8.0.

After the upgrade (and reading through [1] again) I noticed my mistake, took 
lvm.conf.dpkg-dist and copied it over lvm.conf.

That’s why pve-manager.postinst was not able to change the global_filter in the 
package maintaner’s version.

I had better selected to “Y” to install the Debian-maintained version of 
lvm.conf and let pve-manager.postinst do it’s job right away.

Running "dpkg-reconfigure pve-manager” and rebooting the machine solved the 
issue for me.

Stefan

root@pve80:~# dpkg-reconfigure pve-manager
Backing up lvm.conf before setting pve-manager specific settings..
'/etc/lvm/lvm.conf' -> '/etc/lvm/lvm.conf.bak' (backup: 
'/etc/lvm/lvm.conf.bak~')
Setting 'global_filter' in /etc/lvm/lvm.conf to prevent zvols from being 
scanned:
global_filter=["a|.*|"] => global_filter=["r|/dev/zd.*|"]
root@pve80:~# ls -1tr /etc/lvm/lvm.conf* | xargs stat | egrep 'File:|Modify:'
  File: /etc/lvm/lvm.conf.bak~
Modify: 2021-11-24 16:15:05.733346570 +0300
  File: /etc/lvm/lvm.conf.dpkg-dist
Modify: 2022-10-19 22:37:31.000000000 +0300
  File: /etc/lvm/lvm.conf.bak
Modify: 2023-08-23 12:57:56.675736231 +0300
  File: /etc/lvm/lvm.conf
Modify: 2023-08-23 12:57:56.683736177 +0300
root@pve80:~# ls -1tr /etc/lvm/lvm.conf* | xargs md5sum
b2cbd2917377f32746fd91b48bb42665  /etc/lvm/lvm.conf.bak~
daa2538ce1abd1d6c249c8b53d951de2  /etc/lvm/lvm.conf.dpkg-dist
daa2538ce1abd1d6c249c8b53d951de2  /etc/lvm/lvm.conf.bak
962680063ffa27ef4663f18a23f8bb94  /etc/lvm/lvm.conf
root@pve80:~# reboot

> On Aug 12, 2023, at 12:35, Stefan Radman <[email protected]> wrote:
> 
> Recently I upgraded a single server from PVE 7.4 to 8.0, following the great 
> upgrade instructions at the Wiki 
> <https://pve.proxmox.com/wiki/Upgrade_from_7_to_8> [0 
> <https://pve.proxmox.com/wiki/Upgrade_from_7_to_8>]
> and the recommendations 
> <https://pve.proxmox.com/wiki/Upgrade_from_7_to_8#Upgrade_the_system_to_Debian_Bookworm_and_Proxmox_VE_8.0>
>  [1 
> <https://pve.proxmox.com/wiki/Upgrade_from_7_to_8#Upgrade_the_system_to_Debian_Bookworm_and_Proxmox_VE_8.0>]
>  for common configuration files.
> 
> The (apt) upgrade went just fine (thank you Debian and Proxmox teams, you did 
> it again:)
> 
> I had never made any changes to lvm.conf and thus chose "Yes” during the 
> upgrade to install the package maintainer's version.
> 
> When reviewing lvm.conf after the upgrade and comparing it against the backup 
> I had made, I noticed a Proxmox specific configuration at the end of the old 
> file that no longer appeared in the new lvm.conf.
> 
> root@pve80:~# diff -U0 /etc/lvm/lvm.conf{.pve74,} | tail -4
> -devices {
> -      # added by pve-manager to avoid scanning ZFS zvols
> -      global_filter=["r|/dev/zd.*|"]
> -}
> 
> On that machine I am not using ZFS and thus did not notice any adverse effect 
> from the missing global_filter.
> That said I do have hosts with ZFS root disks that I haven’t upgraded to 8.0 
> yet.
> 
> Is the global_filter still required in PVE 8.0?
> 
> Thanks
> 
> Stefan
> 
> [0] https://pve.proxmox.com/wiki/Upgrade_from_7_to_8 
> <https://pve.proxmox.com/wiki/Upgrade_from_7_to_8>
> [1] 
> https://pve.proxmox.com/wiki/Upgrade_from_7_to_8#Upgrade_the_system_to_Debian_Bookworm_and_Proxmox_VE_8.0
>  
> <https://pve.proxmox.com/wiki/Upgrade_from_7_to_8#Upgrade_the_system_to_Debian_Bookworm_and_Proxmox_VE_8.0>
> 
> 


--- End Message ---
_______________________________________________
pve-user mailing list
[email protected]
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-user

Reply via email to