Skip to content

lvcreate does not accept --setautoactivation for thin volumes

Hi! I noticed that lvcreate accepts the --setautoactivation flag when creating a thick-provisioned LV and disables autoactivation accordingly:

# lvcreate --name noauto-thick myvg --size 100M --setautoactivation n
  Logical volume "noauto-thick" created.
# lvs -o +autoactivation
  LV           VG   Attr       LSize   Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert AutoAct
  noauto-thick myvg -wi-a----- 100.00m

But lvcreate refuses the flag when creating a thin-provisioned LV:

# lvcreate -L 1G -T myvg/thinpool
  Thin pool volume with chunk size 64.00 KiB can address at most <15.88 TiB of data.
  Logical volume "thinpool" created.
# lvcreate -T myvg/thinpool --name noauto-thin --virtualsize 100M --setautoactivation n
  Option --setautoactivation is unsupported with thins.
  Run `lvcreate --help' for more information.

Creating without the flag, and then running lvchange with the flag works though:

# lvcreate -T myvg/thinpool --name noauto-thin --virtualsize 100M
  Logical volume "noauto-thin" created.
# lvs -o +autoactivation
  LV           VG   Attr       LSize   Pool     Origin Data%  Meta%  Move Log Cpy%Sync Convert AutoAct
  noauto-thick myvg -wi-a----- 100.00m
  noauto-thin  myvg Vwi-a-tz-- 100.00m thinpool        0.00                                    enabled
  thinpool     myvg twi-aotz--   1.00g                 0.00   11.04                            enabled
# lvchange --setautoactivation n myvg/noauto-thin
  Logical volume myvg/noauto-thin changed.
# lvs -o +autoactivation
  LV           VG   Attr       LSize   Pool     Origin Data%  Meta%  Move Log Cpy%Sync Convert AutoAct
  noauto-thick myvg -wi-a----- 100.00m
  noauto-thin  myvg Vwi-a-tz-- 100.00m thinpool        0.00
  thinpool     myvg twi-aotz--   1.00g                 0.00   11.04                            enabled

Tested on Arch Linux with its lvm2 package, version 2.03.31-1:

# lvm version
  LVM version:     2.03.31(2) (2025-02-27)
  Library version: 1.02.205 (2025-02-27)
  Driver version:  4.49.0
  Configuration:   ./configure CONFIG_SHELL=/bin/bash --prefix=/usr --sbindir=/usr/bin --sysconfdir=/etc --localstatedir=/var --enable-cmdlib --enable-dmeventd --enable-lvmpolld --enable-pkgconfig --enable-readline --enable-udev_rules --enable-udev_sync --enable-write_install --with-cache=internal --with-default-dm-run-dir=/run --with-default-locking-dir=/run/lock/lvm --with-default-pid-dir=/run --with-default-run-dir=/run/lvm --with-libexecdir=/usr/lib/lvm2 --with-systemdsystemunitdir=/usr/lib/systemd/system --with-thin=internal --with-udev-prefix=/usr

My question is: Is this intentional? Or should lvcreate also accept the --setautoactivation flag for thin volumes?

Thanks!

Friedrich