LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   make exact copy of hda1 for new HD (https://www.linuxquestions.org/questions/linux-general-1/make-exact-copy-of-hda1-for-new-hd-457885/)

nephish 06-24-2006 12:06 PM

make exact copy of hda1 for new HD
 
hey there,
i am hosting a few websites and i need more hd space.
i want to buy a 200 gig hard drive and use that instead of the little
40g unit i have now. problem is, it took forever to set the system up
just the way i like it.
is it possible to make an exact copy of everything on my hda1 drive (everything including the mbr, / directory on up ? so that when i boot off the new drive, it is the same as the one i am using now ?

any suggestions appreciated.

nadroj 06-24-2006 12:34 PM

iv never had to do it but iv read in the past that the 'dd' command will be able to do this.
boot with a liveCD, you could download DSL in about 10 minutes if you dont have one (however, of course, any would work). make sure none of your partitions are mounted, and issue something like 'dd if=/dev/hda of=/dev/hdb'. search here or google.com/linux for info about the dd command first.

w3bd3vil 06-24-2006 12:48 PM

Thats probably the reason why I was taught to create LVM partitions. Hope you follow that.

voger 06-24-2006 12:48 PM

How about "cp -Rp" from one disk to the other? After that just boot with a live cd and chroot to restore grub.

nephish 06-24-2006 01:15 PM

i have used dd before to zero fill a hard drive. and i have a knoppix disc laying around somewhere.
suppose i could use that.

is it to late to do an lvm ?
dont know much about it or what its for.

thanks all,

syg00 06-24-2006 04:49 PM

dd'ing the disk is pointless - you will have the same problem on a bigger (physical) disk. All the partitions will still be the same size.

LVM is an (good) option, but you'd be better off knowing about it first (i.e. before trying it).

Presumably your space problems are in data directories, not the system (/root, /etc whatever). Best option might be to move them over first using cp - if you organize things properly, you should be able to do this without taking them whole box down. After clearing some space on the current disk, start looking at LVM conversion.


All times are GMT -5. The time now is 12:26 AM.