[Touch-packages] [Bug 1654600] Re: unattended-upgrade-shutdown hangs when /var is a separate filesystem

2017-01-18 Thread George Moutsopoulos
I get this sometimes on shutdown but not always.

Erik, until the fix reaches users, should I:
systemctl disable unattended-upgrades.service
?

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

Title:
  unattended-upgrade-shutdown hangs when /var is a separate filesystem

Status in unattended-upgrades package in Ubuntu:
  Confirmed

Bug description:
  The systemd unit file unattended-upgrades.service is used to stop a running 
unattended-upgrade
  process during shutdown. This unit file is running together with all 
filesystem
  unmount services.

  The unattended-upgrades service checks if the lockfile for unattended-upgrade
  (in /var/run) exists, and if it does, there is an unattended-upgrade in 
progress
  and the service will wait until it finishes (and therefore automatically wait 
at
  shutdown).

  However, if /var is a separate filesystem, it will get unmounted even though 
/var/run
  is a tmpfs that's still mounted on top of the /var/run directory in the /var 
filesystem.
  The unattended-upgrade script will fail to find lockfile, sleeps for 5 
seconds, and
  tries to check the lockfile again. After 10 minutes (the default timeout), it 
will finally
  exit and the system will continue shutdown.

  The problem is the error handling in 
/usr/share/unattended-upgrades/unattended-upgrade-shutdown
  where it tries to lock itself:

  while True:
  res = apt_pkg.get_lock(options.lock_file)
  logging.debug("get_lock returned %i" % res)
  # exit here if there is no lock
  if res > 0:
  logging.debug("lock not taken")
  break
  lock_was_taken = True

  The function apt_pkg.get_lock() either returns a file descriptor, or -1 on an 
error.
  File descriptors are just C file descriptors, so they are always positive 
integers.
  The code should check the result to be negative, not positive. I have 
attached a patch
  to reverse the logic.

  Additional information:

  1)
  Description:  Ubuntu 16.04.1 LTS
  Release:  16.04

  2)
  unattended-upgrades:
Installed: 0.90ubuntu0.3
Candidate: 0.90ubuntu0.3
Version table:
   *** 0.90ubuntu0.3 500
  500 http://nl.archive.ubuntu.com/ubuntu xenial-updates/main amd64 
Packages
  500 http://nl.archive.ubuntu.com/ubuntu xenial-updates/main i386 
Packages
  100 /var/lib/dpkg/status
   0.90 500
  500 http://nl.archive.ubuntu.com/ubuntu xenial/main amd64 Packages
  500 http://nl.archive.ubuntu.com/ubuntu xenial/main i386 Packages
  3)
  Fast reboot
  4)
  Very slow reboot (after a 10 minutes timeout)

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/unattended-upgrades/+bug/1654600/+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


[Touch-packages] [Bug 1423796] Re: Unable to mount lvmcache root device at boot time

2015-04-29 Thread George Moutsopoulos
OK, I managed! I had to add more modules

sudo echo "dm_cache" >> /etc/initramfs-tools/modules
sudo echo "dm_cache_mq"  >> /etc/initramfs-tools/modules
sudo echo "dm_persistent_data"  >> /etc/initramfs-tools/modules
sudo echo "dm_bufio"  >> /etc/initramfs-tools/modules

plus, add cache_check as in 
 http://forums.debian.net/viewtopic.php?f=5&t=119644

Booted!

This is how I set up the lvmcache
sudo vgextend LinuxVG /dev/sdb2
sudo lvcreate -L 10G -n rootCacheLV LinuxVG /dev/sdb2
sudo lvcreate -L 24M -n rootCacheMetaLV LinuxVG /dev/sdb2
sudo lvcreate -L 10G -n homeCacheLV LinuxVG /dev/sdb2
sudo lvcreate -L 24M -n homeCacheMetaLV LinuxVG /dev/sdb2
sudo lvconvert --type cache-pool --poolmetadata LinuxVG/rootCacheMetaLV 
--cachemode writethrough LinuxVG/rootCacheLV
sudo lvconvert --type cache-pool --poolmetadata LinuxVG/homeCacheMetaLV 
--cachemode writethrough LinuxVG/homeCacheLV
sudo lvconvert --type cache --cachepool LinuxVG/rootCacheLV LinuxVG/rootLV
sudo lvconvert --type cache --cachepool LinuxVG/homeCacheLV LinuxVG/homeLV

where LinuxVG has the root at rootLV and home at homeLV and sdb2 is an
SSD

-- 
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


[Touch-packages] [Bug 1423796] Re: Unable to mount lvmcache root device at boot time

2015-04-29 Thread George Moutsopoulos
MegaBrutal, can you give some instructions. I followed the instructions at
 http://forums.debian.net/viewtopic.php?f=5&t=119644
but still couldn't boot

-- 
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


[Touch-packages] [Bug 1423796] Re: Unable to mount lvmcache root device at boot time

2015-04-25 Thread George Moutsopoulos
I also tried the instructions in
http://forums.debian.net/viewtopic.php?f=5&t=119644
but still cannot reboot into cached hdd system

removing the cache (lvremove lvcache) every time I fail to boot, by
using a rescue usb, gave me some corruption and was just inconvenient to
further experiment. so I ended up giving up until someone else succeeds
using lvmcache.

My use would be a laptop with a small ssd 24GB drive and I think this
would be a cool way to speed up the system. actually it was intended for
that and the MS windows system did that before I wiped it out. Setting
up the lvm and installing ubuntu was easy, setting up the lvmcache was
easy too... but couldn't manage to make it boot :/

-- 
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