mirror of
https://github.com/QubesOS/qubes-doc.git
synced 2024-12-30 17:56:25 -05:00
1.2 KiB
1.2 KiB
layout | title | permalink | redirect_from | |||
---|---|---|---|---|---|---|
doc | Disk TRIM | /doc/disk-trim/ |
|
VMs have already TRIM enabled by default, but dom0 doesn't. There are some security implications (read for example this article), but IMO not very serious.
To enable TRIM in dom0 you need:
-
Get your LUKS device UUID:
ls /dev/mapper/luks-*
-
Add entry to
/etc/crypttab
(replace luks-<UUID> with the device name and the <UUID> with UUID alone):luks-<UUID> UUID=<UUID> none allow-discards
-
Add
rd.luks.allow-discards=1
to kernel cmdline (/etc/default/grub
, GRUB_CMDLINE_LINUX line) -
Rebuild grub config (
grub2-mkconfig -o /boot/grub2/grub.cfg
) -
Rebuild initrd in hostonly mode:
dracut -H -f
-
Add "discard" option to
/etc/fstab
for root device -
Reboot the system, verify that allow-discards is really enabled (
dmsetup table
)
There is a bug affecting allow-discards option, once it will be fixed, first two steps will be no longer needed.