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
5
votes
2 answers

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 to server? Another question that relates is what…
Daniel Sikes
  • 151
  • 1
  • 4
5
votes
1 answer

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 larger capacity) using dd, preferably in a single…
MadHatter
  • 79,770
  • 20
  • 184
  • 232
5
votes
3 answers

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 program to use the mountpoint as its working…
Erin Drummond
  • 225
  • 4
  • 8
5
votes
4 answers

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 [<111.29 GiB / 13.87 GiB free] PV /dev/sdb3 VG pve…
5
votes
3 answers

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 corrected the problem, this isn't really a question…
Christopher Schultz
  • 1,105
  • 2
  • 12
  • 22
4
votes
1 answer

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 list the drive as only having 2GB free. Is this a…
user30569
4
votes
1 answer

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 problem, but after the buffer reaches a special…
user219392
  • 73
  • 1
  • 8
4
votes
1 answer

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 getting a speed of about 11 MB/s about an hour…
user2284355
  • 455
  • 2
  • 10
  • 24
4
votes
3 answers

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 this image as a replacement PV though. The steps…
Niklas K.
  • 51
  • 3
4
votes
1 answer

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 downtimes. The only tool I know that can do this is…
Chris
  • 143
  • 4
4
votes
3 answers

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 partition, it just STOPs and gives the following…
4
votes
2 answers

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 space. if I understand correctly how dd works the…
ndp
  • 205
  • 1
  • 8
4
votes
1 answer

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 15Krpm RAID10 stripe 16k (ext4 bs 4096, no barriers)…
César
  • 76
  • 1
  • 4
4
votes
4 answers

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 drive in my computer before it became completely…
Ormis
  • 141
  • 5
4
votes
2 answers

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 the sum of the partitions in the…
Tauren
  • 739
  • 4
  • 14
  • 24
1 2
3
13 14