SSD drives
Juan Orti Alcaine
j.orti.alcaine at gmail.com
Mon May 28 20:10:26 UTC 2012
2012/5/28 Milan Broz <mbroz at redhat.com>
>
> On 05/28/2012 04:55 PM, Roberto Ragusa wrote:
> > On 05/26/2012 03:53 PM, Juan Orti Alcaine wrote:
> >
> >> I suspect it isn't working because "cryptsetup status
> >> /dev/mapper/luks-uuid" does not say anything about discards. I think
> >> it must say "flags: discards"
> >>
> >> Any suggestion?
>
> lsblk -D
> it should print non-zero discard size for the whole storage stack.
>
> dmsetup table <name of luks device>
>
> and you should see "allow-discards" as last option in mapping table.
>
> If not, discards are rejected.
>
> (Of course you can complicate it and use blktrace + fstrim)
>
Something doesn't work in my setup. My installed versions are:
kernel-3.3.7-1.fc17.x86_64
systemd-44-12.fc17.x86_64
cryptsetup-1.4.2-1.fc17.x86_64
The device supports discards:
# lsblk -D
NAME DISC-ALN
DISC-GRAN DISC-MAX DISC-ZERO
sda 0
512B 2G 0
├─sda1 0
512B 2G 0
├─sda2 0
512B 2G 0
└─sda3 0
512B 2G 0
└─luks-123456-aaaa-bbb-ccc-123456 (dm-0) 0 512B
2G 0
├─vg_ssd-swap (dm-1) 0
512B 2G 0
├─vg_ssd-root (dm-2) 0
512B 2G 0
└─vg_ssd-var (dm-3) 0
512B 2G 0
But it seems that the discard is not recognized by dmsetup:
# dmsetup table luks-123456-aaaa-bbb-ccc-123456
0 232333312 crypt aes-xts-plain64
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0 8:3 4096
This is my crypttab:
luks-123456-aaaa-bbb-ccc-123456 UUID=123456-aaaa-bbb-ccc-123456 none
allow-discards
And of course, the filesystem is mounted with discard.
I have regenerated the initramfs with dracut, and have checked that it
includes allow-discards in its crypttab.
I will check the blktrace method when I have more time, but I don't
think I can get a different result.
More information about the devel
mailing list