Author Topic: How to increase partition size [Solved]  (Read 2217 times)

Offline Ditzian

  • Sr. Member
  • ****
  • Posts: 451
How to increase partition size [Solved]
« on: July 23, 2012, 07:11:00 AM »
I just solved a problem with using a USB drive by discovering that my /home partition had filled up, which interfered with the USB drive.  Right now I am running under Gparted, and I would like to increase the size of the /home partition.  However, Gparted does not seem to want to do this.  I think that it is due to the location of the space that I have, but I do not know what to do about it.  Here is what I have:

/dev/sda1  linux-swap          3.9 GiB
/dev/sda2  extended       927.61 GiB
/dev/sda5  ext4                  58.59 GiB
/dev/sda6  ext2                118.30 GiB
/dev/sda7  ext4                298.72 GiB
/dev/sda8  ext4                   12.01 GiB
/dev/sda9  linux-swap           3.90 GiB
/dev/sda10 ext4                292.97 GiB
unallocated unallocated   143.13 GiB
unallocated unallocated        2.49 GiB

I want to increase the size of /dev/sda6  which I remember to be /home.

/sda10 and the unallocated space is unused.  I just split things up to get the 143.13 GiB,a nd this is where I would like to add the space to /dev/sda6.  I do not know the next step, but when I select /dev/sda6 and then select move/resize, Gparted does not show a way to increase the space.  I want to add at least 100 GiB, and possibly all the 143.13 from the big unallocated partition.

I am currently posting this from the browser in Gparted, which is running from its own Live CD.  I can follow directions if someone can give me step-by-step guidance from this point.

Thank you,
Jan
« Last Edit: July 26, 2012, 08:15:07 AM by Ditzian »

Offline Ditzian

  • Sr. Member
  • ****
  • Posts: 451
Re: How to increase partition size
« Reply #1 on: July 23, 2012, 07:33:44 AM »
Would it be more reasonable to simply create a new partition of the required size and go back to PCLinuxOS, copy the data into the new patition, rename the old /home partition and then rename the new partition?  /home is pretty important, and I am the user under it.

Jan

Offline Just17

  • PCLinuxOS Tester
  • Super Villain
  • *******
  • Posts: 10613
  • MLUs Forever!
Re: How to increase partition size
« Reply #2 on: July 23, 2012, 07:43:56 AM »
Dizian, to increase a partition's size the free space has to be connected to that partition. In your case that does not seem to be the case.

My suggestion is that you delete all unused partitions at the end of the drive ---  do NOT delete any partitions that have another one following them.

You can then create a partition in the new free space, of whatever size you think appropriate and format it to your shosen format ....  maybe ext4.

Next you would use rsync to copy everything from the present /home to the new partition.
Edit the fstab file to point to the new /home.

You should then be able to boot with the new setup.

When satisfied you can delete the contents of the old home and use the partition as you wish ....  maybe for backups of some of your /home directories.

****

An alternative solution could be this ......

create a suitable partition
copy various directories from the present /home to the new partition.
create a link in the old /home pointing to the new location for the specific directories

In that way the files will be stored on the new partition, but the present /home will be what the OS uses.

****

There are probably other suggestions that might suit you also.

So maybe wait for other suggestions before deciding?

Please post back the output from the following command


fdisk -l        {that is a lower case L}

« Last Edit: July 23, 2012, 07:50:31 AM by Just18 »
MLUs rule the roost!

Linux XPS 3.2.18-pclos2.pae.bfs  32 bit
Intel Core2 Quad CPU Q9450 @ 2.66GHz
4 GB RAM
MCP51 High Def Audio
GeForce GTX 550 Ti
PHILIPS  ‎DVD+-RW DVD8701
‎Logitech ‎BT Mini-Receiver
Afatech DTT

Offline Ditzian

  • Sr. Member
  • ****
  • Posts: 451
Re: How to increase partition size
« Reply #3 on: July 23, 2012, 07:56:43 AM »
I am running from the Gparted LiveCD.

Code: [Select]
user@debian:~$ fdisk -l

Disk /dev/sdb: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders, total 976773168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x44fdfe06

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1              63   976768064   488384001    c  W95 FAT32 (LBA)
user@debian:~$
Jan

Offline Ditzian

  • Sr. Member
  • ****
  • Posts: 451
Re: How to increase partition size
« Reply #4 on: July 23, 2012, 08:00:00 AM »
Just18,

Do I use rsync from PCLinuxOS?  I am still in Gparted.  I created a new partition.  It is ext4, and it is 244.14GB.

Jan

