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

learn more… | top users | synonyms

2
votes
2answers
3k views

Is it possible to restore disk image to a different size hard disk

recently I made a backup 120 GB disk image using dd: dd if=/dev/sda of=backup.img Now I have a new 320 GB hard disk and want to restore that backup image to that new disk. Will running dd ...
7
votes
4answers
7k views

dd on entire disk, but do not want empty portion

I have a disk, say /dev/sda. Here is fdisk -l: Disk /dev/sda: 64.0 GB, 64023257088 bytes 255 heads, 63 sectors/track, 7783 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Sector size ...
13
votes
1answer
168 views

Does the “bs” option in “dd” really improve the speed?

Every now and then, I'm told that to increase the speed of a "dd" I should carefully choose a proper "block size". Even here, on ServerFault, someone else wrote that "...the optimum block size is ...
1
vote
2answers
80 views

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 ...
0
votes
1answer
18 views

Simple scheme for backup virtual machine, which drawback of simple DD?

We've been struggling to create the consistent scheme for backup of KVM virtual machines under Proxmox control and Ceph as storage, but still quite often during the vzdump with a snapshot the virtual ...
0
votes
0answers
28 views

Why dd reads from output device? [migrated]

While dding a CentOS 7 x86_64 DVD image to a USB drive (sdb), I monitored the progress with iostat. It kept alternating between mostly writing to the USB drive: Device: tps kB_read/s ...
-1
votes
0answers
22 views

Create a new image from partition images

I have a faulty server from 2004 which the hard disk is about to die. It has 3 primary(107mb, 2gb, 10gb; boot-swap-data), 1 extended partitions. In the extenxdded partition, there lies 3 partitions, ...
3
votes
2answers
900 views

Raw copy with sector precision on windows

Is there some program for windows that is able to do what dd does in linux out of the box? I need to copy from a file to a physical disk in raw mode where I need to define offsets for input and ...
1
vote
2answers
44 views

How to clone a RAID5 system

I clone single disk systems by booting the master system to a CD and running… dd if=/dev/sda | gzip - | ssh user@hostname dd of=image.gz Then I boot the target system with the CD and run… ssh ...
115
votes
26answers
216k views

Using DD for disk cloning

There's been a number of questions regarding disk cloning tools and dd has been suggested at least once. I've already considered using dd myself, mainly because ease of use, and that it's readily ...
17
votes
9answers
12k views

How to set up disk cloning with dd, netcat and ssh tunnel?

I would like to copy stuff in bulk (reimage disk using dd) with netcat from host A to B via ssh encrypted channel on Linux. What commands should I type on both ends?
-1
votes
1answer
20 views

Disk image growing in size [closed]

I am trying to set up Rasberry pi for jobs that don't deserve bigger machine. I downloaded a Pidora disk image (.img) zipped it is roughly 512MB. After unzipping it is 2.2GB ( no problem here). ...
-1
votes
2answers
46 views

HHD cloning with dd on running server

Is it possible to clone HDD with dd command on linux while server is up and running. Server running, Apache, MySql, NGINX. I ask this coz won't have downtime.
0
votes
1answer
54 views

When copying VM filesystem over netcat, dd copies double the disk size

I'm attempting to copy the disk of a working headless virtualbox VM (VM1) on one server to a new VM (VM2) on a vCloud server. I don't have access to the host of VM2. The OS is Windows Server 2003 ...
1
vote
0answers
430 views

Cloning a bitlocker encrypted disk

Our company's had its laptops for just over 2 years now and they have all become slow and many of them have had their harddisks dying randomly lately. I noticed that many of my colleagues use a tilted ...
6
votes
2answers
168 views

Best way to clone a Linux system

I've just finished setting up a Debian system running on an embedded device. It has custom partitioning, numerous config file changes, web content, and a couple of applications compiled from source. ...
-1
votes
1answer
78 views

Fixing partition table after writing 0s to beginning

I have a sw raid10 setup like: /dev/sdX > partition /dev/sdX1 > raid md0 > lvm > fs. I'm an idiot, and wrote 4gb of 0s to /dev/md0 with dd dd if=/dev/zero of=/dev/md0 bs=4k count=1000000 ...
-2
votes
3answers
58 views

