Questions tagged [dd]

This command is used to do low level copying of data.

Convert and copy a file, write disk headers, boot records, create a boot floppy. dd can make an exact clone of an (unmounted) disk, this will include all blank space so the output destination must be at least as large as the input.

For more info refer to the manpage.

210 questions
2
votes
2 answers

Backup and Restore Using dd and gzip

I've seen various posts discussing the use of dd for creating an image of a drive and only storing 'used data'. Before posing the problem/question, let's assume a few things. Assumptions The drive to clone/image is /dev/sda /dev/sda is 10TBs Used…
2
votes
1 answer

how to intentionally damage linux MBR (RHEL 7) on disk for test purpose?

I am running tests for MBR recovery on Red Hat Linux 7. I tried to intentionally erase the MBR with: dd if=/dev/random of=/dev/sda bs=1 count=512 I can see with fdisk -l /dev/sda that the partition table is damaged but once I reboot, the system…
Kwakou
  • 21
  • 2
2
votes
1 answer

dd: zero-out all the remaining unused space of a drive

In the second answer of this question about disk cloning with 'dd', I read this command: dd if=/dev/zero of=/mnt/hdb/zero It is supposed to write '0' in the unused space of drive 'hdb', however I can't find any documentation about this /zero tag…
Matthieu
  • 323
  • 1
  • 3
  • 7
2
votes
2 answers

Reduce xen image disk usage

Two cases: 1.If making hdd image using dd and copy it trough nfs to another server: mount -o ro,remount / dd if=/dev/sda bs=64K | gzip -c > /share/test.img.gz then after gunzip I get 20Gb (for ex.) file, filled w/zeroes at the end: du -h…
Dmitry
  • 23
  • 4
2
votes
2 answers

ddrescue -- which files are in error locations?

I had a HDD crash and had to use ddrescue to restore it. It took a month, but it finally finished today. However, there were three errors that it could not read. Is there a way to find out which files were there (if any)? The filesystem is ext4.
rlbond
  • 181
  • 1
  • 10
2
votes
2 answers

Linux dd: Is there a way to redirect its output for monitoring?

Sometime the servers in my workplace experience some weird behavior, it happens in random physical racks around different DC's around the world. It seems like there's a networking bandwidth issues between different machine within the same rack and…
Itai Ganot
  • 10,644
  • 29
  • 93
  • 146
2
votes
0 answers

How to restore a dd image to an EBS volume

I have a local dd image myimage.bin, which I want to use to create an AWS EBS volume. The only way I can figure out how to do this is to, 1) Launch an AWS instance 2) Create and attach an EBS volume 3) scp the local myimage.bin to the AWS…
joshu
  • 791
  • 3
  • 12
  • 28
2
votes
1 answer

Does 'lvremove' destroy data?

I assign a LV for each vm guest. When deleting a vm, I remove the corresponding lv running 'lvremove'. But is it necessary to destroy the data before running 'lvremove'? Does lvremove do the work of wiping out old data? dd if=/dev/zero of=/dev/sda…
Purres
  • 239
  • 1
  • 4
  • 18
2
votes
0 answers

Backing up VMs to a tape drive

I've got myself one of these fancy tape drives, HP LTO2 with 200/400 GB cartridges. The st driver reports it like this: scsi 1:0:0:0: Sequential-Access HP Ultrium 2-SCSI T65D I can store and retrieve files like a charm using tar, both …
2
votes
3 answers

Backup with dd upon reboot

I'm trying to implement the easy to maintain backup solution for our local linux server. The goal is to be able to restore the whole system from image file. What I am thinking of is just to issue following script with cron FILENAME=`date…
Illarion Kovalchuk
  • 443
  • 1
  • 3
  • 11
2
votes
2 answers

Partition size inconsistency after dd clone

We have recently upgraded a system HDD - it was 160GB, now 2TB. We upgraded as we were running low on space, mainly on /usr, and also on /home. I prepared the new drive with a Live CD and GParted (and made some partitions larger). Then I cloned /,…
a different ben
  • 121
  • 1
  • 5
2
votes
2 answers

After using dd new disk cannot be booted and partition tables lost

After I used dd to clone a 120 gb hard disk to new empty 320 gb hard disk, the new disk cannot be booted. And fdisk tell me the partition table is no valid and Gparted just cannot edit the partitions.(I supposed I need to create a new partition on…
Kurt Liu
  • 123
  • 1
  • 3
2
votes
2 answers

zeroing a disk with dd vs Disk Utility

I'm attempting to zero a disk on my Mac OS X machine. I'm going for complete zeros and unformatted, so I think of dd. Unfortunately the maximum throughput I've managed to get out of dd is 7MB/s. Just for grins I tried disk utility and it has a…
jdizzle
  • 558
  • 3
  • 8
1
vote
0 answers

DD data of drive to new drive within VM

I inherited a CentOS 7 vm with a messy disk system. Here's a breakdown: The VM has 2 hard disks, and the OS has two LVs with luks-encryption on top. Output from lsblk: NAME MAJ:MIN RM SIZE RO TYPE …
Cpt.Whale
  • 307
  • 3
  • 11
1
vote
2 answers

how can I sync 2 almost identical disk after dd

Lets say I have /dev/sda and /dev/sdb. Before, I run dd if=/dev/sda of=/dev/sdb bs=128M, and it succeeded. Then after some time, there is update on first disk, and I want to clone it to second disk. But I don't want to run dd from beginning,…