I can't attach a writecache to LV

Bug #1868129 reported by Vladimir Khristenko
56
This bug affects 10 people
Affects Status Importance Assigned to Milestone
lvm2 (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

#lvconvert --type writecache --cachesettings 'low_watermark=0 high_watermark=10 writeback_jobs=2048' --cachevol cache ssd/data
  WARNING: Unrecognised segment type writecache
  Invalid argument for --type: writecache
  Error during parsing of command line.

I see that lvm2 package was build without key --with-writecache=internal

#lvm version
  LVM version: 2.03.07(2) (2019-11-30)
  Library version: 1.02.167 (2019-11-30)
  Driver version: 4.41.0
  Configuration: ./configure --build=x86_64-linux-gnu --prefix=/usr --includedir=${prefix}/include --mandir=${prefix}/share/man --infodir=${prefix}/share/info --sysconfdir=/etc --localstatedir=/var --disable-silent-rules --libdir=${prefix}/lib/x86_64-linux-gnu --libexecdir=${prefix}/lib/x86_64-linux-gnu --runstatedir=/run --disable-maintainer-mode --disable-dependency-tracking --exec-prefix= --bindir=/bin --libdir=/lib/x86_64-linux-gnu --sbindir=/sbin --with-usrlibdir=/usr/lib/x86_64-linux-gnu --with-optimisation=-O2 --with-cache=internal --with-device-uid=0 --with-device-gid=6 --with-device-mode=0660 --with-default-pid-dir=/run --with-default-run-dir=/run/lvm --with-default-locking-dir=/run/lock/lvm --with-thin=internal --with-thin-check=/usr/sbin/thin_check --with-thin-dump=/usr/sbin/thin_dump --with-thin-repair=/usr/sbin/thin_repair --enable-applib --enable-blkid_wiping --enable-cmdlib --enable-dmeventd --enable-dbus-service --enable-lvmlockd-dlm --enable-lvmlockd-sanlock --enable-lvmpolld --enable-notify-dbus --enable-pkgconfig --enable-readline --enable-udev_rules --enable-udev_sync

# lsmod | grep dm_writecache
dm_writecache 36864 0

#cat /etc/os-release
NAME="Ubuntu"
VERSION="20.04 LTS (Focal Fossa)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu Focal Fossa (development branch)"
VERSION_ID="20.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=focal
UBUNTU_CODENAME=focal

#uname -a
Linux sw-sed-ubuntu 5.4.0-18-generic #22-Ubuntu SMP Sat Mar 7 18:13:06 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

#apt info lvm2
Package: lvm2
Version: 2.03.07-1ubuntu1
Priority: optional

ProblemType: Bug
DistroRelease: Ubuntu 20.04
Package: lvm2 2.03.07-1ubuntu1
ProcVersionSignature: Ubuntu 5.4.0-18.22-generic 5.4.24
Uname: Linux 5.4.0-18-generic x86_64
ApportVersion: 2.20.11-0ubuntu20
Architecture: amd64
Date: Thu Mar 19 16:06:17 2020
InstallationDate: Installed on 2020-03-19 (0 days ago)
InstallationMedia: Ubuntu-Server 20.04 LTS "Focal Fossa" - Alpha amd64 (20200317)
ProcEnviron:
 TERM=xterm
 PATH=(custom, no user)
 LANG=C.UTF-8
 SHELL=/bin/bash
SourcePackage: lvm2
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Vladimir Khristenko (vkhristenko) wrote :
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in lvm2 (Ubuntu):
status: New → Confirmed
Revision history for this message
Kad Mann (nospam-nospam-nospam) wrote :

The importance of this bug ought to be decided by now. Six months to wait for a fix so far is 6 months too long.

Revision history for this message
Konstantin (hi-angel-z) wrote :

FTR, on Archlinux this option is also not used, however the `--type writecache` works fine. So either something changed in later versions, or it might be that some other `configure` option is needed. The Archlinux `lvm version` output is:

     λ lvm version
      LVM version: 2.03.12(2) (2021-05-07)
      Library version: 1.02.177 (2021-05-07)
    /dev/mapper: mkdir failed: Permission denied
    Failure to communicate with kernel device-mapper driver.
    Incompatible libdevmapper 1.02.177 (2021-05-07) and kernel driver (unknown version).
      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 --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-systemdsystemunitdir=/usr/lib/systemd/system --with-thin=internal --with-udev-prefix=/usr --enable-udev-systemd-background-jobs

Revision history for this message
Stephen (swilley) wrote :

Is there a workaround while this waits?
Seems like this is pretty important to me but....

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Related questions

Remote bug watches

Bug watches keep track of this bug in other bug trackers.