Go Back   AnandTech Forums > Software > *nix Software

Forums
· Hardware and Technology
· CPUs and Overclocking
· Motherboards
· Video Cards and Graphics
· Memory and Storage
· Power Supplies
· Cases & Cooling
· SFF, Notebooks, Pre-Built/Barebones PCs
· Networking
· Peripherals
· General Hardware
· Highly Technical
· Computer Help
· Home Theater PCs
· Consumer Electronics
· Digital and Video Cameras
· Mobile Devices & Gadgets
· Audio/Video & Home Theater
· Software
· Software for Windows
· All Things Apple
· *nix Software
· Operating Systems
· Programming
· PC Gaming
· Console Gaming
· Distributed Computing
· Security
· Social
· Off Topic
· Politics and News
· Discussion Club
· Love and Relationships
· The Garage
· Health and Fitness
· Merchandise and Shopping
· For Sale/Trade
· Hot Deals with Free Stuff/Contests
· Black Friday 2014
· Forum Issues
· Technical Forum Issues
· Personal Forum Issues
· Suggestion Box
· Moderator Resources
· Moderator Discussions
   

Reply
 
Thread Tools
Old 12-24-2012, 03:17 PM   #1
yugpatel
Senior Member
 
Join Date: Feb 2001
Posts: 492
Default Clonezilla question.

I recently purchased Intel series 330 180GB SSD and trying to copy Ubuntu from the existing 100GB IDE Maxtor drive.

Source Drive: Maxtor 100 GB
Partition1 74.5GB (63.78 used, 10.72 GB free)
Partition2 20GB Unallocated (used to be linux swap).

Destination Drive: Intel 180GB
Partition1 126.95 GB (116.23 GB used, 10.72 GB free)
Partition2 1.56 Unallocated
Partition3 14.65 GB Linux swap
Partition4 26.08 NTFS common access area.

When try to copy partition1 from source drive to the partition1 of the target, even though source partition is only 63.78GB used in size, the destination partition becomes 116.23 GB (source drive is only 100GB). I don't understand this.

Is there any way I can mirror partition1 of the source drive without this side effect. I used different option in Clonezilla but no avail.

PS:- Somehow anandtech does not allow me attachments.
yugpatel is offline   Reply With Quote
Old 12-24-2012, 06:53 PM   #2
lxskllr
Lifer
 
lxskllr's Avatar
 
Join Date: Nov 2004
Location: Somewhere over the rainbow
Posts: 38,441
Default

If I had to guess, I'd say it's taking the physical room of source 1,, and applying it to destination 1. IOW, the data spans 116.23gb, but has holes in it that could be filled. I don't know how you'd do it, but look into compacting source 1 before copying it.
lxskllr is offline   Reply With Quote
Old 12-26-2012, 12:04 AM   #3
AnonymouseUser
Diamond Member
 
AnonymouseUser's Avatar
 
Join Date: May 2003
Location: Dallas TX
Posts: 8,399
Default

I'm thinking a sector size mismatch is at the root of the issue (512 vs 4096). I would suggest not doing partition-to-partition, only drive-to-drive in this case. After the transfer is complete, you can then delete the 2nd partition and repartition the remaining space as you wish.

If you still wish to do a partition copy instead, try creating an image first, then restoring from that image.
__________________
NSA Homeland Security PRISM Denial of service Malware Trojan Keylogger Cyber Command
2600 Backpack Phishing Rootkit Agro Eco ISIL Conventional weapon
Target Weapons grade Dirty bomb Enriched Nuclear Chemical Biological weapon Black out
Pressure Cooker Grid Power Smart Body scanner Electric ISIS Ammonium nitrate Brown Out
Bridge Organized crime National security State Liberation Security Breach Threat Standoff
SWAT Screening Virus Environmental Terrorist Dock
AnonymouseUser is offline   Reply With Quote
Old 12-26-2012, 05:41 AM   #4
mv2devnull
Senior Member
 
Join Date: Apr 2010
Posts: 785
Default

Quote:
Originally Posted by AnonymouseUser View Post
I'm thinking a sector size mismatch is at the root of the issue (512 vs 4096).
Lets assume that each file contains n*4kiB+1 bytes. In 512B blocks that consumes n*4kiB+512B, in 4kiB blocks that consumes n*4kiB+4kiB. The extra space is thus 3.5kiB per file. You would need millions of files to explain the 50GiB+ difference.

Since the odd partition has Linux filesystem, I would use 'stat' and 'du' to inspect both the original and the copy. I could use 'rsync' to file-copy content of that partition (look at '-H' option for hardlink copy) and fix the fstab by hand.
mv2devnull is online now   Reply With Quote
Old 12-26-2012, 08:17 AM   #5
yugpatel
Senior Member
 
Join Date: Feb 2001
Posts: 492
Default

Quote:
Originally Posted by mv2devnull View Post
Lets assume that each file contains n*4kiB+1 bytes. In 512B blocks that consumes n*4kiB+512B, in 4kiB blocks that consumes n*4kiB+4kiB. The extra space is thus 3.5kiB per file. You would need millions of files to explain the 50GiB+ difference.

Since the odd partition has Linux filesystem, I would use 'stat' and 'du' to inspect both the original and the copy. I could use 'rsync' to file-copy content of that partition (look at '-H' option for hardlink copy) and fix the fstab by hand.
Thanks for your technical insight. How would I accomplish using step-by-step command?
I am not so expert, would you please guide me? If sector size is issue, how would I control it while copying?

Quote:
Originally Posted by AnonymouseUser View Post

If you still wish to do a partition copy instead, try creating an image first, then restoring from that image.
I will try that also.