Offline Just17

  • PCLinuxOS Tester
  • Super Villain
  • *******
  • Posts: 10613
  • MLUs Forever!
Re: How to increase partition size
« Reply #5 on: July 23, 2012, 08:15:20 AM »
I am running from the Gparted LiveCD.

Code: [Select]
user@debian:~$ fdisk -l

Disk /dev/sdb: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders, total 976773168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x44fdfe06

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1              63   976768064   488384001    c  W95 FAT32 (LBA)
user@debian:~$
Jan

What disk is that?

It is not the disk with the operating system on it according to your previous post.

MLUs rule the roost!

Linux XPS 3.2.18-pclos2.pae.bfs  32 bit
Intel Core2 Quad CPU Q9450 @ 2.66GHz
4 GB RAM
MCP51 High Def Audio
GeForce GTX 550 Ti
PHILIPS  ‎DVD+-RW DVD8701
‎Logitech ‎BT Mini-Receiver
Afatech DTT

Offline Just17

  • PCLinuxOS Tester
  • Super Villain
  • *******
  • Posts: 10613
  • MLUs Forever!
Re: How to increase partition size
« Reply #6 on: July 23, 2012, 08:16:11 AM »
Just18,

Do I use rsync from PCLinuxOS?  I am still in Gparted.  I created a new partition.  It is ext4, and it is 244.14GB.

Jan

First you need to give information about the partitions ......  and now apparently about the extra disk you have added ......
MLUs rule the roost!

Linux XPS 3.2.18-pclos2.pae.bfs  32 bit
Intel Core2 Quad CPU Q9450 @ 2.66GHz
4 GB RAM
MCP51 High Def Audio
GeForce GTX 550 Ti
PHILIPS  ‎DVD+-RW DVD8701
‎Logitech ‎BT Mini-Receiver
Afatech DTT

Offline Ditzian

  • Sr. Member
  • ****
  • Posts: 451
Re: How to increase partition size
« Reply #7 on: July 23, 2012, 08:41:02 AM »
I have not added an extra disk.  I am operating from a LiveCD o Gparted, which, apparently, is debian.  I have the original sda, plus the usb sdb, and those are the only hard disks.  The report from fdisk is from a terminal available from Gparted on the Live CD.

Jan

Offline Just17

  • PCLinuxOS Tester
  • Super Villain
  • *******
  • Posts: 10613
  • MLUs Forever!
Re: How to increase partition size
« Reply #8 on: July 23, 2012, 09:18:07 AM »
Quote
   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1              63   976768064   488384001    c  W95 FAT32 (LBA)

That shows a HDD of 500GB with ONLY one partition on it, formatted to FAT32

Previously you said your HDD had

Code: [Select]
/dev/sda1  linux-swap          3.9 GiB
/dev/sda2  extended       927.61 GiB
/dev/sda5  ext4                  58.59 GiB
/dev/sda6  ext2                118.30 GiB
/dev/sda7  ext4                298.72 GiB
/dev/sda8  ext4                   12.01 GiB
/dev/sda9  linux-swap           3.90 GiB
/dev/sda10 ext4                292.97 GiB
unallocated unallocated   143.13 GiB
unallocated unallocated        2.49 GiB

There is an obvious discrepancy.

Sorry I don't know what you are looking at now.

Hopefully you did not wipe everything on the main HDD .......

MLUs rule the roost!

Linux XPS 3.2.18-pclos2.pae.bfs  32 bit
Intel Core2 Quad CPU Q9450 @ 2.66GHz
4 GB RAM
MCP51 High Def Audio
GeForce GTX 550 Ti
PHILIPS  ‎DVD+-RW DVD8701
‎Logitech ‎BT Mini-Receiver
Afatech DTT

Offline Ditzian

  • Sr. Member
  • ****
  • Posts: 451
Re: How to increase partition size
« Reply #9 on: July 23, 2012, 09:58:42 AM »
Just18,

I have returned to PCLinuxOS from the Gparted Boot Disk.  Now, here is the result of fdisk -l run as superuser:

Code: [Select]
[root@localhost jan]# fdisk -l

Disk /dev/sda: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders, total 1953525168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x345d345c

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *          63     8177084     4088511   82  Linux swap / Solaris
/dev/sda2         8177085  1953520064   972671490    5  Extended
/dev/sda5         8177148   131042204    61432528+  83  Linux
/dev/sda6       131042268   379133999   124045866   83  Linux
/dev/sda7       379134063  1005588674   313227306   83  Linux
/dev/sda8      1005588738  1030778594    12594928+  83  Linux
/dev/sda9      1030778658  1038955679     4088511   82  Linux swap / Solaris
/dev/sda10     1038958592  1550958591   256000000   83  Linux

