LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 01-20-2006, 10:46 AM   #1
spinner_0
LQ Newbie
 
Registered: Sep 2005
Posts: 24

Rep: Reputation: 15
Move contents of one disk to another and back again


I have 2 sata discs.
-- sata1 which is formatted with NTFS
-- sata2 (not mine) which is unformatted empty and bigger than sata1.

I borrowed the sata2 from a friend so that I can move the whole contends of sata1 to sata2 so that I can format sata1 to ext3 and move back the data from sata2 to sata1 and get rid once and for all the damn NTFS since I finally got rid of M$ Windows.

The amount of data is ~ 170GB and so as you understand it is crucial to get the job done corretly.
So if you know the correct and safest way (not fastest) to do it and also done it a few times yourself please decribe the way if you can.
Please feal free to write some examples if you can.

I can't use cp because i'll get out of memory and out of swap.
 
Old 01-20-2006, 11:13 AM   #2
kilgoretrout
Senior Member
 
Registered: Oct 2003
Posts: 2,989

Rep: Reputation: 388Reputation: 388Reputation: 388Reputation: 388
"I can't use cp because i'll get out of memory and out of swap."

I've never had this happen to me. Do you have some unusually large files on sata1? You could partition sata2 with a large swap partition leaving enough room to accept the data from sata1 with a little to spare.
 
Old 01-20-2006, 11:21 AM   #3
Matir
LQ Guru
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Debian, Arch
Posts: 8,507

Rep: Reputation: 128Reputation: 128
Unless you have a ridiculously small amount of memory and swap, using cp should be fine. It doesn't store the whole thing in memory before writing it out, but rather, it will read a N-byte block, then write the N-byte block to the other drive, then repeat for the next block. N varies depending on your cp version, IIRC. I think it is on the order of 4-16k.
 
Old 01-20-2006, 11:28 AM   #4
spinner_0
LQ Newbie
 
Registered: Sep 2005
Posts: 24

Original Poster
Rep: Reputation: 15
I have a lot of big files (700+MB) but I don't like cp.
I have 1GB or RAM for now.
I was thinking of a way with tar or dd.
 
Old 01-20-2006, 11:41 AM   #5
Matir
LQ Guru
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Debian, Arch
Posts: 8,507

Rep: Reputation: 128Reputation: 128
Well, I suppose you could do:
Code:
cd /mnt/newdrive
tar -c /mnt/olddrive | tar -x
Is there a reason you don't like cp? I copied ~120GB a couple of weeks ago using cp with no problems: and no swap enabled. (And much of my memory was used, running from a LiveCD)
 
  


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
move files in tar.gz back to into original folders GUIPenguin Linux - General 1 05-09-2005 12:11 PM
how to view contents of various partitions on disk skvasistha Linux - Software 1 11-23-2004 07:53 AM
How do I move my clock back to the right? Matt.Ramos Linux - Newbie 8 07-15-2004 01:50 AM
move files to new disk bosewicht Linux - Newbie 1 06-09-2004 12:51 AM
Move hard disk with OS te_conway Linux - General 1 03-12-2002 09:06 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 06:35 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