[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: How to mount a LUKS partiotion with Nautilus with option discard?



Joerg Desch:
>
> I'm using a separate LUKS encrypted partition on my SSD, which I only
> mount after login. Since there is now way to to this with crypttab/fstab,
> I have to use Nautilus to do this.

Hm? I don't understand why you say mounting manually is not possible
with crypttab/fstab. Just make the entries as usual and add the option
"noauto" in fstab. That way you are asked for the passphrase during
boot, though. The crypttab file supports the noauto option as well. Then
you have to run two commands for mounting the filesystem:

cryptdisks_start $mapped_device
mount $mount_point

> After clicking on the (unmounted) LUKS partition, the system asks for the 
> LUKS passphrase and than for the admin password. Now the partition is 
> mounted as expected. The only problem is the missing 'discard' option, so 
> I can't use fstrim with this partition.

You don't need the discard option for your filesystem to run fstrim. You only
need it in /etc/crypttab. How do you tell that you "can't use fstrim"?
Do you receive an error message when running fstrim?

> Does anyone knows some tricks how to add discard support?
> 
> This is the current output of mount:
> 
> /dev/mapper/udisks-luks-uuid-... on /media/PRIVAT_C type ext4 
> (rw,nosuid,nodev,relatime,user_xattr,barrier=1,data=ordered,uhelper=udisks)

As pointed out above, this only shows the filesystem option. The status
of your LUKS device can be queried like this:

# cryptsetup status home-decrypted
/dev/mapper/home-decrypted is active and is in use.
  type:    LUKS1
  cipher:  aes-xts-plain64
  keysize: 256 bits
  device:  /dev/mapper/kida-home--crypt--lv
  offset:  4096 sectors
  size:    88436736 sectors
  mode:    read/write
  flags:   discards

J.
-- 
People only fall in love because they cannot bear the though of being
alone.
[Agree]   [Disagree]
                 <http://www.slowlydownward.com/NODATA/data_enter2.html>

Attachment: signature.asc
Description: Digital signature


Reply to: