Detaching the disk from the z/VM guest
Before you create the DD image, safely detach the FCP disk from the z/VM guest and attach it to the management server.
Before you begin
Ensure that you have:
- Root access to the z/VM guest
- Sufficient z/VM privileges to detach and attach devices
- Access to a z/VM host using a x3270 terminal or vmcp commands
About this task
This phase prepares the z/VM guest disk for migration by safely shutting down the guest and transferring disk ownership to the management server.
Procedure
-
Shut down the z/VM guest to ensure data integrity by running the following command:
shutdown -h nowImportant: Wait for the guest to fully shut down before proceeding. -
Detach the FCP disk from the source guest.
Use one of the following methods:
- On the z/VM host using a x3270 terminal, run the following command:
cp detach device_address from guest_name - On the management z/VM guest, run the following command:
vmcp detach device_address from guest_name
Parameters:
- device_address: The FCP device address. For example: 1000.
- guest_name: The z/VM guest name. For example: GUEST001.
- On the z/VM host using a x3270 terminal, run the following command:
-
Attach the FCP disk to your z/VM management server
Use one of the following methods:
- On the z/VM host using a x3270 terminal, run the following command:
cp attach device_address to management_server_guest_name - On the management z/VM guest, run the following command:
vmcp attach device_address to management_server_guest_name
Parameters:
- device_address: The FCP device address. For example: 1000.
- management_server_guest_name: The z/VM management server guest name. For example: GUEST002.
- On the z/VM host using a x3270 terminal, run the following command:
-
Make the attached FCP disk available to the operating system on the management server.
Set the FCP device online for each path:
chzdev -e device_IDExample for multiple paths:
chzdev -e 0.0.800b:0x500507630400d1e3:0x4001409100000000 chzdev -e 0.0.800b:0x500507630408d1e3:0x4001409100000000 chzdev -e 0.0.810b:0x500507630408d1e3:0x4001409100000000 chzdev -e 0.0.810b:0x500507630400d1e3:0x4001409100000000Parameters:
- device_ID: The FCP device address. For example: 0.0.800b:0x500507630400d1e3:0x4001409100000000.
-
Verify that the device is online by running the following command:
lszdevExample output:
TYPE ID ON PERS NAMES zfcp-host 0.0.800a yes yes zfcp-host 0.0.800b yes yes zfcp-host 0.0.810a yes yes zfcp-host 0.0.810b yes yes zfcp-lun 0.0.800a:0x500507630400d1e3:0x4001409000000000 yes yes sdd sg3 zfcp-lun 0.0.800a:0x500507630408d1e3:0x4001409000000000 yes yes sdc sg2 zfcp-lun 0.0.800b:0x500507630400d1e3:0x4001409100000000 yes yes sdf sg5 zfcp-lun 0.0.800b:0x500507630408d1e3:0x4001409100000000 yes yes sde sg4 zfcp-lun 0.0.810a:0x500507630400d1e3:0x4001409000000000 yes yes sda sg0 zfcp-lun 0.0.810a:0x500507630408d1e3:0x4001409000000000 yes yes sdb sg1 zfcp-lun 0.0.810b:0x500507630400d1e3:0x4001409100000000 yes yes sdh sg7 zfcp-lun 0.0.810b:0x500507630408d1e3:0x4001409100000000 yes yes sdg sg6 qeth 0.0.bdf0:0.0.bdf1:0.0.bdf2 yes yes encbdf0 generic-ccw 0.0.0009 yes no -
Verify that the multipath device is available by running the following command:
multipath -llExample output:
mpatha (36005076304ffd1e30000000000000190) dm-0 IBM,2107900 size=500G features='1 queue_if_no_path' hwhandler='1 alua' wp=rw `-+- policy='service-time 0' prio=50 status=active |- 1:0:2:1083195393 sda 8:0 active ready running |- 1:0:0:1083195393 sdb 8:16 active ready running |- 0:0:0:1083195393 sdc 8:32 active ready running `- 0:0:2:1083195393 sdd 8:48 active ready running mpathb (36005076304ffd1e30000000000000191) dm-2 IBM,2107900 size=50G features='1 queue_if_no_path' hwhandler='1 alua' wp=rw `-+- policy='service-time 0' prio=50 status=active |- 2:0:0:1083260929 sde 8:64 active ready running |- 2:0:2:1083260929 sdf 8:80 active ready running |- 3:0:1:1083260929 sdh 8:112 active ready running `- 3:0:3:1083260929 sdg 8:96 active ready runningThe FCP disk should now appear as a multipath device (for example, /dev/mapper/mpathb) on the management server.