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

learn more… | top users | synonyms

13
votes
5answers
28k 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 (...
1
vote
2answers
800 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 user@...
0
votes
2answers
136 views

how to boot from a backup disk created by dd

I use dd command to backup a disk. # dd if=/dev/sda of=/dev/sdb but when I boot from the backup disk, I got a error message check filesystem failed! I do not know how to settle this problem. I ...
2
votes
1answer
37 views

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 ...
0
votes
0answers
12 views

DD + LVM Snapshot + Space shortage

Here is the scenario : I have a production system that can't be shutdown for very long, it has the following root filesystem LVM: [root@an2 ~]# df -h Filesystem Size Used ...
0
votes
1answer
37 views

How to use dd to dump an image to unallocated space

I have a bin file (chromiumos_image.bin) which contains some (around 12) partitions, which I need to dump into the unallocated space between 2 other partitions. The partition table is this: My ...
0
votes
2answers
42 views

How to mount the dd image of a swap file

I have several dd images from a single drive. One of them is the swap. I mounted all of the images in Ubuntu just fine except for the image of the swap. This is how the dd images break down: hda8 is /,...
20
votes
9answers
17k 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?
0
votes
0answers
36 views

ZFS mirror migrated to other system with dd -> zpool import fails

I'm pretty new to ZFS and this might be an easy problem (but I don't find any discussions about how to do this): I've messed up a FreeBSD installation on a Root-on-ZFS mirrored ZFS Pool on a ...
1
vote
1answer
60 views

Installing CentOS on HP Server, SSDs connected to a RAID controller

I am trying to install centOS 6.0 in this HP Server, I contacted with the support and they said me that it supports that OS. I have no problem installing it on a SSD that is connected directly to ...
1
vote
1answer
43 views

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 ...
-2
votes
1answer
40 views

Using DD to produce an Image results in empty image [closed]

I am trying to take an image of my Android phone. Specifically I have tried to image the system and boot partitions. The imaging process appears to work correctly when using dd. However, when I ...
2
votes
5answers
5k views

Break up a dd image into multiple files

I'm doing some data recovery from a hard disk. The disk has about 300GB of data on it, but I lack another hard drive that has 300GB of free space. I have three HDs, with 150, 40, and 120 GB free. ...
0
votes
0answers
26 views

Shrinking an img file that contains linux partitions

I've got an img file (4,02GB) containing a Linux OS. My goal is to shrink this img filed down to < 4GB. The img contains a linux partition that only holds about 2,5GB of data. I need to be able to ...
0
votes
1answer
57 views

Segmentation fault on dd command

I ran this command on Ubuntu to resize the /tmp and after that there is segmentation fault coming. dd if=/dev/zero of=/dev/xvda1 bs=1024M count=2 Its our live server. Is there any way to get it ...
6
votes
2answers
5k views

create image of a USB drive without unallocated partition

I have 8GB USB drive attached to my system which looks like this: [root@host]# fdisk -l /dev/sdb Disk /dev/sdb: 8462 MB, 8462008320 bytes 255 heads, 63 sectors/track, 1028 cylinders Units = ...
1
vote
3answers
3k views

Cloning LVM partitions

I need to clone a CentOS installation from a 1TB disk partitioned with LVM, to several identical machines. The disk is mostly empty since only the operating system and some software are installed and ...
3
votes
2answers
219 views

Acceptable I/O speeds for 6 x 250GB SSDs in RAID 10

I'm running CentOS 7 (XFS filesystem) on a dell server with a PERC H700 raid controller. Inside this server I have 6 x Samsung 850 Evo 250GB SSDs (yes they are consumer drives however, this is a home ...
0
votes
1answer
28 views

Backup old disk to external disk (new)

One of the 2 x 500GB drives on server is crashed can read but not write the data, which both are on Hardware RAID 0. So I connected an external 1TB new drive to backup the data and replace those 2 x ...
1
vote
2answers
115 views

Cloning a two partition HDD onto a smaller HDD and maintaining MBR

I have a hard disk(A) containing two partitions - A1 is a NTFS partition containing a windows OS, and A2 is an NTFS partition containing data. I want to copy both of these partitions onto a different, ...
0
votes
2answers
444 views

How to execute bash script through pxe boot [closed]

Can any one tell me how to execute bash scripts via pxe boot. What I am trying to do is when Raw Server boots up I want to deploy cloned image over hard disk via PXE boot. I am aware that there are ...
7
votes
1answer
177 views

File is too big for /dev/null

