Hard Drive Upgrade - Partition Problem

The place to post if you need help or advice

Moderators: ChrisThornett, LXF moderators

Hard Drive Upgrade - Partition Problem

Postby prenticemarie » Sat Mar 03, 2012 5:58 pm

I have recently upgraded my Ubuntu 9.04 Dell Inspiron 510m Laptop hard drive from 40GB to 250GB.
I cloned the original 40GB (/dev/sda1 and Linux-swap /dev/sda5) drive to the 250 GB drive using CloneZilla, and on installation the new drive booted and ran Ubuntu 9.04 perfectly.

I was expecting CloneZilla to expand the partition sizes to utilize the increased capacity. Unfortunately the new drive partitions are exactly the same size at 40GB, with an unallocated area of 201GB.

I then booted GParted from a live CD expecting to be able to Resize/Move (increase) the partition sizes, but GParted will only allow me to reduce the sizes, as no expandable area is available on the display.

How can the partitons be incresed in size please ?
prenticemarie
 
Posts: 10
Joined: Tue Jul 27, 2010 11:13 am

Postby ajgreeny » Sat Mar 03, 2012 6:32 pm

What output do you get from
Code: Select all
sudo fdisk -l
which ought to show the full disk size.
Xubuntu 12.04 user, and loving it!
ajgreeny
LXF regular
 
Posts: 462
Joined: Wed May 10, 2006 8:18 pm
Location: Oxfordshire.

Postby prenticemarie » Sat Mar 03, 2012 6:45 pm

The output from fdisk below ..... please note that I partitioned spare space (201GB) /dev/sda3 so that I could use it as additional storage space only.
_____________________________________________________

Disk /dev/sda: 250.0 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x41ab2316

Device Boot Start End Blocks Id System
/dev/sda1 * 1 4659 37423386 83 Linux
/dev/sda2 4660 4864 1646662+ 5 Extended
/dev/sda3 4865 30402 205127680 83 Linux
/dev/sda5 4660 4864 1646631 82 Linux swap / Solaris
prenticemarie
 
Posts: 10
Joined: Tue Jul 27, 2010 11:13 am

Postby prenticemarie » Sat Mar 03, 2012 6:48 pm

To clarify .... GParted Live CD showed the full 250GB, with 201GB as unallocated, so there is no conflict with the overall size of the new drive.
prenticemarie
 
Posts: 10
Joined: Tue Jul 27, 2010 11:13 am

Postby ajgreeny » Sat Mar 03, 2012 7:08 pm

Is the unallocated(?) sda3 space within the extended partition sda2? If so you will need to turn off your swap even when running the live CD to be able to do anything with all the space within that extended partition area of disk.

I am also wondering if sda3 is the "space" that you are trying to expand the ubuntu partition into, because if that is the case, you will need to delete or shrink that ext partition and make space unallocated, as you can not expand a partition into already formatted space.

Can you get a screenshot of gparted and upload it somewhere with a link so we can see that, and also show the output from
Code: Select all
df -hT
which will give more easily readable info about the partition sizes.
Xubuntu 12.04 user, and loving it!
ajgreeny
LXF regular
 
Posts: 462
Joined: Wed May 10, 2006 8:18 pm
Location: Oxfordshire.

Postby Dutch_Master » Sat Mar 03, 2012 7:22 pm

Cloning a 40 GB disk onto a 250 GB one won't 'automagically' extend partitions... The key is in the word: clone. It makes an exact identical replica of whatever you clone, nothing more...

The only thing you'd need to do, is to assign the unused space to a partition and mount this somewhere in the tree.
Dutch_Master
LXF regular
 
Posts: 2471
Joined: Tue Mar 27, 2007 1:49 am

Postby prenticemarie » Sat Mar 03, 2012 7:46 pm

Data as follows .... Filesystem Type Size Used Avail Use% Mounted on
/dev/sda1 ext3 36G 17G 18G 49% /
tmpfs tmpfs 1007M 0 1007M 0% /lib/init/rw
varrun tmpfs 1007M 312K 1006M 1% /var/run
varlock tmpfs 1007M 0 1007M 0% /var/lock
udev tmpfs 1007M 160K 1007M 1% /dev
tmpfs tmpfs 1007M 92K 1007M 1% /dev/shm
lrm tmpfs 1007M 2.2M 1005M 1% /lib/modules/2.6.28-19-generic/volatile
/dev/sdb1 vfat 15G 14M 15G 1% /media/disk

