7

Fdisk can't see extra space

I upgraded my trusty 74gb Raptor hard drive to a 600gb Velociraptor behemoth.

I used "dd" to clone the drive, (i.e. "dd if=old-drive-device of="new-drive-device), swapped the hard drives, booted, etc. Everything works great.

With one exception: fdisk won't let me add partitions. So I can't use the extra 500+ Gb of disk.

Fdisk sees the correct size. Total sectors is 10x the last sector of my last partition.

Here's the fdisk output:

Note total sectors is: 1172123568 (10 digits) Last sector is:145211533 (9 digits)

    Disk /dev/sda: 600.1 GB, 600127266816 bytes
    255 heads, 63 sectors/track, 72961 cylinders, total **1172123568** 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: 0x55af2dbb

       Device Boot      Start         End      Blocks   Id  System
    /dev/sda1   *          63       80324       40131   83  Linux
    /dev/sda2           80325     4096574     2008125   82  Linux swap / Solaris
    /dev/sda3         4096575     5092604      498015   83  Linux
    /dev/sda4         5092605   145211534    70059465    5  Extended
    /dev/sda5         5092668     7100729     1004031   83  Linux
    /dev/sda6         7100793    27117719    10008463+  83  Linux
    /dev/sda7        27117783    47134709    10008463+  83  Linux
    /dev/sda8        47134773    87152624    20008926   83  Linux
    /dev/sda9        87152688   127170539    20008926   83  Linux
    /dev/sda10      127170603   133178849     3004123+  83  Linux
    /dev/sda11      133180898   **145211533**     6015318   83  Linux

I've tried deleting the last partition and creating a new one, thinking fdisk would "go to the new-and-improved end", but this still doesn't work.

any suggestions, with or without fdisk?

thanks in advance

user50460
  • 315
  • 1
  • 2
  • 8

2 Answers2

9

Your problem is that you have used all four primary partitions, and your extended partition ends at 145211534. What you need to do is increase the size of your extended partition. Which will permit you to add additional logical partitions within your extended partition.

Though if that was my system I would have setup LVM instead of copying a bazillion partitions. An LVM setup would give you far more flexibility to allocate additional space instead messing around with the MBR partition table.

Zoredache
  • 128,755
  • 40
  • 271
  • 413
7

Instead of creating new partitions, look at resizing your existing partitions. For this, I use GParted.

http://gparted.sourceforge.net/

Specifically, I use the GParted Live CD which you can just boot into from CDROM.

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

With it, you can resize your partitions and most file systems (excepting some LVM and/or MD sets.)

Once done, you can reboot back to your hard disk and you're good to go.

I've used this both in physical and virtual environments. In a VM environment, it's great for keeping around small template VM's that can be "sized-up" for larger applications.

Ken
  • 116
  • 2