Deleting a luks partition

General support questions
Post Reply
jscarville
Posts: 135
Joined: 2014/06/17 21:50:37

Deleting a luks partition

Post by jscarville » 2017/06/25 00:46:00

On one of my workstations I have an small encrypted partition than I no longer need. It was encrypted using luks so can I just do an lvdelete or is there something else I need to do first? It is backed up so I do not need to decrypt it; just return the space to the volume group.

User avatar
TrevorH
Site Admin
Posts: 33216
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Deleting a luks partition

Post by TrevorH » 2017/06/25 14:37:27

Assuming it is the LV itself that is encrypted - i.e. to unlock it you do cryptsetup luksOpen /dev/vgname/lvname mappername then you just need to make sure that it is closed with cryptsetup luksClose then lvremove the LV. That will return the LV to the free space in the LV. Depending on how sensitive the contents are, you might want to overwrite the contents first perhaps, maybe using dd.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

Post Reply