VIEW THE GPARTED SCREENSHOT AT ...


http://www.anne-mcdougall-art.com/index.php?Screenshot:EMPTY_HEADING_1
prenticemarie
 
Posts: 10
Joined: Tue Jul 27, 2010 11:13 am

Postby ajgreeny » Sat Mar 03, 2012 9:12 pm

OK, the df command did not show what I hoped as the partition sda3 was not mounted at the time, but it doesn't matter as the gparted screenshot shows the problem.

Your swap is sda5, a logical partition within the extended partition sda2, and all the 201GB space is in a new primary partition at the end of the disk, not adjacent to the ubuntu os partition sda1. You can not therefore add the space of sda3, even if you deleted it to anything else.

You could delete the swap and its extended partition (sda5 and sda2) and also delete sda3 and add most of the space to sda1, then make a new swap partition, but why bother? It will be easiest to leave things exactly as they are and just automount sda3 at boot by editing /etc/fstab. sda3 can then continue as a storage/data partition.

Let's see the output of
Code: Select all
sudo blkid
and then we can offer you an edit of /etc/fstab to do the automiount.
Xubuntu 12.04 user, and loving it!
ajgreeny
LXF regular
 
Posts: 462
Joined: Wed May 10, 2006 8:18 pm
Location: Oxfordshire.

Postby prenticemarie » Sun Mar 04, 2012 10:05 am

Thanks ajgreeny ... The output from "blkid" is ....


/dev/sda1: UUID="84d4890c-df84-4b2a-bb43-e4632c1b08c9" TYPE="ext3" SEC_TYPE="ext2"
/dev/sda5: TYPE="swap" UUID="ca1f6b4d-2e47-4723-a92f-74e389db4bd9"
/dev/sda3: UUID="9ad3b5db-bf24-4140-863b-c96398c33511" TYPE="ext2"
prenticemarie
 
Posts: 10
Joined: Tue Jul 27, 2010 11:13 am

Postby prenticemarie » Sun Mar 04, 2012 11:03 am

Hi ajgreeny .... problem solved !

I followed your advice in the last paragraph of your previous reply, and deleted both the Extended and Linux-swap partitions, (sda2/sda5), which then enabled me to extend my 40GB sda1 partition.

Many thanks again for your swift response help.

prenticemarie.
prenticemarie
 
Posts: 10
Joined: Tue Jul 27, 2010 11:13 am

Postby nelz » Sun Mar 04, 2012 11:09 am

Boot from a live CD, delete the swap partition and sda3, in fact everything but sda1. Use GParted to create the partition layout you want, extending sda1 and creating anything else you want, including a new swap. When you reboot it will probably complain about not being able to mount swap, edit /etc/fstab to point it to your new swap partition.

It is possible to do this while booted into your installed system, with no reboots at all, but it is simpler to use a live CD.
"Insanity: doing the same thing over and over again and expecting different results." (Albert Einstein)
User avatar
nelz
Site admin
 
Posts: 8579
Joined: Mon Apr 04, 2005 11:52 am
Location: Warrington, UK

Looking for days

Postby thomsonbtyler » Wed Jun 06, 2012 11:54 am

You could delete the swap and its extended partition (sda5 and sda2) and also delete sda3 and add most of the space to sda1,

This is the one thing I've been searching for, days on the net trying to figure out why ubuntu hasn't realized that the drive was larger. I had added the extra space to the extended partition but ubuntu still kept thinking it was maxed out. Wow all i needed to do was delete both the extended and swap to add to the primary or boot partition. Learning every day. Thanks for the awesome info.
“It is a simple feat of scientific electrical engineering — only expensive — blind, faint-hearted, doubting world.” Nikola Tesla
thomsonbtyler
 
Posts: 1
Joined: Wed Jun 06, 2012 11:45 am
Location: florida


Return to Help!

Who is online

Users browsing this forum: No registered users and 1 guest