LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 07-24-2009, 09:57 AM   #1
MarchHare22
LQ Newbie
 
Registered: Mar 2009
Location: Milwaukee, WI
Distribution: Slackware 13
Posts: 22

Rep: Reputation: 15
dd copy of running system


Does anyone know if I use dd to copy a disk that is mounted and running to another that is mounted, it will cause problems?
 
Old 07-24-2009, 10:50 AM   #2
GazL
LQ Veteran
 
Registered: May 2008
Posts: 6,897

Rep: Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019
Not recommended. If your source disk is written to while the copy is running then your destination copy will end up being inconsistent/corrupt.

Also, if the disks/partitions you're copying from/to aren't exactly the same size, you may also run into problems using dd in this way. Not to mention having to deal with duplicate UUIDS and what have you.

What is it that you're trying to do?
 
Old 07-24-2009, 10:52 AM   #3
TSquaredF
Member
 
Registered: Dec 2005
Location: "The South Coast of Texas"
Distribution: Slackware64-current
Posts: 564

Rep: Reputation: Disabled
I can't give you any hard/fast reasons why, but I have had problems trying to clone a mounted fs. Gazl's explanation sounds logical enough. I use rsync to copy partitions to a backup USB HDD, but have never been able to rsync a mounted partition. I use what I call a "recovery partition" (see my blog). You could also use a live CD.
Regards,
Bill

Last edited by TSquaredF; 07-24-2009 at 10:54 AM. Reason: Gazl got in before I did.
 
Old 07-24-2009, 11:00 AM   #4
MarchHare22
LQ Newbie
 
Registered: Mar 2009
Location: Milwaukee, WI
Distribution: Slackware 13
Posts: 22

Original Poster
Rep: Reputation: 15
Well what I'm trying to do is copy a Linux reiserfs formatted disk to another, then I'm going to try to run off the copied disk. The problem is that I only have one system running, no way to run a live distro because it's on a mainframe. I have four disks I need to copy and then run the system from those copies.

Does anyone have suggestions? DD was really the only solution I saw to fit my needs.
 
Old 07-24-2009, 11:22 AM   #5
GazL
LQ Veteran
 
Registered: May 2008
Posts: 6,897

Rep: Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019
Ahh I see. With your disks being mainframe dasd atleast they'll be the same.

You could try remounting the existing filesystems read-only while you do the copy. That should prevent the inconsistency problem.

Also, you might find some of the information on this helpful

http://www.linuxvm.org/Info/HOWTOs/lprclone.html
 
Old 07-24-2009, 11:28 AM   #6
MarchHare22
LQ Newbie
 
Registered: Mar 2009
Location: Milwaukee, WI
Distribution: Slackware 13
Posts: 22

Original Poster
Rep: Reputation: 15
Haha that's exactly the tutorial I'm using! When I use DFDSS to copy the FS format is not recognized. And the first suggestion is under the assumption that I have two running systems. I only have one. I can put the root disk into read-only when I boot it? Is this a kernel parameter I can pass?
 
Old 07-24-2009, 11:32 AM   #7
GazL
LQ Veteran
 
Registered: May 2008
Posts: 6,897

Rep: Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019
After you've got your Linux up and running you should be able to do a

mount -o remount,ro /dev/whatever /
 
Old 07-24-2009, 02:13 PM   #8
MarchHare22
LQ Newbie
 
Registered: Mar 2009
Location: Milwaukee, WI
Distribution: Slackware 13
Posts: 22

Original Poster
Rep: Reputation: 15
I figured this out. You can't just copy over to an unformatted pack. It must be formatted for Linux, then copied. I figured that it would just raw copy over bit by bit and "become" formatted. I was wrong. So format your packs first people!
 
Old 07-24-2009, 03:36 PM   #9
SavoTU
Member
 
Registered: Apr 2005
Distribution: Slackware64 Current
Posts: 199

Rep: Reputation: 40
I have two identical hard drives and have used dd to copy everything from 1 to the other then pulled the old one out and used the install cd to fix lilo if needed.

I have always done this on a running system, i am not saying its a good idea but it worked for me.

Sav
 
  


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
Re: Squid Error: No Running Copy zainhansrod Linux - Wireless Networking 6 09-06-2011 01:36 AM
I (sometimes) cant write my program file when a copy of it is running foof Linux - Newbie 6 11-13-2008 04:17 PM
Problem mounting partitions on a Ghost copy of running system ts4tomh Linux - Newbie 3 05-06-2007 07:15 PM
boot error after using Copy Commander to copy debian system onto larger new drive Interceptor Linux - Hardware 7 05-04-2003 12:40 PM
How to copy files from A computer of NT System to The other one of Unix system? whepin Linux - Newbie 5 04-06-2003 10:50 AM

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

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