Using dd for backup with a single disk

I have a RHEL5 Amazon cloud instance that I need to image to another instance in order to setup a test environment for some upcoming patching I'm doing. The server to be imaged is a production server. ...
0
votes
1answer
32 views

dd or cat - overload when read /dev/zero

I need reclamation thin disk, so Im trying fill zero on vhdd. But when I run it, so server is overload with 20k IOPS and full satured SAN network. Can you help me how I can slow b/w for this? E.g ...
1
vote
2answers
739 views

cloning with dd - is non-partitioned space considered the same as empty space within filesystem for resulting image size?

note: all = all that i've found all the "cloning with dd" information talks about how dd copies all the "empty space", but literally all writings seem to be responding to a situation where ...
1
vote
1answer
68 views

Anyone tried dd'ing Raidmembers?

I want replace all disks in a 10 disk raid6 (linux software raid). I could do this by pulling a disk, let the array rebuild, rinse, repeat. But this would take a very long time, and cause 10 ...
2
votes
1answer
262 views

Large write with dd fail on RAID-5

I have a server with a RAID controller which connects to a JBOD over SAS. JBOD is populated with 16 SAS-HDDs of 3TB (8 of one make and 8 of other, same rpm). I have configured 3 logical drives with ...
4
votes
1answer
363 views

Linux page cache slows down IO on dual cpu server with 64GB ram

I have a massive problem with the linux page cache which slows down the IO. For instance if I copy a lvm partition with dd, linux cache the data in the buffers or caches (free –m). That is not the ...
0
votes
1answer
50 views

handle multiple calls of rsync, dd and snapshot

The server runs the following operations often. It takes a snapshot of a logical volume, then backup up the content to the remote backup server. It is possible that multiple backups and transfer ...
0
votes
0answers
235 views

On a system with 64GB mem the Linux Buffer run full while copying with dd to dev null and io stops till manual drop_caches

I am running a server with linux software raid 10. It is a dual CPU system with 64GB Ram. 2x16GB dimms related to each of the CPUs. I want to use dd to backup kvm virtual machines and run into a ...
0
votes
1answer
896 views

dd command piped over gzip and ssh faster and faster as dd progresses

I am running the following command to copy a LVM from one host to another: dd if=/dev/vg_1/lv1 conv=noerror,sync bs=4M | gzip | ssh user@ip 'gzip -d | dd of=/dev/vg_2/lv1 bs=4M' To begin with I was ...
0
votes
1answer
105 views

dd output file larger than input file when executed with conv=noerror,sync

I am trying to backup an LVM on one of my servers with the following command: dd bs=4M conv=noerror,sync if=/dev/vg_volgroup/LvmName | ssh myuer@myip "dd of=/home/myuser/LvmName bs=4M ...
6
votes
2answers
3k views

/dev/zero equivalent in windows?

I am trying to use the windows version of dd to copy a RHEL iso to a USB stick. However, I wanted to zero out the drive first to ensure there is no filesystem on it before writing it out. Is there an ...
0
votes
1answer
189 views

dd unable to write to tape drive

I'm trying to dump our online backups to tape; for obvious reasons I want to encrypt the data on the tapes, so to write to the tape I need to tar everything up, pipe that to openssl to encrypt it, ...
1
vote
0answers
62 views

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 ...
1
vote
1answer
118 views

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 ...
1
vote
5answers
212 views

Does filling up disk with dd removes files securely?

I want to remove my files securely without worrying about anyone restoring them, I know I can use shred but it takes too long even with -n 1 so I thought maybe if I remove files and write on the disk ...
2
votes
2answers
88 views

DD over SSH from Server to Server

Is it possible to DD one server to another? Maybe through SSH? I've looked around and I have seen examples of DD using SSH from local to server and vice versa, but is it possible to do it from server ...
1
vote
2answers
445 views

Why does dd show slow disk speed first time?

I'm checking the disk speed of a hdd on CentOS 6 using dd command. The setup is a DRBD setup - with this server being primary. To ensure that I get correct values, I execute the dd command 3 times ...
0
votes
1answer
70 views

rsync, dd and then add to RAID 1, could cause database corrupted?

