0

I have a server with an Openstack deployment on top. I've created an instance with a 10 Gb volume and an ubuntu image.

I would like to copy the volume manually using dd in order to analyze it. The volumes are supposed to be located in /dev with the names dm-x, where x is a number and the ID for each volume can be identified to the instance it belongs to from the Openstack dashboard and looking into the symlink in /dev/stack-volumes-lvmdriver1-id.

Well, once I've dd'd the desired dm-x into a folder in my home directory, I obtain a DOS/MBR file but, shouldn't it be a logical volume?

Thanks in advance.

berndbausch
  • 869
  • 10
  • 18
Tony
  • 1
  • 1
    This question is off-topic for Stackoverflow, but it can be answered quickly. A logical volume is a device file. The only way you can create a device file is with the `mknod` command. `dd` only copies data from one file to another; if the target file doesn't exist, `dd` creates a regular file. If you need a device file, use `losetup` to create a loop device. – berndbausch Apr 21 '21 at 13:56
  • So to create a copy of the device can i just create a new logical volume and clone it using mknod and losetup? – Tony Apr 22 '21 at 07:51
  • You don't need a logical volume. `losetup -f FILENAME` will create a device named `/dev/loopX`, where FILENAME is the name of the file you created with `dd`, and X is a number. – berndbausch Apr 22 '21 at 08:27

0 Answers0