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

kimj emailadhoc at yahoo.com
Tue Feb 18 14:17:31 UTC 2014


Public bug reported:

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

** Affects: ubiquity (Ubuntu)
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to ubiquity 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 “ubiquity” package in Ubuntu:
  New

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/ubiquity/+bug/1281587/+subscriptions



More information about the foundations-bugs mailing list