Ask Your Question

Expand my /home dierctory from unallocated disk space

asked 2015-07-30 07:29:03 -0500

Stef gravatar image

Hello firs,

I'm installed fedora 20 about an 3-4 hours maximum and i need some help with expanding the disk space of my /home directory. Before installing Fedora i had installed windows 7 and i need to keep the both OS cause of some university projects that require windows ometimes. I'v red this topics:

But i'm not sure how to assume compleatly the information cause there are mentioned new hard discs and creating and expanding new partition but this is not exactly what i need(i will explain why).

The hard drive i ha is about 700GB from whitch i'm usiing only 250 GB. Windows partiotioning tool shows about 500 GB unallocated space. The "lsblk" command shows this:

sda               8:0    0 698.7G  0 disk 
├─sda1            8:1    0   3.1G  0 part 
├─sda2            8:2    0  98.4G  0 part /
├─sda3            8:3    0  25.8G  0 part 
├─sda4            8:4    0     1K  0 part 
├─sda5            8:5    0  53.7G  0 part 
└─sda6            8:6    0  47.9G  0 part 
  └─fedora-home 253:0    0  47.9G  0 lvm  /home
sr0              11:0    1  1024M  0 rom

Sda2 is the root directory witch size is ok, but the sda6(my /home dir) is too small. I want to extend it to at least 200 GB for my needs(movies, music, docs, etc).

Any suggestations, ideas or propolsals are wellcomed. Thx alot in advance

edit retag flag offensive close merge delete


If you have free space you can add it to you home lvm partition this post looks like have a complete procedure but read more about lvm

aeperezt gravatar imageaeperezt ( 2015-07-30 10:35:30 -0500 )edit

Thx for the reply, i will give it a try if the BRPocock's answer don't work or i can't handle it. In this case i have some questions related to the topic and not related to it. In the post is showed the way to extend the / partition from the /home partition, since i want to do the opposite do i have to make reverse of the algorithm commands for the / partition and the /home partition.

Stef gravatar imageStef ( 2015-08-01 10:14:11 -0500 )edit

Another question unrelated to the topic is for this post - i mean sorry for the duplicate qustion, my touch pad is too sensitive and made duplication without me wanting to do that, so is it better to delete the topic or just to left it closed?

Stef gravatar imageStef ( 2015-08-01 10:14:58 -0500 )edit

3 Answers

Sort by » oldest newest most voted

answered 2015-07-30 10:57:31 -0500

BRPocock gravatar image

For safety's sake, you probably want to back up /home and everything before trying this, but … caveat emptor

The filesystem you mount on /home exists on the LVM Logical Volume home, which is in the Volume Group fedora which is on a Physical Volume sda6. You could have multiple LV's in a VG, and a VG can span multiple PV's. A FS doesn't necessarily have to fill its LV (although to not do so is just wasteful, to no gain). In this case, it seems like you want all four to line up.

Boot from a LiveCD (or USB) and open Gnome Disks to confirm the free space, et al. You could probably also do this by safely shutting down to single-user maintenance mode, el al, but running from Live is easier. From the Live boot, install (to the live image) the program gparted. (At least as of Fedora 22, it seems that the normal Disks program doesn't have support for resizing an LVM PV.) From Terminal: sudo dnf -y install gparted && sudo gparted

  • Note, the password for sudo on Fedora Live is empty — just tap Return.

In gparted, you should be able to resize the PV into the unallocated space. Right-click the partition, choose Resize/Move, and reduce “Free space following (MiB):” as much as you'd like.

In the past, when co-existing with Windows, it was wise to “align to Cylinders,” but I have heard that this is no longer necessary with GPT partition tables. You might wish to do so, to be on the safe side. (It just limits the increments by which you can adjust the size.)

Note that the action will be queued up, and you'll have to click the “go” button in the toolbar to apply the changes. Just expanding the PV/VG/LV/FS shouldn't take too terribly long, but naturally, make sure you have mains power and a charged battery/UPS, to be safe, because losing power then would hurt, badly. (Personally, I also turn off power saving in “Settings” and don't run anything else while that's happening, to avoid some random system hang/crash from ruining things, but that's somewhat paranoid.)

If you find that the unallocated space on your disc is not adjacent to the existing partition, you'll instead need to

  • create a new partition in the unallocated space as a PV
  • extend the VG onto that PV (vgextend)
  • resize the LV, and the filesystem on the LV, to take advantage of the newly-created space (lvresize -r)

If that's the case, the instructions are the same as for having a separate disc; the PV's in your case might be sda6 and sda7 rather than, say, sdb1 and sdc1, but the process is the same.

edit flag offensive delete link more


Great answer, thx i will give it a try, just one more little question pls - is the LiveCD u mentioned the same one from wich i installed Fedora(the bootable cd) or it is something else. End if it is how to get it. Thx I mean i'v found this - . Is this for what we are talking about ?

Stef gravatar imageStef ( 2015-07-30 12:19:16 -0500 )edit

Hey, i'v made Gnome LiveCD from the link of the above comment, when i boot from it i see 4 options : 1 OpenSuse-Factory-Gnome-next. 2 Installatio. 3 Boot from Hard Disk. 4 Memory test. ,

so what exactly did you meant when you said in the third part of your reply by "Boot from LiveCD(or USB) and open Gnome Live CD to confirm the free space" - This part i don't know what to do.

Stef gravatar imageStef ( 2015-08-08 12:36:35 -0500 )edit

thx i found sollution, thought your answer was pretty close, and good

Stef gravatar imageStef ( 2015-08-14 06:32:39 -0500 )edit

answered 2017-07-06 03:29:12 -0500

sandyg gravatar image

i had installed fedora25 in 4gb ram and 1Tb hard disc ,but it showing 50gb in home directory, now im getting warning that free up disc space plz help me. And how to open android studio usiing terminal,it presents in downloads Thank u

edit flag offensive delete link more

answered 2015-07-30 10:49:52 -0500

swilson gravatar image

Looks like fedora-home is a logical volume. You could

  • create another partition (fdisk, cfdisk, sfdisk, gparted, etc)
  • use to pvcreate to create another physical volume to add to the volume group
  • extend the volume group with vgextend
  • resize the logical volume with lvresize or lvextend
  • resize the filesystem with resize2fs


edit flag offensive delete link more


Thx for the reply, but when i try create another volume from the unallocated disk space with gparted, i recieve a message that i cant cause i already have the mamximum number of primary partitions.

Stef gravatar imageStef ( 2015-08-09 03:54:38 -0500 )edit

Question Tools


Asked: 2015-07-30 07:29:03 -0500

Seen: 5,681 times

Last updated: Jul 30 '15