0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

Ubuntu 25.04以降のLVM Nested PV対応

Posted at

LVMのLVをPVとして、別のVGに再利用するNested PVを使用している(lvm.confのscan_lvs=1)状態で、Ubuntu 25.04以降へアップグレードするとLVがudevにスキャンされずVGをアクティベートできなくなる。

これはudevルールの更新によりデフォルトではlvに対してpvscanされなくったため。

 * **IMPORTANT:** When `devices/scan_lvs` is enabled found LVs are no longer auto
  activated, must enable `LVM_PVSCAN_ON_LVS` in udev rules (*69-dm-lvm.rules*.)

同様の問題はdebian trixie以降も発生するはず。lvmcacheのためにシステム用VGから空き領域を遅いデータ用VGのキャッシュに切り出すような使い方をしていてハマった。

対応方法

アップグレード前に変数を設定しておけば問題なくアップグレードできる。

LVM_PVSCAN_ON_LVSを設定するため、69-dm-lvm.rulesよりソートが早いルールを作成する。

echo 'ENV{LVM_PVSCAN_ON_LVS}="1"' > /etc/udev/rules.d/01-lvm-pvscan-on-lvs.rules

すでにアップグレードしてしまっていたらinitramfsに反映する必要があるので、
lvm.conf側でもscan_lvs=1になっていることを確認したうえで

update-initramfs -u
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?