Linux - Server This forum is for the discussion of Linux Software used in a server related context. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
05-06-2011, 12:26 AM
|
#1
|
Member
Registered: Mar 2004
Location: Boston, MA
Distribution: SuSE Linux Open/Enterprise, Red Hat, Ubuntu
Posts: 147
Rep:
|
Can't create partition using fdisk
Hi,
I recently expanded the RAID on an iSCSI device which is shared out to a linux server. Fdisk correctly sees the new size but it won't let me add a third partition. It complains about overlapping partitions whenever I try to add it.
If I 'remove' the partition, the overlapping error goes away. The interesting thing here is that when attempting to use the default sizes to setup the partition the printed screen shows completely different results (which I can understand is why its complaining about overlapping)
I'm not sure why its not accepting the cylinder sizes I want. Anyone have any ideas as to what's wrong here?
Code:
Disk /dev/sde: 5495.3 GB, 5495280467968 bytes
255 heads, 63 sectors/track, 668096 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x1f75ee7d
Device Boot Start End Blocks Id System
/dev/sde1 1 267349 2147480811 83 Linux
/dev/sde2 267350 485888 1755414517+ 83 Linux
root@srv-ub-01:/data# fdisk /dev/sdc
WARNING: The size of this disk is 5.5 TB (5495280467968 bytes).
DOS partition table format can not be used on drives for volumes
larger than (2199023255040 bytes) for 512-byte sectors. Use parted(1) and GUID
partition table format (GPT).
WARNING: DOS-compatible mode is deprecated. It's strongly recommended to
switch off the mode (command 'c') and change display units to
sectors (command 'u').
Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 3
First cylinder (485889-668096, default 485889):
Using default value 485889
Last cylinder, +cylinders or +size{K,M,G} (485889-668096, default 668096):
Using default value 668096
Command (m for help): p
Disk /dev/sdc: 5495.3 GB, 5495280467968 bytes
255 heads, 63 sectors/track, 668096 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x1f75ee7d
Device Boot Start End Blocks Id System
/dev/sdc1 1 267349 2147480811 83 Linux
/dev/sdc2 267350 485888 1755414517+ 83 Linux
/dev/sdc3 218539 400747 1463585760 83 Linux
Partition table entries are not in disk order
Command (m for help): v
Warning: partition 1 overlaps partition 3.
Warning: partition 2 overlaps partition 3.
Remaining 2927179004 unallocated 512-byte sectors
|
|
|
05-06-2011, 10:34 AM
|
#2
|
Member
Registered: Mar 2004
Location: Boston, MA
Distribution: SuSE Linux Open/Enterprise, Red Hat, Ubuntu
Posts: 147
Original Poster
Rep:
|
anyone have any ideas?
|
|
|
05-06-2011, 02:37 PM
|
#3
|
Member
Registered: Mar 2004
Location: Boston, MA
Distribution: SuSE Linux Open/Enterprise, Red Hat, Ubuntu
Posts: 147
Original Poster
Rep:
|
bump
|
|
|
05-06-2011, 05:03 PM
|
#4
|
Member
Registered: Mar 2004
Location: Boston, MA
Distribution: SuSE Linux Open/Enterprise, Red Hat, Ubuntu
Posts: 147
Original Poster
Rep:
|
bump again
|
|
|
05-06-2011, 05:07 PM
|
#5
|
Senior Member
Registered: Dec 2005
Location: Massachusetts, USA
Distribution: Ubuntu 10.04 and CentOS 5.5
Posts: 3,873
|
Did you read the error message in your first post? It says that you have to use parted to manipulate the partitions and you have to use GPT partition tables instead of MBR style partition tables because the disk is larger than 2 TB.
Last edited by stress_junkie; 05-06-2011 at 05:08 PM.
|
|
|
05-06-2011, 08:18 PM
|
#6
|
Member
Registered: Mar 2004
Location: Boston, MA
Distribution: SuSE Linux Open/Enterprise, Red Hat, Ubuntu
Posts: 147
Original Poster
Rep:
|
I did see that message. but the 2 partitions that are already on that disk are either 2TB or 1 TB, totaling 3TB. The extra disk space is also less than 2TB. I don't understand why I can't add that all of a sudden when I created the other two partitions without a problem.
How difficult is it to covert to GPT without blowing away the data that's already on there? Or can I create the desired partition using parted with GPT and leave the other partitions as msdos?
|
|
|
05-07-2011, 06:19 AM
|
#7
|
Senior Member
Registered: Dec 2005
Location: Massachusetts, USA
Distribution: Ubuntu 10.04 and CentOS 5.5
Posts: 3,873
|
Quote:
Originally Posted by NetAX
How difficult is it to covert to GPT without blowing away the data that's already on there? Or can I create the desired partition using parted with GPT and leave the other partitions as msdos?
|
I believe that the two methods are completely incompatible. The MSDOS style MBR disk structure uses 512 bytes at the beginning of the disk while the GPT uses 4096 bytes at the beginning of the disk.
I believe that you will have to back up the data on the disk, then start over using the GPT style disk disk partitions, then restore the backed up data.
I have read about GPT on large disks but I haven't worked with GPT or large disks. I'm just telling you what I've read.
|
|
|
05-10-2011, 12:44 PM
|
#8
|
Member
Registered: Mar 2004
Location: Boston, MA
Distribution: SuSE Linux Open/Enterprise, Red Hat, Ubuntu
Posts: 147
Original Poster
Rep:
|
I will backup the data most definitely. There appears to be a way to convert the MSDOS partition table to GPT without inccuring any data loss, but that's up for discussion as to whether or not that truly is the case. How likely is it that performing the conversion will correct the issue with the partitions overlapping?
|
|
|
05-11-2011, 03:43 AM
|
#9
|
LQ Newbie
Registered: Sep 2009
Location: Bangalore
Distribution: RedHat Fedora Centos
Posts: 9
Rep:
|
Hi there!, I have faced Similar problem (Overlapping of Partitions), when you have GPT taken over precedence for Disk Tables, You can use the GUI Mode to Do this or if you have any appliance like NAS-SAN Filers you can make partitions from their, any further creation of partitions using fdisk will not be replicated upon volumes creation.
Do Back-up of the data, or you will lose it when changing partition modes
|
|
|
05-18-2011, 05:02 PM
|
#10
|
Member
Registered: Mar 2004
Location: Boston, MA
Distribution: SuSE Linux Open/Enterprise, Red Hat, Ubuntu
Posts: 147
Original Poster
Rep:
|
For anyone who's looking for an answer to this, I solved it by installing gdisk and running a "transformation" on the partition table for the disk. I didn't lose any data but I did back it all up as a precaution, since this tool may or may not do the task for you. It ended up fixing the overlapping somehow and allowed me to add a new partition without any problems.
Basically you run the tool on the disk in question and navigate to the menu which allows you to convert the table. I basically ran the following commands to convert from MBR to GPT.
run # gdisk /dev/sde
1) ? for help
2) p to print partition table
3) r to run conversion process
4) ? for help again
5) f to run conversion
6) p to print partition table
7) v to verify partition table
8) w to write table
|
|
|
All times are GMT -5. The time now is 02:17 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|