Showing posts with label resize. Show all posts
Showing posts with label resize. Show all posts

Sunday, 17 January 2016

Resize encrypted lvm partitions in Fedora23

In this article I will describe how to shrink one Logical Volume and extend another one in the same volume group.

My setup

During Fedora23 installation I let the installer to partition my disk automatically. I also checked that I want to encrypt my data.
The installer created Logical Volumes: 50GB root partition, 60GB home and 8GB swap.

After some time of using the system I found out that there is only 15GB left in /home and that there is 40GB of free space in / (root). I've decided that I will extend home and shrink root.

Preparation for the action

I spent some time reading about lvm and also LUKS disk encryption in fedora, and then I found this great page about resizing of lvm encrypted partitions - exactly what I needed, even little bit more.

I will try to describe exactly how it went in my case, so this article should be little bit shorter then the one I linked.

Initialization

When you want to shrink a partition you have to do it in unmounted state. For the root partition it means to boot from a live CD. I used Fedora23 CD for that.

Everybody warns you that you should backup your data before doing this, because you can easily loose them if something goes wrong. As I have all my important data in clouds (Dropbox, Google drive) I just restarted my laptop and booted Fedora live.