Topic
4 replies Latest Post - ‏2009-04-21T11:50:29Z by SystemAdmin
SystemAdmin
SystemAdmin
63 Posts
ACCEPTED ANSWER

Pinned topic How to discover a virtualized DVD added to a Linux partition?

‏2008-06-06T12:18:24Z |
On RHEL 5.1 virtualized on a Power partition, there are
a Linux RedHat RHEL 5.1 partition and others
virtualized AIX partitions installed on the same system.

There is only one DVD reader on the machine that
we would use either on AIX or Linux alternatively.

On an AIX partition it is possible to take the DVD
using the AIX command "cfgmgr" and release it
with the "rmdev" command.

We would like to do the same thing on Linux.
If the DVD is affected to the RHEL partition by the HMC before the Linux boot,
at boot time, the DVD is seen and works right.
We would like to discover the DVD when it is affected to the Linux partition
when the machine runs normally, and would like to know
the commands and actions to use the DVD normally.

Thanks for your help,
Christian MOLLARD
Christian-A.Mollard@bull.net
Updated on 2009-04-21T11:50:29Z at 2009-04-21T11:50:29Z by SystemAdmin
  • Brian_King
    Brian_King
    3 Posts
    ACCEPTED ANSWER

    Re: How to discover a virtualized DVD added to a Linux partition?

    ‏2008-06-06T18:38:13Z  in response to SystemAdmin
    You can use sysfs to accomplish the tasks similar to cfgmgr/rmdev.

    To add a device after boot:

    echo "- - -" > /sys/class/scsi_host/host0/scan

    To remove the device (assuming the device is /dev/sr0):

    echo 1 > /sys/block/sr0/device/delete

    Brian King
  • SystemAdmin
    SystemAdmin
    63 Posts
    ACCEPTED ANSWER

    Re: How to discover a virtualized DVD added to a Linux partition?

    ‏2008-06-10T15:16:31Z  in response to SystemAdmin
    Thanks for your advice.
    It works right on some configurations.

    On another ones, if the Linux partition is booted without DVD reader
    the directory hosts0 in /sys/class/scsi_host
    does not exists.

    Then, adding the DVD reader through the VIO does not create the directory.
    I try also to use kudzu to force the discovery of the new hardware,
    without success...

    Of course, if the directory /sys/class/scsi_host/hosts0
    is not created, the instruction
    echo "- - -" > /sys/class/scsi_host/host0/scan
    does not work.

    When the Linux partition is booted with a DVD reader,
    the directory /sys/class/scsi_host/host0 is present.

    Do you know a way to force the "host" directory creation
    when a new virtual piece of hardware is added?

    Thanks for your help,
    Christian MOLLARD
    Christian-A.Mollard@bull.net
    • Brian_King
      Brian_King
      3 Posts
      ACCEPTED ANSWER

      Re: How to discover a virtualized DVD added to a Linux partition?

      ‏2008-06-10T17:38:29Z  in response to SystemAdmin
      There could be a couple of things going on here:

      1. If you boot the Linux partition without the VIO adapter assigned to the partition, and then dynamically add the virtual scsi adapter, you will need to have the Linux on POWER Hardware diagnostic aids and productivity tools installed. They are available from this web site: https://www14.software.ibm.com/webapp/set2/sas/f/lopdiags/home.html

      2. The other possibility is that there is a different SCSI configuration on the other partitions and you would need to determine the correct scsi host # to use rather than 0. If you are adding/removing the virtual scsi adapter which controls the DVD device, the host # will increment each time you add the virtual adapter back to the running partition.
  • SystemAdmin
    SystemAdmin
    63 Posts
    ACCEPTED ANSWER

    Re: How to discover a virtualized DVD added to a Linux partition?

    ‏2009-04-21T11:50:29Z  in response to SystemAdmin
    Hi, I am trying to DLPAR in RedHat Linux 5.2 on Power 6.
    I was able to add what is on adapter sissas0 (CD/DVD and internal DAT160 tape drive)
    But I am unable to DLPAR out of Linux and get the error :
    DLPAR REMOVE I/O resources failed: The I/O slot dynamic logical partitioning operation failed. Here are the I/O Slot IDs that failed and the reasons for failure:
    1. Apr 21 23:43:24 2009 ########## : kernel remove failed for PHB 512, rc = -16 U789C.001.DQDF527-P1-T9 (21010200)

    It seems I need to remove the devices /dev/cdrom (which I was able to do with (but can't remember command that did it)), but it seems I still need to do the tape drive ?
    Any help will be much appreciated!