I recently invested in a SSD for my laptop, I bought the Samsung 500Gb 860 Evo, which I choose specifically because the sales blurb talks about improved Linux compatibility with regard to TRIM.

I decided to start with a fresh install of Ubuntu 17.10, rather than to try and migrate my existing set up. I went with the full disc encryption.

Everything seems to be working fine and fast but I see there are a few additional recommended steps for SSD optimization. I have added noatime and noadirtime to my /boot reference in /etc/fstab. I understand that I don't have to do anything with TRIM, because it should already be enabled for this drive. And that leaves removing my swap partition. Which I'd be happy to do (I've got plenty of RAM), except I think that the drive encryption has confused matters...

Here is how my drives are laid out. This is the setup that the Ubuntu installation process automatically created for me.


So as well as a 17GB swap partition, I also have a 17GB cryptswap partition. Should I remove both? Would that break my encryption? Are there any other issues I need to consider? I'm not too far into the process of setting up my machine, so I would consider another fresh install with different settings if that is advisable.

Thanks in advance.

  • 1
    nodiratime is not needed if you already added noatime – SurvivalMachine Feb 18 '18 at 9:55

Not really an answer, but an explanation.

As mentioned in the question, when I did the Ubuntu install I opted for Full Disk Encryption, what I hadn't noticed is that this automatically created a Logical Volume Management (LVM) file system. Since Ubuntu 17.04, the Ubuntu installation process has favoured swap files, by default, rather than swap partitions, unless you select LVM.

So that explains why the installation automatically created a swap partition. I'm not knowledgeable enough to say why it also created a cryptswap partition, but I'm sure it made sense in the LVM world.

Rather than remove the partitions I decided just to start afresh again with a fresh install. This time I choose not to have full disk encryption (or LVM) so no swap partition was created. I did select the encrypted home drive option, and I expect that's secure enough.

I'll not mark this answer as correct; in case someone does provide an actual answer as to whether or not simply removing the two swap partitions would have been safe and easy.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.