?
Solved

Need help cloning Linux hard drive

Posted on 2012-08-28
1
Medium Priority
?
731 Views
Last Modified: 2012-08-30
I was referred to Clonezilla in an attempt to clone a Linux hard drive to a new hard drive. I must say it worked quite well with one exception (and it did state it). The inability to resize volumes. I have one volume on the source that is 221GB. It is the "data" volume and only has 30-40 files and takes up 40MB. It does not need to be anywhere near that large. It is a 250GB SATA hard drive. I want to clone it to a 160GB SSD and I have every volume cloned with the exception of that one.

   My guess it that I could create the volume on the SSD and copy the files from the source to this smaller destination volume but I am at a loss on how to do it. I am not a Linux head. I need to do it with some kind of boot CD. I have both drives on-line at the same time but need some help creating the volume and copying the files to it from the source volume.
0
Comment
Question by:jimbecher
1 Comment
 
LVL 18

Accepted Solution

by:
Garry Glendown earned 2000 total points
ID: 38344615
Does the volume you want to reduce have system files on it? That is, will the cloned system boot without it? If so, just copy the rest of the system, leave out that one drive, boot the cloned system. Then create a small partition (or maybe leave it on the main drive without a separate partition) and manually mount the old drive's partition. Then copy the old content to the new partition/directory and you're done ...

e.g., if the drive was mount at "/data", make sure you have the mount point and create the partition with fdisk or a Linux graphical tool (depends on your distribution), or leave it as just a directory. If it's a directory, mount the new partition ("mount /dev/sda5 /data", with the correct device/partition)
Then mount the old partition, e.g. "mount /dev/sdb5 /mnt" (again enter the correct device/partition of course), and copy the content:
cd /mnt
tar cf - . | ( cd /data ; tar xvf - )

Open in new window

If you created the new partition manually, you may need to update/correct the file /etc/fstab ...
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

How to install Selenium IDE and loops for quick automated testing. Get Selenium IDE from http://seleniumhq.org Go to that link and select download selenium in the right hand column That will then direct you to their download page. From that p…
Join Greg Farro and Ethan Banks from Packet Pushers (http://packetpushers.net/podcast/podcasts/pq-show-93-smart-network-monitoring-paessler-sponsored/) and Greg Ross from Paessler (https://www.paessler.com/prtg) for a discussion about smart network …
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
Suggested Courses
Course of the Month15 days, left to enroll

839 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question