[Bug 1281587] Re: Ubiquity offers to encrypt the new system, but fails to set TRIM-enabling option in crypttab

Launchpad Bug Tracker 1281587 at bugs.launchpad.net
Tue Jul 12 08:12:39 UTC 2016


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

** Changed in: ubiquity (Ubuntu)
       Status: New => Confirmed

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

Title:
  Ubiquity offers to encrypt the new system, but fails to set TRIM-
  enabling option in crypttab

Status in cryptsetup package in Ubuntu:
  Confirmed
Status in ubiquity package in Ubuntu:
  Confirmed

Bug description:
  summary: ubiquity should add, after "luks", an option to enable trim
  support at the dm-crypt layer, if the target disk is an ssd with trim
  support. Alternatively, "allow-discards" should be ok on all systems,
  even not-ssd ones, since in ubuntu 14.04, is the userland script
  trimfs-all that choses which filesystems and disks are TRIM-capable,
  and issues discards weekly. Putting "allow-discards" on all systems
  shouldn't cause any problem since the choice about whatever discards
  are to be issued is left to the userland.

  copy pasting from google+: 
  in ubuntu 14.04 there's default TRIM support.
  a weekly cronjob, /etc/cron.weekly/fstrim, runs the script "fstrim-all", which invokes fstrim on all supported filesystems.
  in order to effectively issue discards, all the layers must support issuing discards, not just the filesystem.
  For this reason, in 14.04, lvm supports issuing discards to the lower layers of block storage by default:
  in /etc/lvm/lvm.conf we have "issue_discards = 1"
  however, ubiquity supports installing a system with encryption by default. In order to effectively support issuing discards, LUKS should be configured to support them too:
  in /etc/crypttab we should have something like
  "[...] luks,allow-discards", to allow higher layers to issue discards.
  It is also possible to have "luks,discard", to automatically issue discards, but it would be more in line with ubuntu policy to trim ssd periodically from the userland to just "allow" them.
  in a default install, at the moment, no discard option is present in /etc/crypttab:
  "sda5_crypt UUID=longuuidhere none luks"

  as a consequence, fstrim fails:
  fstrim: /: FITRIM ioctl failed: Operation not supported

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/cryptsetup/+bug/1281587/+subscriptions



More information about the foundations-bugs mailing list