Firstly I have a HDD which has been setup as RAID, type Volume, not RAID 0 or RAID 1 ... and I wanna add one more HDD to setup a RAID 1 array. These bellow steps are what I've done. Detach from ...
2
votes
3answers
119 views

LVM: Using an image of a PV?

I have a logical volume spanning several drives. One of those drives (3TB, the largest of the bunch) is dying, and I am currently making an image of it (via ddrescue). I'm not yet sure on how to use ...
0
votes
1answer
103 views

Correct way to copy vm disk

I have a VM’s disk to copy from one host to another for live migration. I can think of two ways to copy the VM’s disk. Do a snapshot of the Logical Volume in the original host, create a Logical ...
0
votes
1answer
57 views

Use dd or redirection to write to tape?

My Googling for writing to tapes with encryption have turned up various results. Most along the lines of piping tar to openssl similar to: tar cf - /home | openssl des3 -salt -k "Your-Password-Here" ...
3
votes
1answer
409 views

Using dd on disks with different sector sizes

I would like to move a partition to a new drive. The old drive has a sector size of 512 bytes while the new one has a sector size of 4096 bytes. I tried doing a dd of the full disk, but that failed ...
-1
votes
1answer
401 views

Benchmarking GlusterFS & NFS on AWS using iozone and dd gives different results

I have tried benchmarking GlusterFS vs NFS on Amazon Web Services (AWS) using a m1.medium sized EC2 instance. We use the AWS EBS as the block store, with a XFS file system. Running Ubuntu 12.04 ...
3
votes
2answers
395 views

Save data after accidental dd format

as embarrassing as it sounds I managed to dd a debian iso to an external hd instead of my usb pen drive. now my 1.5 tb western digital has 1 700mb partition named debian and the rest is unallocated ...
3
votes
3answers
1k views

Creating an iso file in Linux

I have created iso files by using two commands: dd if=/dev/cdrom of=filename cp /dev/cdrom filename What's the difference between the two, both have worked for me.
1
vote
1answer
212 views

How to move partitions from 2 LVM volumes into one LVM on other disk?

i had 2 partitions with following layout Disk /dev/xvda: 376.4 GB, 376354897920 bytes 255 heads, 63 sectors/track, 45755 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Sector size ...
1
vote
1answer
349 views

DD broke my whole partition - boot failed: not a bootable disk . Any way to recover it?

Im kind of freaking out here, if anyone can help me please help me... This happened to a Windows 2012 KVM virtual machine. I had a very important database running in it, if I could only recover that ...
1
vote
0answers
617 views

Differences between hdparm --read-sector and dd with “Current Pending Sectors”

This was originally an "answer" to How to use hdparm to fix a pending sector? I'd been getting SMART notifications for the same "Current Pending Sector" for days. The dd solutions around weren't ...
0
votes
2answers
105 views

Cancel /dev/zero before it finishes?

To clear a large hard drive I was using dd if=/dev/zero of=/dev/sda. Only later I realized from reading more sources that the default block size is 512, and if I want the process to go quicker I ...
5
votes
3answers
7k views

Moving a Logical Volume directly from one server to another over the network?

I have a KVM host machine with several VMs on it. Each VM uses a Logical Volume on the host. I need to copy the LVs to another host machine. Normally, I would use something like: dd ...
1
vote
1answer
102 views

Why is my synchronized I/O so bad compared to direct?

I have two 3TB disks in a software RAID 1 setup and the host OS is 64bit Debian wheezy. Issuing: dd if=/dev/zero of=test bs=64k count=3k oflag=direct && rm test Yields: 201326592 bytes ...
0
votes
1answer
235 views

1. XFS: how to find path / directory of inodes 2. XFS in a file -o loop and ddrescue?

how to find the full original file/directory path of some damaged XFS inodes? and how to list the last modified few 10000 inodes (=edited or moved files/directories) rapidly among millions of ...
0
votes
0answers
83 views

xfs.image I/O error but harddrive is fine?

Please help to determine, how to may fix this XFS filesystem and whats actually wrong? Thanks! An XFS image runs productive mounted -o loop on debian. a million of files are read every day, only ...