While testing a problem LUN for read errors, I encountered the following problem: find /mnt/problem_lun/ -type f -print -exec dd if={} of=/dev/null bs=8k \; ... /mnt/problem_lun/a_file dd: writing `/...
0
votes
3answers
143 views

Truncate empy space from a raw dd image

I have a raw disk image I took using dd of a Ubuntu instance. The total disk size is 300 GB, but only 5.5 GB used. Is there a way to resize the raw dd image down to 20 GB, keeping all of the 5.5 GB ...
-2
votes
1answer
139 views

Create random file with openssl [closed]

So I read this questionUrandom Alternative, but I am unable to make a comment there (without 50 rep) - therefore I open a separate question: If I use this command instead of dd and urandom, how do I ...
8
votes
3answers
5k 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 ...
2
votes
2answers
103 views

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 ...
15
votes
4answers
2k views

Wipe is very slow. Too little entropy?

I have to hand off a Laptop including its hard disc. Since it was not encrypted I wanted to wipe it at least quickly. I know this is not optimal on SSD, but I thought better than just plain readable. ...
1
vote
1answer
69 views

dd vs. dd pipelined: which is better? [closed]

Here I read, in the comments, that a guy got more performance when used dd in pipeline for a copy. Like for example: dd if=in | dd of=out instead of dd if=in of=out Is it really faster? Why? ...
3
votes
2answers
2k views

In Linux, how can I create thin-provisioned file so it can be mounted and a filesystem created on it?

I am building a system that gives users certain amounts of disk space. The way I am doing it is: create a file with dd create an ext4 filesystem inside the file mount the file and tell the user ...
2
votes
1answer
59 views

Make a dd image restorable to a smaller drive

Suppose I have a 32 GB USB flash drive (UFD) and an 8 GB UFD. I have a 5 GB partition at the start of the bigger UFD, and the rest is unallocated. The problem is to copy the partition and boot sector ...
0
votes
1answer
159 views

Copy LVM volume group spanning two physical volumes on two disks

[update] i have copied the two primary partitions using gparted. now i am stuck trying to copy a single volume because it is made of two physical volumes each on separate disk...ideas? /sda5, /sdb1 = ...
-1
votes
1answer
51 views

The best way to copy OS on RAID10 and lvm partition

I need to backup/clone the entire operating system. The problem is it's 2TB of data on lvm partition and RAID10 (i do not know is it dedicated controller or fake RAID in BIOS. Probably the second ...
0
votes
0answers
313 views

Creating IPsec tunnel Ubuntu 15.04 ip sec tools

I'm trying to setup a VPN/Tunnel between three(3) Ubuntu 15.04 servers. I've googled and it seems that I can use IPsec tools for this. I've only found the following tutorial:https://help.ubuntu.com/...
0
votes
1answer
71 views

Deleted MBR on virtual machine on purpose, but entries are preserved

I'm playing with Master boot record. I decided to delete and restore it on my vmware machine. With Ubuntu LiveCD I'm trying to erase partition entries and signature with command: dd if=/dev/zero of=/...
1
vote
0answers
413 views

Slow IO Performance with PERC H700/710 with current linux distributions

we noticed really bad write performance, on our new Dell R720 with Perc 710. Especially when it come to writing a lot of small files. The funny thing is that this bad performance only occurs on newer ...
1
vote
1answer
512 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 ...
6
votes
3answers
339 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. ...
0
votes
1answer
85 views

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

Remote bash script execution via ssh causes local script to stop

I have a setup which behaves in a way i cannot get my head around. So I have a local bash script generateTrafficOnHosts.sh which reads IP addresses from a file. It then calls a bash script getTraffic....
0
votes
0answers
1k views

Create a VHD file from a Linux disk

I have a disk containing CentOS 5.8 that was removed from a dead box. I would like to make a VHD file from this disk so I can run a virtual machine (instead of a new physical machine). The Virtual ...
4
votes
5answers
862 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 ...
5
votes
3answers
14k 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 if=/the/logical-...
0
votes
1answer
316 views

fio on virtual disk created with dd to stress disk

I am trying to create a script for my coworkers to use in the field that will stress the internal disks to a Linux server. I plan to put some logic in for finding the /dev/sd's available and such. But ...
7
votes
2answers
529 views

How to mount dd image of digital ocean?

I have created a dd image of /dev/vda using the following command: ssh root@1.2.3.4 "dd if=/dev/vda" | dd of=/home/backup/vda.img and I can't mount it on my local Ubuntu server where I ...
0
votes
2answers
727 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 ...
-1
votes
1answer
292 views

How can I resume a dd operation after a “error writing in file” status?

This command produced the error mentioned above after 9 h (preparing a 2 TB hdd for encryption): time openssl enc -aes-256-ctr -pass pass:"$(dd if=/dev/urandom \ bs=128 count=1 2>/dev/null | ...
4
votes
4answers
4k views

Best way to copy large amount of data between partitions

I'm looking to transfer data across 2 lv of an HP-UX server. I have a couple of those transfers to do, some of which are mostly binary (Oracle tablespace...) and some others are more text files (logs.....
22
votes
2answers
9k 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 ...
4
votes
2answers
8k 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 if=...
0
votes
1answer
115 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 ...