Disk /dev/sdb: 500.1 GB, 500107862016 bytes[
255 heads, 63 sectors/track, 60801 cylinders, total 976773168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x44fdfe06

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1              63   976768064   488384001    c  W95 FAT32 (LBA)
[root@localhost jan]

/home is now sda6 and there is a partition, sda10, that is ext4, 244 GiB, according to PCC.  sda10 is the partition that I would now like to make /home, and I would like to make the old /home something else.  PCC reports that I have only three named partitions now, / (58 GiB), /home (118 GIB), and /data (298 GiB).  I have a tiny sda8, sda9 (Linux swap 3.8 Gib), sda10 (reported above), and empty (191 GiB).

Jan


Jan

Offline Just17

  • PCLinuxOS Tester
  • Super Villain
  • *******
  • Posts: 10613
  • MLUs Forever!
Re: How to increase partition size
« Reply #10 on: July 23, 2012, 10:10:04 AM »
Just18,

I have returned to PCLinuxOS from the Gparted Boot Disk.  Now, here is the result of fdisk -l run as superuser:

Code: [Select]
[root@localhost jan]# fdisk -l

Disk /dev/sda: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders, total 1953525168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x345d345c

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *          63     8177084     4088511   82  Linux swap / Solaris
/dev/sda2         8177085  1953520064   972671490    5  Extended
/dev/sda5         8177148   131042204    61432528+  83  Linux
/dev/sda6       131042268   379133999   124045866   83  Linux
/dev/sda7       379134063  1005588674   313227306   83  Linux
/dev/sda8      1005588738  1030778594    12594928+  83  Linux
/dev/sda9      1030778658  1038955679     4088511   82  Linux swap / Solaris
/dev/sda10     1038958592  1550958591   256000000   83  Linux

Disk /dev/sdb: 500.1 GB, 500107862016 bytes[
255 heads, 63 sectors/track, 60801 cylinders, total 976773168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x44fdfe06

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1              63   976768064   488384001    c  W95 FAT32 (LBA)
[root@localhost jan]

/home is now sda6 and there is a partition, sda10, that is ext4, 244 GiB, according to PCC.  sda10 is the partition that I would now like to make /home, and I would like to make the old /home something else.  PCC reports that I have only three named partitions now, / (58 GiB), /home (118 GIB), and /data (298 GiB).  I have a tiny sda8, sda9 (Linux swap 3.8 Gib), sda10 (reported above), and empty (191 GiB).

Jan


Jan

Wheeeee ......  I am glad things seem to be as they were  :D

Quote
PCC reports that I have only three named partitions now

I am unsure what you mean by this, as immediately above you give a list of partitions that fdisk reports.
What in PCC are you referring to?
All existing partitions should be enumerated in PCC- Local Disks - Manage disk partitions.

I am very very hesitant to give any instructions when there is a doubt about the partitions.

Please check again ......  the partition reports from both fdisk and PCC should be the same.

Please confirm the status.  Thanks.

MLUs rule the roost!

Linux XPS 3.2.18-pclos2.pae.bfs  32 bit
Intel Core2 Quad CPU Q9450 @ 2.66GHz
4 GB RAM
MCP51 High Def Audio
GeForce GTX 550 Ti
PHILIPS  ‎DVD+-RW DVD8701
‎Logitech ‎BT Mini-Receiver
Afatech DTT

Offline Just17

  • PCLinuxOS Tester
  • Super Villain
  • *******
  • Posts: 10613
  • MLUs Forever!
Re: How to increase partition size
« Reply #11 on: July 23, 2012, 10:14:57 AM »
On the basis that the partition situation is OK, and sda10 and the other partitions are there as fdisk reports, I think there is no need for me to repeat what is nicely laid out in this post by Old-Polack ....

http://www.pclinuxos.com/forum/index.php/topic,91415.msg767236.html

EDIT: Please note these instructions say that you should use a LiveCD to do the work.

I suggest you copy and paste the instructions, and substitute your own partition numbers for those used in that post, and then follow the instructions AFTER you understand the procedure.
{ a quick look would indicate that where sda9 is used you will use sda6; and where sda7 is used you will use sda10 ....  but you need to confirm this for yourself}

If you have any questions about the contents of the post please ask before attempting to apply the instructions.

It is better to be sure ......  ;)

« Last Edit: July 23, 2012, 10:19:54 AM by Just18 »
MLUs rule the roost!

Linux XPS 3.2.18-pclos2.pae.bfs  32 bit
Intel Core2 Quad CPU Q9450 @ 2.66GHz
4 GB RAM
MCP51 High Def Audio
GeForce GTX 550 Ti
PHILIPS  ‎DVD+-RW DVD8701
‎Logitech ‎BT Mini-Receiver
Afatech DTT

Offline Bald Brick

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 6372
  • I'm going South
Re: How to increase partition size
« Reply #12 on: July 23, 2012, 10:22:14 AM »
Just18,

I have returned to PCLinuxOS from the Gparted Boot Disk.  Now, here is the result of fdisk -l run as superuser:

Code: [Select]
[root@localhost jan]# fdisk -l

Disk /dev/sda: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders, total 1953525168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x345d345c

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *          63     8177084     4088511   82  Linux swap / Solaris
/dev/sda2         8177085  1953520064   972671490    5  Extended
/dev/sda5         8177148   131042204    61432528+  83  Linux
/dev/sda6       131042268   379133999   124045866   83  Linux
/dev/sda7       379134063  1005588674   313227306   83  Linux
/dev/sda8      1005588738  1030778594    12594928+  83  Linux
/dev/sda9      1030778658  1038955679     4088511   82  Linux swap / Solaris
/dev/sda10     1038958592  1550958591   256000000   83  Linux

Disk /dev/sdb: 500.1 GB, 500107862016 bytes[
255 heads, 63 sectors/track, 60801 cylinders, total 976773168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x44fdfe06

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1              63   976768064   488384001    c  W95 FAT32 (LBA)
[root@localhost jan]

/home is now sda6 and there is a partition, sda10, that is ext4, 244 GiB, according to PCC.  sda10 is the partition that I would now like to make /home, and I would like to make the old /home something else.  PCC reports that I have only three named partitions now, / (58 GiB), /home (118 GIB), and /data (298 GiB).  I have a tiny sda8, sda9 (Linux swap 3.8 Gib), sda10 (reported above), and empty (191 GiB).

Jan


Jan

Wheeeee ......  I am glad things seem to be as they were  :D

Quote
PCC reports that I have only three named partitions now

I am unsure what you mean by this, as immediately above you give a list of partitions that fdisk reports.
What in PCC are you referring to?

Sorry to butt in but it's very obvious that PCC shows mountpoints for just three of his partitions: /, /home and /data. That isn't "three named partitions", but we aren't nitpickers, are we?  ;D

Quote
All existing partitions should be enumerated in PCC- Local Disks - Manage disk partitions.

I am very very hesitant to give any instructions when there is a doubt about the partitions.

Please check again ......  the partition reports from both fdisk and PCC should be the same.

Please confirm the status.  Thanks.


« Last Edit: July 23, 2012, 10:25:53 AM by Bald Brick »
Feed the trolls!
They need it!

AMD Athlon 7450 Dual-Core Processor, 7.80 GiB RAM, Nvidia GeForce GT 120/PCIe/SSE2, OpenGL/ES-version: 3.3 0 NVIDIA 295.40, SBx00 Azalia (Intel HDA) soundcard, ‎Logitech B500 webcam, SAA7146 DVB card, HDDs: Seagate 250824AS, Western Digital WD10EAVS-00D

Offline Ditzian

  • Sr. Member
  • ****
  • Posts: 451
Re: How to increase partition size
« Reply #13 on: July 23, 2012, 10:27:54 AM »
Just18,

I have a screen shot of PCC disk manager, but I do not know how to show it here.  Apparently it has to be a url on the internet.

Jan

Offline Just17

  • PCLinuxOS Tester
  • Super Villain
  • *******
  • Posts: 10613
  • MLUs Forever!
Re: How to increase partition size
« Reply #14 on: July 23, 2012, 10:30:10 AM »
Quote
Sorry to butt in but it's very obvious that PCC shows mountpoints for just three of his partitions: /, /home and /data. That isn't "three named partitions", but we aren't nitpickers, are we?

What in PCC shows only mounted partitions?

.....  and yes, if giving instructions which could wipe or overwrite a part of the OS 'nit-picking' is required  :D

I don't want to hear cries of ....  "you ruined my install" because I made an assumption that was not correct  ;)

MLUs rule the roost!

Linux XPS 3.2.18-pclos2.pae.bfs  32 bit
Intel Core2 Quad CPU Q9450 @ 2.66GHz
4 GB RAM
MCP51 High Def Audio
GeForce GTX 550 Ti
PHILIPS  ‎DVD+-RW DVD8701
‎Logitech ‎BT Mini-Receiver
Afatech DTT