Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
DMCRYPT + SSD + TRIM: Wie Kernel Parameter? [solved]
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German)
View previous topic :: View next topic  
Author Message
root_tux_linux
l33t
l33t


Joined: 21 Dec 2003
Posts: 966

PostPosted: Mon Feb 27, 2012 3:12 pm    Post subject: DMCRYPT + SSD + TRIM: Wie Kernel Parameter? [solved] Reply with quote

Hi

Kleines Problem, ich hab mir jetzt zum ersten mal SSD's geholt und die sind verschlüsselt.

Ab Kernel 3.1 und cryptsetup 1.4.0 sollte Trim funktionieren!

Da ich nix in der Gentoo Wiki gefunden habe, hab ich bei Archlinux und Ubuntu nachgeschlagen dort steht man solle den Parameter

Code:
cryptdevice=/dev/mapper/root:root:allow-discards


anhängen, was ich auch getan habe.

Trotzdem sagt mir ein Manuelles TRIM das die Operation nicht unterstützt würde

Code:
gentoo ssd # fstrim /
fstrim: /: FITRIM ioctl failed: Die Operation wird nicht unterstützt



Code:
gentoo ~ # equery l cryptsetup
 * Searching for cryptsetup ...
[IP-] [  ] sys-fs/cryptsetup-1.4.1:0

gentoo ~ # equery l gentoo-sources

 * Searching for gentoo-sources ...
[IP-] [  ] sys-kernel/gentoo-sources-3.2.6:3.2.6


Kann mir jemand sagen was da nicht funzt?
_________________
Intel Core i7 6700K@4.6GHz, Gigabyte GTX 980 Ti G1, Gigabyte Gaming 7, Hyper X Fury 32GB, 2 TB Samsung EVO 840 Basic
ASUS ROG Swift PG348Q Display
ASUS ROG ASUS G771JW Notebook


Last edited by root_tux_linux on Fri Mar 02, 2012 8:55 pm; edited 1 time in total
Back to top
View user's profile Send private message
disi
Veteran
Veteran


Joined: 28 Nov 2003
Posts: 1354
Location: Out There ...

PostPosted: Mon Feb 27, 2012 3:34 pm    Post subject: Reply with quote

Hier in den Release Notes steht, man solle das beim Oeffnen bzw. Entschluessen angeben:
http://code.google.com/p/cryptsetup/wiki/Cryptsetup140
Code:
cryptsetup luksOpen --allow-discards /dev/sdb test_disk

_________________
Gentoo on Uptime Project - Larry is a cow
Back to top
View user's profile Send private message
root_tux_linux
l33t
l33t


Joined: 21 Dec 2003
Posts: 966

PostPosted: Mon Feb 27, 2012 4:10 pm    Post subject: Reply with quote

Ist mir bekannt, aber es geht ja um die root Partition und da hab ich wie erwähnt das hier gelesen z.B.


Quote:

As of linux version 3.1, support for dm-crypt TRIM pass-through can be toggled upon device creation or mount with dmsetup. Support for this option also exists in cryptsetup version 1.4.0 and up. To add support during boot, you will need to add ":allow-discards" to the cryptdevice option. The option should look like this:
cryptdevice=/dev/mapper/root:root:allow-discards


Quelle: https://wiki.archlinux.org/index.php/System_Encryption_with_LUKS


Dann sollte es doch mit der root partition gehen oder versteh ich was falsch?
_________________
Intel Core i7 6700K@4.6GHz, Gigabyte GTX 980 Ti G1, Gigabyte Gaming 7, Hyper X Fury 32GB, 2 TB Samsung EVO 840 Basic
ASUS ROG Swift PG348Q Display
ASUS ROG ASUS G771JW Notebook
Back to top
View user's profile Send private message
disi
Veteran
Veteran


Joined: 28 Nov 2003
Posts: 1354
Location: Out There ...

PostPosted: Mon Feb 27, 2012 4:23 pm    Post subject: Reply with quote

Ist das in der /etc/crypttab?

Das wird nicht klappen, die Partition ist doch verschluesselt. Die Option muesste in das initrd Skript? Wie hier auf der inoffiziellen Wiki: http://en.gentoo-wiki.com/wiki/DM-Crypt

//edit: oh ne, grub :)
_________________
Gentoo on Uptime Project - Larry is a cow
Back to top
View user's profile Send private message
root_tux_linux
l33t
l33t


Joined: 21 Dec 2003
Posts: 966

PostPosted: Tue Feb 28, 2012 4:48 am    Post subject: Reply with quote

Jap, sollte in die Grub, aber irgendwie bewirkt das bei mir mal garnichts...

Keine Ahnung wieso :(
_________________
Intel Core i7 6700K@4.6GHz, Gigabyte GTX 980 Ti G1, Gigabyte Gaming 7, Hyper X Fury 32GB, 2 TB Samsung EVO 840 Basic
ASUS ROG Swift PG348Q Display
ASUS ROG ASUS G771JW Notebook
Back to top
View user's profile Send private message
bell
Guru
Guru


Joined: 27 Nov 2007
Posts: 508

PostPosted: Thu Mar 01, 2012 3:44 pm    Post subject: Reply with quote

Wenn es die / Partition ist wird diese ja in der initramfs geöffnet. Dh. Du musst die initramfs auspacken, die Skripte dort anpassen und anschließend wieder packen.
Back to top
View user's profile Send private message
root_tux_linux
l33t
l33t


Joined: 21 Dec 2003
Posts: 966

PostPosted: Fri Mar 02, 2012 7:24 pm    Post subject: Reply with quote

bell wrote:
Wenn es die / Partition ist wird diese ja in der initramfs geöffnet. Dh. Du musst die initramfs auspacken, die Skripte dort anpassen und anschließend wieder packen.


Das probier ich das mal :)
_________________
Intel Core i7 6700K@4.6GHz, Gigabyte GTX 980 Ti G1, Gigabyte Gaming 7, Hyper X Fury 32GB, 2 TB Samsung EVO 840 Basic
ASUS ROG Swift PG348Q Display
ASUS ROG ASUS G771JW Notebook
Back to top
View user's profile Send private message
root_tux_linux
l33t
l33t


