Re: Clon disks with dd command
On Saturday 23 December 2006 04:57, Alejandro wrote: Finally: booting from a live CD and executing dd if=A of=B...is there any risk of lost of data or damage of the source hard disk (A) using the dd command ??? Because it's the firt time I need to clon an entire disk of a data base server with very critical data...I'm scared :( Only if you have finger trouble or brain fade. if and of are very similar - so just be careful -- Alan Chandler http://www.chandlerfamily.org.uk -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Re: Clon disks with dd command
On Sat, Dec 23, 2006 at 01:57:15AM -0300, Alejandro wrote: Marc Shapiro wrote: Alejandro wrote: Paul Johnson wrote: http://wiki.ursine.ca/Top_posting Is it possible to use dd if I have to disks with the same size but different models like this: Yes, it is. As long as the disks are the same size, the rest is just details. Dear Paul, just a last short question: suppose I have a hard disk A with Linux and I want to clon this disk (A) to a new hard disk B; is it possible to boot into single user from A and then execute dd if=A of=B ?? Or do I have to get another machine with a hard disk C with Linux and from here execute dd if=A of=B ??? How about booting from a live CD, and then issuing the dd command (after making sure that neither disk is mounted). Finally: booting from a live CD and executing dd if=A of=B...is there any risk of lost of data or damage of the source hard disk (A) using the dd command ??? Because it's the firt time I need to clon an entire disk of a data base server with very critical data...I'm scared :( well there's always *some* risk, but not anymore than any other method of duplicating the data. Lesson learned though, figure out backup strategy *before* the disk is full of critical data... right? ;-) Of much more concern, I think, in your situation is making the the resulting copy is accurate and usable. A signature.asc Description: Digital signature
Re: Clon disks with dd command
Paul Johnson wrote: http://wiki.ursine.ca/Top_posting Alejandro wrote: Is it possible to use dd if I have to disks with the same size but different models like this: Yes, it is. As long as the disks are the same size, the rest is just details. Dear Paul, just a last short question: suppose I have a hard disk A with Linux and I want to clon this disk (A) to a new hard disk B; is it possible to boot into single user from A and then execute dd if=A of=B ?? Or do I have to get another machine with a hard disk C with Linux and from here execute dd if=A of=B ??? Really thanks, alejandro.- -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Re: Clon disks with dd command
Alejandro wrote: Paul Johnson wrote: http://wiki.ursine.ca/Top_posting Is it possible to use dd if I have to disks with the same size but different models like this: Yes, it is. As long as the disks are the same size, the rest is just details. Dear Paul, just a last short question: suppose I have a hard disk A with Linux and I want to clon this disk (A) to a new hard disk B; is it possible to boot into single user from A and then execute dd if=A of=B ?? Or do I have to get another machine with a hard disk C with Linux and from here execute dd if=A of=B ??? How about booting from a live CD, and then issuing the dd command (after making sure that neither disk is mounted). -- Marc Shapiro [EMAIL PROTECTED] -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Re: Clon disks with dd command
Marc Shapiro wrote: Alejandro wrote: Paul Johnson wrote: http://wiki.ursine.ca/Top_posting Is it possible to use dd if I have to disks with the same size but different models like this: Yes, it is. As long as the disks are the same size, the rest is just details. Dear Paul, just a last short question: suppose I have a hard disk A with Linux and I want to clon this disk (A) to a new hard disk B; is it possible to boot into single user from A and then execute dd if=A of=B ?? Or do I have to get another machine with a hard disk C with Linux and from here execute dd if=A of=B ??? How about booting from a live CD, and then issuing the dd command (after making sure that neither disk is mounted). Finally: booting from a live CD and executing dd if=A of=B...is there any risk of lost of data or damage of the source hard disk (A) using the dd command ??? Because it's the firt time I need to clon an entire disk of a data base server with very critical data...I'm scared :( Thanks again, alejandro.- -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Clon disks with dd command
Hi all, I have a Debian Etch machine with a SCSI HD as a master disk. I want to make a clon to another similar SCSI HD (same model and size), in order to use it if the production disk fails. People talk about dd command, telling it's possible to get a exact mirror from one disk to another just running this: dd if=/dev/sda of=/dev/sdb Is this just the solution ??? No matter with the MBR or something else ??? Really thanks, alejandro.- -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Re: Clon disks with dd command
MBR is copied together, because the copy is full, bit to bit... Em Qui, 2006-12-21 às 13:25 -0300, Alejandro escreveu: Hi all, I have a Debian Etch machine with a SCSI HD as a master disk. I want to make a clon to another similar SCSI HD (same model and size), in order to use it if the production disk fails. People talk about dd command, telling it's possible to get a exact mirror from one disk to another just running this: dd if=/dev/sda of=/dev/sdb Is this just the solution ??? No matter with the MBR or something else ??? Really thanks, alejandro.-
Re: Clon disks with dd command
Short answer: yes, that will work. Longer: showing example from my system. # dd if=/dev/sda of=sda-blocks bs=1024 count=4 4+0 records in 4+0 records out 4096 bytes (4.1 kB) copied, 0.0101397 seconds, 404 kB/s # ls -l total 4 -rw-r--r-- 1 root root 4096 2006-12-21 08:33 sda-blocks # file sd* sda-blocks: x86 boot sector; partition 1: ID=0xfd, starthead 1, startsector 63, 585922617 sectors, extended partition table (last)\011, code offset 0x48 I copied the first 4K from my boot disk to a file using dd, and then used 'file' to show that it has the: 1. x86 boot sector; 2. partition information, including some data about the extended partition table. You should probably use the 'bs=' option to 'dd', to speed it up. In cases where I've done this sort of thing, I've used block sizes that are even multiples of the 'native' size. You do need to be sure not to use up all of your available RAM with a size that's too big ;) I've found that 'bs=10k' seems to work well, though if you have plenty of RAM you might want to try something bigger. Bob Alejandro wrote: Hi all, I have a Debian Etch machine with a SCSI HD as a master disk. I want to make a clon to another similar SCSI HD (same model and size), in order to use it if the production disk fails. People talk about dd command, telling it's possible to get a exact mirror from one disk to another just running this: dd if=/dev/sda of=/dev/sdb Is this just the solution ??? No matter with the MBR or something else ??? Really thanks, alejandro.- smime.p7s Description: S/MIME Cryptographic Signature
Re: Clon disks with dd command
On Thu, Dec 21, 2006 at 01:25:15PM -0300, Alejandro wrote: Hi all, I have a Debian Etch machine with a SCSI HD as a master disk. I want to make a clon to another similar SCSI HD (same model and size), in order to use it if the production disk fails. People talk about dd command, telling it's possible to get a exact mirror from one disk to another just running this: dd if=/dev/sda of=/dev/sdb Is this just the solution ??? No matter with the MBR or something else ??? Hello Alejandro, (I am assuming you are still trying to solve the problem you posted about last night). You would be much better off using RAID1. My reason for suggesting that is that should /dev/sda fail, how will you switch over to the other disk? You mentioned a remote data center, so I don't imagine you will have ready access to your machine all the time. Additionally, depending on how you do the switch, some things may get confused (like /etc/fstab mounts and pretty much anything else that relies on knowing the correct identifier for the disk). Again, it is just a suggestion. Regards, -Roberto -- Roberto C. Sanchez http://people.connexer.com/~roberto http://www.connexer.com signature.asc Description: Digital signature
Re: Clon disks with dd command
Bob and other people, thanks for your response, it's very important to me. But I have my last short question: Is it possible to use dd if I have to disks with the same size but different models like this: Disk A: description: SCSI Disk product: SAMSUNG SP0812C vendor: ATA physical id: 0.0.0 bus info: [EMAIL PROTECTED]:0.0 logical name: /dev/sda version: SU10 size: 74GB configuration: ansiversion=5 Disk B: description: SCSI Disk product: ST380013AS vendor: ATA physical id: 0.0.0 bus info: [EMAIL PROTECTED]:0.0 logical name: /dev/sda version: 3.43 size: 74GB configuration: ansiversion=5 Thanks a lot, alejandro.- Bob McGowan escribió: Short answer: yes, that will work. Longer: showing example from my system. # dd if=/dev/sda of=sda-blocks bs=1024 count=4 4+0 records in 4+0 records out 4096 bytes (4.1 kB) copied, 0.0101397 seconds, 404 kB/s # ls -l total 4 -rw-r--r-- 1 root root 4096 2006-12-21 08:33 sda-blocks # file sd* sda-blocks: x86 boot sector; partition 1: ID=0xfd, starthead 1, startsector 63, 585922617 sectors, extended partition table (last)\011, code offset 0x48 I copied the first 4K from my boot disk to a file using dd, and then used 'file' to show that it has the: 1. x86 boot sector; 2. partition information, including some data about the extended partition table. You should probably use the 'bs=' option to 'dd', to speed it up. In cases where I've done this sort of thing, I've used block sizes that are even multiples of the 'native' size. You do need to be sure not to use up all of your available RAM with a size that's too big ;) I've found that 'bs=10k' seems to work well, though if you have plenty of RAM you might want to try something bigger. Bob Alejandro wrote: Hi all, I have a Debian Etch machine with a SCSI HD as a master disk. I want to make a clon to another similar SCSI HD (same model and size), in order to use it if the production disk fails. People talk about dd command, telling it's possible to get a exact mirror from one disk to another just running this: dd if=/dev/sda of=/dev/sdb Is this just the solution ??? No matter with the MBR or something else ??? Really thanks, alejandro.- -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Re: Clon disks with dd command
I believe this would be OK, so long as you're really sure the size is the same. Two suggestions. First, another poster mentioned using a RAID 1 setup. This would let you verify that the sizes are in fact the same and provide automatic redundancy if a disk fails (no system down time due to the failure itself), plus no testing required. Second, if you choose to go the dd route, you should test the resulting disk image in some way. The best would be to replace the original boot disk in your machine with the second disk (you want to do this so the device nodes, addresses etc. are the same when the BIOS/kernel come up, else you'll have a kernel panic). Second best would be to install the disk in a second system, which must have the same physical setup as the first (disk controllers, graphics card, etc.). Bob Alejandro wrote: Bob and other people, thanks for your response, it's very important to me. But I have my last short question: Is it possible to use dd if I have to disks with the same size but different models like this: Disk A: description: SCSI Disk product: SAMSUNG SP0812C vendor: ATA physical id: 0.0.0 bus info: [EMAIL PROTECTED]:0.0 logical name: /dev/sda version: SU10 size: 74GB configuration: ansiversion=5 Disk B: description: SCSI Disk product: ST380013AS vendor: ATA physical id: 0.0.0 bus info: [EMAIL PROTECTED]:0.0 logical name: /dev/sda version: 3.43 size: 74GB configuration: ansiversion=5 Thanks a lot, alejandro.- Bob McGowan escribió: Short answer: yes, that will work. Longer: showing example from my system. # dd if=/dev/sda of=sda-blocks bs=1024 count=4 4+0 records in 4+0 records out 4096 bytes (4.1 kB) copied, 0.0101397 seconds, 404 kB/s # ls -l total 4 -rw-r--r-- 1 root root 4096 2006-12-21 08:33 sda-blocks # file sd* sda-blocks: x86 boot sector; partition 1: ID=0xfd, starthead 1, startsector 63, 585922617 sectors, extended partition table (last)\011, code offset 0x48 I copied the first 4K from my boot disk to a file using dd, and then used 'file' to show that it has the: 1. x86 boot sector; 2. partition information, including some data about the extended partition table. You should probably use the 'bs=' option to 'dd', to speed it up. In cases where I've done this sort of thing, I've used block sizes that are even multiples of the 'native' size. You do need to be sure not to use up all of your available RAM with a size that's too big ;) I've found that 'bs=10k' seems to work well, though if you have plenty of RAM you might want to try something bigger. Bob Alejandro wrote: Hi all, I have a Debian Etch machine with a SCSI HD as a master disk. I want to make a clon to another similar SCSI HD (same model and size), in order to use it if the production disk fails. People talk about dd command, telling it's possible to get a exact mirror from one disk to another just running this: dd if=/dev/sda of=/dev/sdb Is this just the solution ??? No matter with the MBR or something else ??? Really thanks, alejandro.- smime.p7s Description: S/MIME Cryptographic Signature
Re: Clon disks with dd command
Alejandro wrote: Hi all, I have a Debian Etch machine with a SCSI HD as a master disk. I want to make a clon to another similar SCSI HD (same model and size), in order to use it if the production disk fails. People talk about dd command, telling it's possible to get a exact mirror from one disk to another just running this: dd if=/dev/sda of=/dev/sdb Is this just the solution ??? No matter with the MBR or something else ??? That only works if both disks are the same size. If that's not the case, take a look at the Hard Disk Upgrade HOWTO. http://ursine.ca/cgi-bin/dwww/usr/share/doc/HOWTO/en-html/Hard-Disk-Upgrade/index.html -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Re: Clon disks with dd command
http://wiki.ursine.ca/Top_posting Alejandro wrote: Is it possible to use dd if I have to disks with the same size but different models like this: Yes, it is. As long as the disks are the same size, the rest is just details. -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]