Preparing DASDs

After some preparation steps on the host, ECKD DASDs can be used as virtio block devices on virtual server.

Before you begin

  • You need to know the device number of the base device as defined on the storage system and configured in the IOCDS.
  • If you intend to identify the DASD using the device bus-ID (by-path device node) and you intend to migrate the virtual server accessing the DASD, make sure that you use the same IOCDS configuration for the DASD on both the source and the destination host.
  • Make sure that the DASD is accessible, for example by entering the following command:
    # lsdasd -a
    Bus-ID Status Name Device Type BlkSz Size Blocks
    ==============================================================================
    0.0.7500 offline
  • If the PAV or the HyperPAV feature is enabled on your storage system, it assigns unique IDs to its DASDs and manages the alias devices.

About this task

The following publication describes how to configure, prepare, and work with DASDs:
  • Device Drivers, Features, and Commands, SC33-8411

Procedure

The following steps describe a DASD setup on the host that does not persist across host reboots.

For a persistent setup, see your host administration documentation (see also Persistent configuration).

  1. Set the DASD base device and its alias devices online.
  2. Obtain the device node of the DASD.
  3. You need to format the DASD, because the virtual server cannot format DASDs by itself.

    You can use CDL, and LDL formats.

  4. Do not create partitions on behalf of the virtual server.

    Establish a process to let the virtual server user know which virtual block devices are backed up by DASDs, because these devices have to be partitioned using the Linux® command fdasd for CDL formats. The inadvertent use of the fdisk command to partition the device could lead to data corruption.

Example

  1. Set the DASD online using the Linux command chccwdev and the device bus-ID of the DASD.
    For example, for device 0.0.7500, issue:
    # chccwdev –e 0.0.7500
  2. To obtain the DASD name from the device bus-ID, you can use the Linux command lsdasd:
    # lsdasd
    Bus-ID     Status      Name      Device  Type  BlkSz  Size      Blocks
    ==============================================================================
    0.0.7500   active      dasde     94:0    ECKD  4096   7043MB    1803060
    ...
    
    The udev-created by-path device node for device 0.0.7500 is /dev/disk/by-path/ccw-0.0.7500. You can verify this name by issuing:
    # ls /dev/disk/by-path -l
    total 0
    lrwxrwxrwx 1 root root 11 Mar 11:03 ccw-0.0.7500 -> ../../dasde
  3. Format the DASD using the Linux command dasdfmt and the device name.
    # dasdfmt -b 4096 /dev/disk/by-path/ccw-0.0.7500 -p
  4. Establish a procedure to let the virtual server user know which virtual devices are backed by DASDs.

What to do next

Configure the DASDs as described in Configuring a DASD, SCSI, or NVMe disk.