Questions tagged [dd]

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

Filter by
Sorted by
Tagged with
236 votes
29 answers
613k 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 ...
falstro's user avatar
  • 2,775
92 votes
2 answers
186k 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 ...
Damiano Verzulli's user avatar
61 votes
8 answers
191k 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 (...
Jonathan Henson's user avatar
28 votes
9 answers
33k 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?
Evgeny's user avatar
  • 599
22 votes
3 answers
9k views

Securely wipe an entire Linux server with itself

I have remote ssh access and root access. I do not have physical access. I'm not looking for solutions involving booting into anything, I want to do this from what is currently running. OS is SL6. ...
cat pants's user avatar
  • 2,293
16 votes
4 answers
5k 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. ...
user857990's user avatar
15 votes
6 answers
48k 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-...
Nick's user avatar
  • 4,656
15 votes
2 answers
19k 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 = ...
modest's user avatar
  • 251
13 votes
1 answer
14k views

combine partitions to one disk image

I have 3 images. Each image was done by cloning (by dd) a partition (these partitions formatted using ext3 file system). One partition is boot-able with GRUB1 (CentOS) How can I combine them to one ...
Dima's user avatar
  • 485
12 votes
2 answers
32k 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=backup....
NSPKUWCExi2pr8wVoGNk's user avatar
12 votes
6 answers
17k 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 ...
Matthew's user avatar
  • 2,747
11 votes
4 answers
5k views

Linux / BSD "quickly" wipe a USB drive?

I'm clearing a drive with dd. It's a USB device and 120GB and it's taking a very long time: dd if=/dev/zero of=/dev/da0 bs=1M status=progress I have tried messing with the block size (smaller and ...
Rino Bino's user avatar
  • 603
11 votes
6 answers
24k 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. ...
lfaraone's user avatar
  • 1,621
9 votes
2 answers
6k views

How can I split a drive image created with 'dd' into separate files for each partition?

I created an image of a failing drive with: dd if=/dev/sde of=/mnt/image001.dd The drive had only two partitions: Device Boot Start End Blocks Id System /dev/sde1 * ...
Joe A's user avatar
  • 300
9 votes
3 answers
17k views

Why is Clonezilla faster than dd?

On my SSD imaging (Source and Destination are 2 SSDs) I get 12GBpm using CloneZilla while with dd I get only 5GBpm. What makes Clonezilla so much faster than dd?
Lelouch Lamperouge's user avatar
9 votes
4 answers
8k 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.....
skinp's user avatar
  • 789
8 votes
5 answers
4k 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 ...
AL-Kateb's user avatar
  • 341
8 votes
2 answers
12k 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 ...
Jaap Haagmans's user avatar
8 votes
2 answers
6k views

Mount dd image with multiple partitions

I have created an image of a disk using dd using the command dd if=/dev/sdb of=/jobs/image.dd. The SATA drive /dev/sdb has 3 partitions on it (one NTFS, two FAT32). How do I mount the complete image ...
Luke Bibby's user avatar
8 votes
2 answers
2k views

How to mount dd image of digital ocean?

I have created a dd image of /dev/vda using the following command: ssh [email protected] "dd if=/dev/vda" | dd of=/home/backup/vda.img and I can't mount it on my local Ubuntu server where I transferred ...
Debrian's user avatar
  • 154
7 votes
1 answer
761 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 `/...
Zogratz's user avatar
  • 79
6 votes
7 answers
5k views

How can I know if netcat & dd are working?

I'm running on server A (Source): dd bs=16M if=/dev/sda|bzip2 -c|nc serverB.example.net 19000 On server B (Destination): nc -l -p 19000|bzip2 -d|dd bs=16M of=/dev/sdb Do I need to see some ...
soulSurfer2010's user avatar
6 votes
2 answers
4k views

Does it involve network to copy a file within a NFS share? [closed]

I am assuming the following ways to copy a file with in a NFS share: Process 1: The client requests for the data to be copied from NFS share (if cache is not there) and the chunks of data are ...
GP92's user avatar
  • 751
6 votes
2 answers
20k views

LVM -> dd -> LVM?

I've 'cloned' a LVM partition using dd over ssh to a remote server(emergency backup...). On that remote server, is it possible to 'transform' the dd cloned file back into a LVM partition? Thanks. ...
Mihai B.'s user avatar
  • 118
6 votes
3 answers
2k 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. ...
harry's user avatar
  • 61
6 votes
1 answer
6k 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 ...
pavon's user avatar
  • 363
6 votes
2 answers
10k views

Mounting a linux image built with "dd" on Mac OSX 10.7 [closed]

I recently did a ssh root@myserver "dd if=/dev/xvda " | dd of=/<localpath>/myimage.img as instructed by my VPS server docs at linode. I did this before to another linux system and mounted it ...
frazras's user avatar
  • 193
5 votes
4 answers
2k views

Cloning data from a damaged SSD

The SSD went into read-only mode, so you need to move the partition to a working SSD, but I encountered the fact that the LVM size is different: #lvm pvscan PV /dev/sdc3 VG pve lvm2 [&...
Джон Смит's user avatar
5 votes
3 answers
5k 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 ...
Erin Drummond's user avatar
5 votes
3 answers
845 views

Best way to remove text from the beginning of a huge file

I have a huge MySQL backup file (from mysqldump) with the tables in alphabetical order. My restore failed and I want to pick up where I left off with the next table in the backup file. (I have ...
Christopher Schultz's user avatar
5 votes
1 answer
3k views

Experiences with using `dd` to copy multi-partition, multi-FS device

I have a disc with several partitions on, each of which has a different kind of file system (ext3, ext4, and, let's say, NTFS). I want to know if I can copy the whole disc to a new one (which is of ...
MadHatter's user avatar
  • 80.6k
5 votes
4 answers
32k 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 ...
Manuel's user avatar
  • 61
5 votes
2 answers
6k 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 ...
Daniel Sikes's user avatar
5 votes
1 answer
2k 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 ...
Hameer Abbasi's user avatar
5 votes
2 answers
2k 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 ...
FriendlyBystander's user avatar
4 votes
1 answer
4k views

Restoring a smaller partition image to larger partition using dd

I recently backed up an 11GB ext4 partition to a file using dd, repartitioned, and restored the file to a 40GB partition. parted now shows the partition as 40GB, Nautilus reads it as 11GB, and both ...
user avatar
4 votes
1 answer
1k views

Backup root partition with dd without downtime

Is there a way to remount / as read-only and buffer new writes in RAM, so can backup the / media with dd? I want to create a bootable image from my SoHo-Server (Debian 6) without a live cd or any ...
Chris's user avatar
  • 143
4 votes
1 answer
4k 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 ...
user219392's user avatar
4 votes
1 answer
8k 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 ...
user2284355's user avatar
4 votes
3 answers
1k 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 ...
Niklas K.'s user avatar
4 votes
3 answers
2k views

Recovering with DDRescue Cannot Complete (write error: Read-only file system)

I'm trying to recover a corrupt VDI using vdfuse to mount the VDI and using dd_rescue to rescue the borked partition. dd_rescue seems to be working fine but once it reached about half of the ...
RyanScottLewis's user avatar
4 votes
2 answers
903 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 ...
ndp's user avatar
  • 205
4 votes
1 answer
3k views

dd oflag=direct 5x fast

I have Centos 6.2 in server with this specs: 2xCPU 16 Core AMD Opteron 6282 SE 64GB RAM Raid controller H700 1GB cache NV - 2HD 74GB SAS 15Krpm RAID1 stripe 16k (OS Centos 6.2) sda - 4HD 146GB SAS ...
César's user avatar
  • 76
4 votes
2 answers
15k views

How to copy KVM disk image to LVM

Problem I'm getting a No space left on device error when doing a dd command. I'm trying to move a KVM qcow2 file to an LVM partition and thought that the LVM partition needed to be the same size as ...
Tauren's user avatar
  • 749
4 votes
4 answers
559 views

IDE compatability with SATA image

We had an old CNC machine's hard-drive fail recently. The hard-drive is an old 1275MB IDE (Seagate) and there were defiantly bad sectors on it. I was able to image the contents of the drive onto a ...
Ormis's user avatar
  • 141
3 votes
5 answers
10k views

Creating a 80GB image with dd on a FAT32 drive

I have a question concerning the creation of an drive image with dd. Normally i would simply type: "dd if=/dev/foo of=/dev/bar". But in this case i only have a fat32 formatted drive at hand, which ...
Darokthar's user avatar
  • 133
3 votes
3 answers
2k 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.
Osama ALASSIRY's user avatar
3 votes
2 answers
562 views

How to view a full disk data (more than one partition) cloned with dd

I've a disk image done with dd: dd if=/dev/sda of=/mnt/fulldisk.img /dev/sda have some partitions (Windows+Linux) My problem is: I need to know if the image is done well, how can I access data? (...
Ferran's user avatar
  • 31
3 votes
2 answers
3k views

Monitor Disk I/O Using DD

I've bee looking into the possibility that my server is experiencing a lot of iowait issues. I've found a lot online about running the dd command. I am unable to run this conv: [root@vps ~]# dd if=/...
noidea's user avatar
  • 31
3 votes
2 answers
3k views

Can't dd /dev/kmem in Ubuntu Jaunty

I am keen to dump the contents of physical RAM into a flat file on my Ubuntu box but all I get is a 1MB file using dd (Which is odd as I have 4GB of RAM!). The command I am using is dd if=/dev/mem of=...
Luke Bibby's user avatar

1
2 3 4 5