Create a disk image from the multipath device using the dd command.
Before you begin
Ensure that you have:
- The FCP disk attached and available as a multipath device on the management server
- Sufficient storage space for the DD image (at least the size of the source disk)
- Root access on the management server
About this task
This phase creates a raw disk image from the z/VM disk that can be converted to QCOW2 format for use in OpenShift Virtualization.
Procedure
-
Identify the multipath device by running the following command:
-
Check device information by running the following commands:
lsblk /dev/mapper/mpathb
fdisk -l /dev/mapper/mpathb
Example output:
Disk /dev/mapper/mpathb: 50 GiB, 53687091200 bytes, 104857600 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x647dac19
Device Boot Start End Sectors Size Id Type
/dev/mapper/mpathb1 2048 9766911 9764864 4.7G 83 Linux
/dev/mapper/mpathb2 9766912 97656831 87889920 41.9G 83 Linux
-
Create the DD image.
Use the dd command to create a raw disk image:
dd if=/dev/mapper/mpathb of=image_name.img bs=4M status=progress conv=sync,noerror
Parameters:
- if: Input file (source multipath device)
- of: Output file (destination image file)
- bs: Block size (optional, improves performance)
- status=progress: Display progress information
- conv=sync,noerror: Optional error handling (do not stop on errors, fill with zeros)
Tip: The bs=4M parameter improves performance by using larger block sizes. The conv=sync,noerror parameter ensures the operation continues even if read errors occur, filling bad sectors with zeros.
Results
A raw disk image file is created that contains a complete copy of the z/VM disk, including all partitions and data.