LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-13-2007, 09:52 AM   #1
lord-fu
Member
 
Registered: Apr 2005
Location: Ohio
Distribution: Slackware && freeBSD
Posts: 676

Rep: Reputation: 30
DD raided drives


Hello and mtia,
Is it OK to use dd on raided drives? I feel semi-confident that it is, but I just thought I would ask. I thought about imaging software, but I think dd would be the better fit for this and just dump individual partitions and then restore them; am I off my rocker?



mtia

[edit] I searched AwesomeMachines dd thread and found conflicting answers on whether or not dd was suitable for this task.

Last edited by lord-fu; 08-13-2007 at 12:29 PM. Reason: research
 
Old 08-14-2007, 05:33 AM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,066
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
Well. You didn't specify whether you're using hardware or
software RAID, whether you can see the slices of a hardware
one, or whether you're planning to dd the md device ....

Normally I'd say that using the device that represents the
LOT should be safe, while trying to access the partitions of
a softraid or the slices of a hardware one might not turn out
quite right.



HIH


Cheers,
Tink
 
Old 08-14-2007, 06:03 AM   #3
Electro
LQ Guru
 
Registered: Jan 2002
Posts: 6,042

Rep: Reputation: Disabled
Use the filesystem's dump utility to be safe. The utility dd is meant to be used to do an exact sector to sector copy. If the hardware is not the same (model, brand, and capacity) on other system or you change something on the present system later, dd will not work in a predictable manner.
 
Old 08-15-2007, 12:03 AM   #4
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,066
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
Eh? dd copies files (of course, in Linux that's a very lose definition) and offers
certain commodities and conversion if these are required... to limit it in the sense
you've done is unfair :} .... plus, there's nothing wrong in copying from one
"(model, brand, and capacity)" to another; I've cloned HDDs over the net between
different sizes and makes and models.



Cheers,
Tink
 
Old 08-15-2007, 01:38 AM   #5
Electro
LQ Guru
 
Registered: Jan 2002
Posts: 6,042

Rep: Reputation: Disabled
I still recommend using filesystem's dump utility to be safe than sorry. dd does copy sector by sector or bytes to bytes. Also dd can be the wrong tool to use when the source has a bad byte in raw form which can screw up the destination.

Another tool to use that is better than dd when cloning a disk is Partimage from System Rescue CD.
 
Old 08-15-2007, 02:17 AM   #6
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 670Reputation: 670Reputation: 670Reputation: 670Reputation: 670Reputation: 670
I think there could be a problem if the device is live. Suppose the you have 3 drives that make up the array. You make an image of the first one, and in the meantime they change. When you make an image of the 2nd drive, the first one may be invalid.

If you are using a redundant raid, then backing up the data may be a better way to go than backing up the image. Maybe you want to back up the image of the entire array after the initial installation, but relying on such massive backups may be asking for trouble. Suppose for example that you hit a bad block on a disk. That could cause the backup to fail. Going the other way, a small error in the restore could cause a recovery failure. Even if it occurred on a part of the image that didn't contain files on the original disk.

Last edited by jschiwal; 08-15-2007 at 08:14 AM. Reason: fix typo
 
Old 08-15-2007, 08:34 AM   #7
lord-fu
Member
 
Registered: Apr 2005
Location: Ohio
Distribution: Slackware && freeBSD
Posts: 676

Original Poster
Rep: Reputation: 30
Wow thanks all for the awesome explanations. I am sorry for my lack of verbosity in the explanation of my setup. I do use software raid on this machine, it is redundant. However after my initial post I was like "duh!" and a few of you touched on why I felt that way. The reason I was wanting to do a dump was to move the data we have to another machine as this one is starting to experience all sorts of "weird" behaviors, bad blocks, random freezes, fans shutting off on there own, staying out late, drinking beer, etc.

So I initially thought, just dump and restore on new machine, but the unreadable sectors reported by the smart utility makes me second guess dumping and restoring to a new machine. I have heard not to put too much faith in the software raid error reports so I was still possibly considering it.

On these servers I only have 3 partitions, /boot /home and / . I just didnt know if I should dump for example sda1, sda, or mda* etc.

In short though, I still have too many questions to feel comfortable enough to proceed with dd.
I have used gparted, but I did not know that it has the ability to clone raided drives. eventually when I have time I will setup a test machine and mess with both of these methods, but for right now and the sake of time I feel it is in our best interest to proceed with just restoring backups on the new machine.

I greatly appreciate your help and insights.

mt
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
RAIDed riluve Linux - Hardware 7 03-10-2005 04:36 PM
Microsoft Raided By Japan's Fair Trade Commission LinuxLala General 2 02-26-2004 06:42 PM
Installing Mandrake or RH on an already RAIDed system joonix214 Linux - Newbie 2 09-04-2003 08:22 PM
Install Linux on Promise RAIDed system hocrus Linux - Newbie 4 05-02-2003 08:51 AM
Installation Linux on a RAIDed drive Rasnowl Linux - Software 3 09-13-2001 05:08 PM


All times are GMT -5. The time now is 01:03 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration