I have used following command to create an image of mounted partition sda1:

dd if=/dev/sda1 of=/dev/sdb1 'conv=noerror,sync'

where sda1 is the one I want to "backup" and sdb1 is obviously target, but documentation was not very clear, and I should have used also filename, such as image.iso

What happened, I got message files copied or something like that and after reboot, I get into emergency mode and I cant see mounted partition /data which was there before.

I am not quite sure what I have done but when I enter cd /data/ I get in, so it must exist, but I can't see it when I do lsblk.

Structure or all partitions after running lsblk command is this:

   **-lvm--group1-data** this one is not here anymore and it was before running dd command

Is there a way how to get it back somehow? What did I actually do? Why is only data not here and not the entire sdb1 partition?

  • Do you have a file called /etc/lvm/backup/lvm-group1? Does it still reference data? – Stephen Kitt Oct 2 '18 at 9:56
  • I do, and it does not. There is no /data at all. – Ady96 Oct 2 '18 at 10:34
  • Is it possible that disks got swapped? Because now I realized that sda had 1.9GB and sdb had 60GB and now it is swapped. Because I remember sdb1 had mounted \data. – Ady96 Oct 2 '18 at 10:51
  • You 'copied' the partition. What you really did was clone the partition. The unique UUID number for the partition is now in two places, no longer unique. Your boot loader may be getting confused and trying to use the clone. – jc__ Oct 4 '18 at 16:08
  • When you cloned the partition to sdb, was the partition table on sdb ready to see the new partition as it is? Most likely not. Also the disk identifiers sda and sdb may change where it points to on each boot. – jc__ Oct 4 '18 at 16:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.