After making my system work again, which took a while since most live
media and even the installer don't support LVM cache, I had it working
for writeback on my system with the following.

/etc/initramfs-tools/hooks/lvm2_cache
{{{
#!/bin/sh

PREREQ="lvm2"

prereqs()
{
    echo "$PREREQ"
}

case $1 in
prereqs)
    prereqs
    exit 0
    ;;
esac

if [ ! -x /sbin/lvm ]; then
    exit 0
fi

. /usr/share/initramfs-tools/hook-functions

copy_exec /usr/sbin/cache_check
copy_exec /usr/sbin/cache_dump
copy_exec /usr/sbin/cache_metadata_size
copy_exec /usr/sbin/cache_repair
copy_exec /usr/sbin/cache_restore

for x in dm_cache_cleaner dm_cache_smq dm_cache dm_persistent_data dm_bio_prison
do
    manual_add_modules ${x}
done
}}}

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to lvm2 in Ubuntu.
https://bugs.launchpad.net/bugs/1423796

Title:
  Unable to mount lvmcache root device at boot time

Status in initramfs-tools package in Ubuntu:
  Confirmed
Status in linux package in Ubuntu:
  Confirmed
Status in lvm2 package in Ubuntu:
  Confirmed

Bug description:
  I'm experimenting with Vivid Vervet on a virtual machine and tried a
  new LVM feature, lvmcache. I made a cache for the root file system,
  rebuilt the initrd and rebooted the VM.

  At boot time, the system failed to activate the root LV. After some
  investigation, I found out, it's because the initrd is missing some
  essential stuff needed for activating a cached LV.

  The initrd was missing the dm-cache module. I regenerated the initrd
  with explicitly listing dm-cache in /etc/initramfs-tools/modules, but
  the system still can't boot up, because now it is missing the
  /usr/sbin/cache_check utility.

  As SSDs are becoming more and more common, I think it will be common
  to use them as cache for root file systems, thus it is mandatory to
  make sure that an initrd can mount an lvmcached root device when
  necessary, preferably without /etc/initramfs-tools/modules and other
  manual initrd hacking.

  System details:

  Linux lvmvm 3.18.0-13-generic #14-Ubuntu SMP Fri Feb 6 09:55:14 UTC
  2015 x86_64 x86_64 x86_64 GNU/Linux

  Distributor ID:       Ubuntu
  Description:  Ubuntu Vivid Vervet (development branch)
  Release:      15.04
  Codename:     vivid

  LVM version:     2.02.111(2) (2014-09-01)
  Library version: 1.02.90 (2014-09-01)
  Driver version:  4.28.0

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/initramfs-tools/+bug/1423796/+subscriptions

-- 
Mailing list: https://launchpad.net/~touch-packages
Post to     : touch-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to