4

I have a 1TB harddisk /dev/sda and I bought a 2TB new disk /dev/sdb. There're already some partitions in sda.

I run dd if=/dev/sda of=/dev/sdb, then threw my old 1TB disk /dev/sda into dustbin. Then I boot into the OS in new disk, everything works well.

Then I want to add a new partition to /dev/sdb. I run gdisk but it doesn't allow me to do so.

Here's what gdisk says: (There's 3907029168 sectors(2TB), but last usable sector is 1953525134(1TB))

Command (? for help): p
Disk /dev/sdb: 3907029168 sectors, 1.8 TiB
Model: ST2000LX001-1RG1
Sector size (logical/physical): 512/4096 bytes
Disk identifier (GUID): F1EABB30-5410-4D71-AF46-3AA39380AB87
Partition table holds up to 128 entries
Main partition table begins at sector 2 and ends at sector 33
First usable sector is 34, last usable sector is 1953525134
Partitions will be aligned on 8-sector boundaries
Total free space is 4068 sectors (2.0 MiB)

Number  Start (sector)    End (sector)  Size       Code  Name
   1            2048          534527   260.0 MiB   EF00  EFI system partition
   2          534528          567295   16.0 MiB    0C01  Microsoft reserved ...
   3          567296       573710282   273.3 GiB   0700  Basic data partition
   4       778510336       780386303   916.0 MiB   2700  
   5       780388352       781410303   499.0 MiB   2700  Basic data partition
   6       781410304      1200836310   200.0 GiB   0700  Basic data partition
   7      1200836312      1515409111   150.0 GiB   0700  Microsoft basic data
   8      1515409112      1725124311   100.0 GiB   8300  Linux filesystem
   9      1725124312      1953525134   108.9 GiB   0700  Basic data partition
  10       573710288       778510335   97.7 GiB    8300  Linux filesystem

Command (? for help): n
Partition number (11-128, default 11): 
First sector (34-1200836311, default = 780386304) or {+-}size{KMGTP}: 1953525135
First sector (34-1200836311, default = 780386304) or {+-}size{KMGTP}: 

What's wrong?

Thanks!

1 Answer 1

13

Solved by this post: https://serverfault.com/questions/848576/unable-to-extend-partition-with-gdisk-on-xenserver-6-5

My disk is 2TB now but GPT partition table still thinks there's 1TB. Use v to verify the disk, it says

Problem: The secondary header's self-pointer indicates that it doesn't reside
at the end of the disk. If you've added a disk to a RAID array, use the 'e'
option on the experts' menu to adjust the secondary header's and partition
table's locations.

Identified 1 problems!

Run x(expert mode) e(fix the pointer) m(return to main menu) p(re-check your modification) w(save!), then everything is ok.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .