LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 07-30-2011, 05:58 PM   #1
lucmove
Senior Member
 
Registered: Aug 2005
Location: Brazil
Distribution: Debian
Posts: 1,434

Rep: Reputation: 110Reputation: 110
Question Can't make two partitions the same size


I have a 320GB HDD. I buy a new 640GB HDD. I want to clone my existing partitions in the new HDD then copy everything over.

I do it the way I always do: I run 'cfdisk /dev/sda' in one terminal and check the size of each partition, then I run 'cfdisk /dev/sdb' in another terminal, where I create the partitions, all same size, in the new HDD. Of course, a huge space is left at the end, roughly 320GB.

My partition clone method is not as accurate as I thought it would be. I just copied all the data from my 90GB partition with rsync and noticed the following:

Code:
# df -h
/dev/sda5    83G	    82G	     1.6G     99%  /source
/dev/sdb5    83G	    81G	     1.1G     99%  /target
Uh oh. The newer partition somehow (shrug) uses less space, but it also has less space available. Let me have a close look:

Code:
# df
/dev/sda5    86599506    84966076    1633430  99%  /source
/dev/sdb5    86584210    84646734    1057607  99%  /target
So what am I doing wrong, what would the correct way to do it have been?

Last edited by lucmove; 07-30-2011 at 06:00 PM.
 
Old 07-31-2011, 12:45 PM   #2
jefro
Moderator
 
Registered: Mar 2008
Posts: 22,003

Rep: Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629
I think you can use fdisk or maybe that but instead of selecting a % you select start and end cylinders.
 
Old 08-01-2011, 02:21 AM   #3
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian
Posts: 8,578
Blog Entries: 31

Rep: Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208
Possibly caused by cfdisk rounding a setting in MB to suit the HDD's characteristics ... ?

You could try using cfdisk's Units facility to set identical sizes in sectors (but this may yield a sub-optimal layout ...?).
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
A way to make (c)fdisk divide a drive into equal size partitions? bluesword1969 Linux - Software 1 02-11-2010 12:35 PM
How many partitions and of which size MigL Linux - Hardware 4 09-17-2007 12:56 PM
Size of various partitions Remote Mandriva 3 02-11-2004 09:37 PM
How many partitions and what size for each? HeatSkrCannibal Linux - Laptop and Netbook 2 08-18-2003 12:19 PM
Partitions size spy5600 Linux - Newbie 7 08-03-2003 10:21 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 07:09 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration