How to increase size of /home ?

Asked by achevrier

Hi everybody

I need more disk space for my /home directory (personal directory).

How could I do ? Is it link to partitions ?

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
achevrier
Solved:
Last query:
Last reply:
Revision history for this message
Patrick A. Treptau (mono6) said :
#1

You can boot with a GParted LiveCD and then resize the partition(s) to suit your needs.

http://gparted.sourceforge.net/livecd.php

Good luck!

Revision history for this message
achevrier (a-chevrier-pro) said :
#2

Yep ! Thank's a lot.
However, how could I detect, using Gparted, on which partition my /home directory is ?

I've got screenshot problems using Gparted live CD, but I hope I would find solution elsewhere.
I'm using Gparted delivered on Ubuntu live CD which works well.

Maybe should I open a Gparted specific question in spite of this one ?

Revision history for this message
quantenemitter (quantenemitter) said :
#3

No, I don't think you should do that.

If you don't have an own partition for /home (look for "mountpoint"), then the partition for your homedir is the same as that of "/".

There are two methods: You could resize the partition to suit your needs with gparted, if possible, or you could use a new partition / harddisk for your homedir.
If you'd like to use a new partition / harddisk, mount the new partition anywhere (like /mnt), copy all contents of home (not the dir itself) to that dir (don't forget the "hidden" files starting with a dot), then unmount the new partition.
Afterwards, log out of X, go into a console window (like STRG+ALT+F1), move /home to /home_backup and mount the new partition to /home . If this worked, you can automount our new partition via fstab and switch back to X (ALT+F7).

Good luck!

Revision history for this message
achevrier (a-chevrier-pro) said :
#4

OK,
Thank's a lot for this spotlight ! ;)
On my disk I have 1 extended partition (including 4 partitions) and 2 partitions. You could see details below.
Do you know if it is possible to create a new partition as explain below? Would system disk accept a new one ? Isn't there to many partitions logical or non logical yet ?

Way I would like to try :
1/ decrease size of partition hda3 including "/".
2/ create a partition ext3 after hda3 for "/home".
3/ delete hda6

My partition disk is :
   partition syst size
- free 0,74 Go
- /dev/hda1 extended 10,10 Go
      /dev/hda5 ntfs 1,96 Go
      free 2,82 Go
      /dev/hda6 ext3 3,91 Go
      /dev/hda7 linux swap 0,10 Go
      /dev/hda8 fat32 1,31 Go
- /dev/hda3 ext3 11,77 Go
- free 2,38 Go
- /dev/hda2 ntfs 12,01 Go
- free 3,00 Go

Here is my /etc/fstab :
# /etc/fstab: static file system information.
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc defaults 0 0
/dev/hda3 / ext3 defaults,errors=remount-ro 0 1
/dev/hda6 /home ext3 defaults 0 2
/dev/hda2 /media/hda2 ntfs defaults,nls=utf8,umask=007,gid=46 0 1
/dev/hda5 /media/hda5 ntfs defaults,nls=utf8,umask=007,gid=46 0 1
/dev/hda7 none swap sw 0 0
/dev/hdc /media/cdrom0 udf,iso9660 user,noauto 0 0
/dev/fd0 /media/floppy0 auto rw,user,noauto 0 0
/dev/hda8 /media/windows vfat defaults,umask=000 0 0

Revision history for this message
quantenemitter (quantenemitter) said :
#5

WTF! Your partition table i pretty spicked with holes. Why do you create that lot of small partitions?

If I see it right, you have /dev/hda4 free. No need for deleting a partition.
Why do you have an own partition for /home? Your plan seems to be to make "/" smaller to resize "/home". I assume it will work, but if you plan to do this more than once, I'd rather resize /dev/hda3 to include the free space beind it and stop to use an own partition for /home (/home would be in /dev/hda3 then).
DONT FORGET TO BACKUP YOUR DATA BEFORE RESIZING, just in case. My brother shredded some importantt data just a few days ago.

IMHO The best thing you could do is lend an extern harddisk from a friend / by one, copy your entire harddisk to it and delete all your partitions afterwards. Then, create three partitions:

/dev/hda1 as vfat for windows
/dev/hda2 as ext3 for linux
/dev/hda3 as swap for linux-swap

If you do this intelligent, no free space on your disk will be left and you don't lose some GB, as you do at the moment.

Another idea is to use LVM (Logical volume management), where, afaik, you can virtally mend a small number of partitions to one. (i.e. you have /dev/hda1, /dev/hda2 and /dev/hda3 and "/" or "/home" is spread above all the three partitions) But that's another topic and I don't know how to do it and how windows behaves in this case.

Revision history for this message
achevrier (a-chevrier-pro) said :
#6

OK,
I understand.
So, it's time for luck I imagine .... :)

I'm going to read and lurn more before jumping ...

Revision history for this message
toddq (toddq) said :
#7

gparted can only decrease the size of an existing partition. It cannot increase the size of an existing partition.

Revision history for this message
aftermath (aftermath58) said :
#8

I am not sure on this but I think that can only select how much space
you can put in the time you install ubuntu, so I would think that you
cannot add more space unless you re-installed Ubuntu on your computer.
There might be other ways, but they aren't known to me.

On Wed, Mar 17, 2010 at 4:00 PM, toddq
<email address hidden> wrote:
> Question #12361 on Ubuntu changed:
> https://answers.launchpad.net/ubuntu/+question/12361
>
> toddq posted a new comment:
> gparted can only decrease the size of an existing partition.  It cannot
> increase the size of an existing partition.
>
> --
> You received this question notification because you are an answer
> contact for Ubuntu.
>

--
Regards,
Sonny Dhillon