[Xenial verification]

Confirming that I'm using a lxd container running Xenial:

# systemd-detect-virt
lxc

# lsb_release -cs
xenial

* rmadison:
 util-linux | 2.27.1-6ubuntu3.7    | xenial-updates
 util-linux | 2.27.1-6ubuntu3.8    | xenial-proposed

* With current xenial-updates package:

$ dpkg -l | grep -i util-linux
ii  util-linux                       2.27.1-6ubuntu3.7                          
amd64        miscellaneous system utilities

$ sh -xv /etc/cron.weekly/fstrim 
#!/bin/sh
# trim all mounted file systems which support it
/sbin/fstrim --all || true
+ /sbin/fstrim --all
fstrim: /: FITRIM ioctl failed: Operation not permitted
+ true

* With current xenial-proposed package:

$ dpkg -l | grep -i util-linux
ii  util-linux                       2.27.1-6ubuntu3.8                          
amd64        miscellaneous system utilities

$ sh -xv /etc/cron.weekly/fstrim 
#!/bin/sh
# Prevent fstrim to run inside a container environment (LP: #1589289)
if /usr/bin/systemd-detect-virt -q -c; then
exit 0
fi
+ /usr/bin/systemd-detect-virt -q -c
+ exit 0

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1589289

Title:
  fstrim: cannot open /dev/.lxd-mounts: Permission denied

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/util-linux/+bug/1589289/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to