How can I resize root and home partitions on a encrypted system to give root more space?
I have a Fedora 20 system. Which I installed allot of software on the last few months and I need to resize the / (root) partition to give it more space. The drive is encrypted with LUKS. Gparted doesn't support LUKS so I can't use that.
How can this be done?
Here is:
]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/dm-3 50G 46G 874M 99% /
devtmpfs 1.9G 0 1.9G 0% /dev
tmpfs 1.9G 3.0M 1.9G 1% /dev/shm
tmpfs 1.9G 944K 1.9G 1% /run
tmpfs 1.9G 0 1.9G 0% /sys/fs/cgroup
tmpfs 1.9G 59M 1.9G 4% /tmp
/dev/sda2 477M 131M 317M 30% /boot
/dev/sda1 200M 9.6M 191M 5% /boot/efi
/dev/mapper/fedora_hostname-home 405G 202G 183G 53% /home
Here is:
~]$ df -i
Filesystem Inodes IUsed IFree IUse% Mounted on
/dev/dm-3 3276800 1772040 1504760 55% /
devtmpfs 488149 468 487681 1% /dev
tmpfs 490792 7 490785 1% /dev/shm
tmpfs 490792 659 490133 1% /run
tmpfs 490792 13 490779 1% /sys/fs/cgroup
tmpfs 490792 55 490737 1% /tmp
/dev/sda2 128016 80 127936 1% /boot
/dev/sda1 0 0 0 - /boot/efi
/dev/mapper/fedora_hostname-home 26959872 182663 26777209 1% /home
Here is:
]$ sudo fdisk -l
Disk /dev/sda: 465.8 GiB, 500107862016 bytes, 976773168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: 7AE6E531-9898-4C7C-8C35-41B4FDB9374A
Device Start End Size Type
/dev/sda1 2048 411647 200M EFI System
/dev/sda2 411648 1435647 500M Microsoft basic data
/dev/sda3 1435648 976773119 465.1G Microsoft basic data
Disk /dev/mapper/luks-e69b0b4c-a8e0-425f-988d-8c635729503b: 465.1 GiB, 499370688512 bytes, 975333376 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk /dev/mapper/fedora_hostname-swap: 3.8 GiB, 4043309056 bytes, 7897088 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk /dev/mapper/fedora_hostname-root: 50 GiB, 53687091200 bytes, 104857600 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk /dev/mapper/luks-b7af1bce-82c4-4921-aac1-bce701e30256: 50 GiB, 53684994048 bytes, 104853504 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk /dev/mapper/fedora_hostname-home: 411.3 GiB, 441639239680 bytes, 862576640 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Here is:
~]$ sudo lvdisplay
--- Logical volume ---
LV Path /dev/fedora_hostname/swap
LV Name swap
VG Name fedora_hostname
LV UUID qQQRVR-toXX-J0M7-lTH5-d8Lr-AUq3-EHJ6A4
LV Write Access read/write
LV Creation host, time hostname.lan, 2014-03-24 15:51:10 +0000
LV Status available
# open 2
LV Size 3 ...
@randomuser , as the user updated and changed the question to something else, I have removed my answer all together :-)
Thanks @NikTh - it was a good answer, just not for this question :)