More over, I used dd command as explained at http://www.cyberciti.biz/faq/howto-copy-mbr/ but some result.
yugpatel is offline   Reply With Quote
Old 12-26-2012, 10:24 AM   #6
AnonymouseUser
Diamond Member
 
AnonymouseUser's Avatar
 
Join Date: May 2003
Location: Dallas TX
Posts: 8,399
Default

Quote:
Originally Posted by mv2devnull View Post
Lets assume that each file contains n*4kiB+1 bytes. In 512B blocks that consumes n*4kiB+512B, in 4kiB blocks that consumes n*4kiB+4kiB. The extra space is thus 3.5kiB per file. You would need millions of files to explain the 50GiB+ difference.
I agree with your assessment, I just couldn't figure out how the file system grew so much otherwise.
__________________
NSA Homeland Security PRISM Denial of service Malware Trojan Keylogger Cyber Command
2600 Backpack Phishing Rootkit Agro Eco ISIL Conventional weapon
Target Weapons grade Dirty bomb Enriched Nuclear Chemical Biological weapon Black out
Pressure Cooker Grid Power Smart Body scanner Electric ISIS Ammonium nitrate Brown Out
Bridge Organized crime National security State Liberation Security Breach Threat Standoff
SWAT Screening Virus Environmental Terrorist Dock
AnonymouseUser is offline   Reply With Quote
Old 12-26-2012, 01:11 PM   #7
yugpatel
Senior Member
 
Join Date: Feb 2001
Posts: 492
Default Update on progress.....

Tried using Acronis True Image and used clone disk option and it copied the 80GB parttiion correctly (sector by sector)(69.xx GB used 10.xx free) but it did not copy MBR and hence I cannot boot from SSD. How can I copy MBR?

I tried creating 2MB partiton at beginning of the SSD, use acronis to clone 80GB partition and then copy MBR using the command:
# dd if=/dev/sda of=/tmp/mbrsda.bak bs=512 count=1
dd if=/tmp/mbrsda.bak of=/dev/sdb bs=446 count=1

Then tried to boot from SSD, no go.

After all these, I went back to clonezilla, but used disk to disk cloning this time and everything worked out fine, the destination drive NOW has 80GB partiton with 10.xx GB free. Next, I tried to resize the partition to 130GB using GParted, and now the partiton is 116.xxGB used and 10xxGB free.

Any suggestion. ( I believe during resizing, I can specify secror size to be 512 insted of 4096, correct?)
yugpatel is offline   Reply With Quote
Old 12-26-2012, 01:58 PM   #8
AnonymouseUser
Diamond Member
 
AnonymouseUser's Avatar
 
Join Date: May 2003
Location: Dallas TX
Posts: 8,399
Default

Quote:
Originally Posted by yugpatel View Post
After all these, I went back to clonezilla, but used disk to disk cloning this time and everything worked out fine, the destination drive NOW has 80GB partiton with 10.xx GB free.
Glad to see that worked, though I am surprised Acronis TI didn't work.

Quote:
Originally Posted by yugpatel View Post
Next, I tried to resize the partition to 130GB using GParted, and now the partiton is 116.xxGB used and 10xxGB free.
That is how a 130GB partition should look, technically speaking.

116.xxGB + 10.xxGB = 126.xxGB

1GB = 1024MB

130GB / 1024MB = 126953MB or 126.953GB

Quote:
Originally Posted by yugpatel View Post
Any suggestion. ( I believe during resizing, I can specify secror size to be 512 insted of 4096, correct?)
You don't need to do that, and if you do the drive performance will suffer. Modern drives are designed for the 4096-byte sector size (aka, Advanced Format).
__________________
NSA Homeland Security PRISM Denial of service Malware Trojan Keylogger Cyber Command
2600 Backpack Phishing Rootkit Agro Eco ISIL Conventional weapon
Target Weapons grade Dirty bomb Enriched Nuclear Chemical Biological weapon Black out
Pressure Cooker Grid Power Smart Body scanner Electric ISIS Ammonium nitrate Brown Out
Bridge Organized crime National security State Liberation Security Breach Threat Standoff
SWAT Screening Virus Environmental Terrorist Dock
AnonymouseUser is offline   Reply With Quote
Old 12-26-2012, 02:33 PM   #9
yugpatel
Senior Member
 
Join Date: Feb 2001
Posts: 492
Default

Currently, 180GB SSD has partition size of 74.5 (63.79GB used, 10.71GB free), 93.17GB free.
The thing I don't understand is, when I resize this partition from 74.5GB to 130GB, why does used space increase from 63.79GB to 116.XX GB and free space remains as is, 10.71GB?
yugpatel is offline   Reply With Quote
Old 12-26-2012, 03:57 PM   #10
AnonymouseUser
Diamond Member
 
AnonymouseUser's Avatar
 
Join Date: May 2003
Location: Dallas TX
Posts: 8,399
Default

Quote:
Originally Posted by yugpatel View Post
when I resize this partition from 74.5GB to 130GB, why does used space increase from 63.79GB to 116.XX GB and free space remains as is, 10.71GB?
That I don't know. Can you plug the SSD into another PC? If so, does it report the correct usage? How old is the PC you are currently using? Is AHCI enabled in the BIOS?
__________________
NSA Homeland Security PRISM Denial of service Malware Trojan Keylogger Cyber Command
2600 Backpack Phishing Rootkit Agro Eco ISIL Conventional weapon
Target Weapons grade Dirty bomb Enriched Nuclear Chemical Biological weapon Black out
Pressure Cooker Grid Power Smart Body scanner Electric ISIS Ammonium nitrate Brown Out
Bridge Organized crime National security State Liberation Security Breach Threat Standoff
SWAT Screening Virus Environmental Terrorist Dock
AnonymouseUser is offline   Reply With Quote
Reply

Thread Tools

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 On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 03:53 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.