Joined: 21 Dec 2003
Posts: 966

PostPosted: Fri Mar 02, 2012 8:55 pm    Post subject: Reply with quote

initramfs.scripts von genkernel beherrscht trim!

Einfach root_trim=yes in grub eintragen :)

Komischerweise ist die Option nirgends dokumentiert und ich fand sie auch nur per zufall weil ich das initramfs.scripts angeguckt habe :)
_________________
Intel Core i7 6700K@4.6GHz, Gigabyte GTX 980 Ti G1, Gigabyte Gaming 7, Hyper X Fury 32GB, 2 TB Samsung EVO 840 Basic
ASUS ROG Swift PG348Q Display
ASUS ROG ASUS G771JW Notebook
Back to top
View user's profile Send private message
Josef.95
Advocate
Advocate


Joined: 03 Sep 2007
Posts: 4520
Location: Germany

PostPosted: Fri Mar 02, 2012 9:07 pm    Post subject: Reply with quote

root_tux_linux wrote:
Komischerweise ist die Option nirgends dokumentiert...

man genkernel wrote:
root_trim=(yes|no)
Enables TRIM support for a Luks-based root device. Only useful with SSD setups. Have a look at http://en.wikipedia.org/wiki/TRIM for more information.
;)
Hätte ich so ohne den Tipp von bell aber auch nicht gewusst.
Back to top
View user's profile Send private message
tulali
n00b
n00b


Joined: 27 Feb 2012
Posts: 17

PostPosted: Tue Mar 13, 2012 10:49 am    Post subject: Reply with quote

welche ssd benutzt du in kombination mit welcher verschlüsselung?
wie ist die geschwindigkeit so?
Back to top
View user's profile Send private message
tulali
n00b
n00b


Joined: 27 Feb 2012
Posts: 17

PostPosted: Sun Mar 18, 2012 10:38 am    Post subject: Reply with quote

huhu?
Back to top
View user's profile Send private message
meyerm
Veteran
Veteran


Joined: 27 Jun 2002
Posts: 1311
Location: Munich / Germany

PostPosted: Fri Mar 30, 2012 8:28 am    Post subject: Reply with quote

tulali wrote:
huhu?
+1 ;-)
Back to top
View user's profile Send private message
root_tux_linux
l33t
l33t


Joined: 21 Dec 2003
Posts: 966

PostPosted: Sun Apr 01, 2012 6:12 am    Post subject: Reply with quote

Hi, sorry für die späte Antwort...

Ich hab zwei OCZ Vertex 3 und nutze aes-xts-plain.

EDIT:

Hier ein paar Werte mit 3.3.0.

boot - unverschlüsselt
Code:
/dev/sda1:
 Timing cached reads:   5546 MB in  2.00 seconds = 2773.35 MB/sec
 Timing buffered disk reads: 200 MB in  0.44 seconds = 459.70 MB/sec


root - verschlüsselt
Code:
/dev/sda3:
 Timing cached reads:   5024 MB in  2.00 seconds = 2512.01 MB/sec
 Timing buffered disk reads: 1246 MB in  3.00 seconds = 415.22 MB/sec



Jetzt, frag ich mich wieso die Performance mit dem 3.3 besser ist oO
_________________
Intel Core i7 6700K@4.6GHz, Gigabyte GTX 980 Ti G1, Gigabyte Gaming 7, Hyper X Fury 32GB, 2 TB Samsung EVO 840 Basic
ASUS ROG Swift PG348Q Display
ASUS ROG ASUS G771JW Notebook
Back to top
View user's profile Send private message
cryptosteve
Veteran
Veteran


Joined: 04 Jan 2004
Posts: 1169
Location: GER

PostPosted: Sun Jul 07, 2013 10:46 am    Post subject: Reply with quote

Sorry für die Leichenschänderei,
aber ich wollte Dich mal fragen, ob Du das Setup nach einem Jahr immer noch fährst. Hat es sich bewährt?

Und hast Du Deine SSD vollverschlüsselt, oder einen Bereich wg. Wear-Leveling freigelassen?
_________________
- born to create drama -
gpg: 0x9B6C7E15
CS Virtual Travel Bug: VF6G5D
Back to top
View user's profile Send private message
root_tux_linux
l33t
l33t


Joined: 21 Dec 2003
Posts: 966

PostPosted: Wed Aug 07, 2013 12:31 am    Post subject: Reply with quote

cryptosteve wrote:
Sorry für die Leichenschänderei,
aber ich wollte Dich mal fragen, ob Du das Setup nach einem Jahr immer noch fährst. Hat es sich bewährt?

Und hast Du Deine SSD vollverschlüsselt, oder einen Bereich wg. Wear-Leveling freigelassen?


Ja, hab noch immer das selbe Setup
Ja, hat sich bewährt
Ja, Vollverschlüsselung bis auf /boot natürlich
_________________
Intel Core i7 6700K@4.6GHz, Gigabyte GTX 980 Ti G1, Gigabyte Gaming 7, Hyper X Fury 32GB, 2 TB Samsung EVO 840 Basic
ASUS ROG Swift PG348Q Display
ASUS ROG ASUS G771JW Notebook
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum