Linux on Power 里如何删除光驱?

在power上装了一个suse11 on power, 是通过VIO把光驱分给这个lpar,然后安装的。。但是安装后如何在suse里删除光驱呢? 想通过VIO再把光驱分给别的LPAR....

如果是aix的client,我知道怎么删除。。。但是suse这个第一次装。。。不会了。。。。

作者: niannian   发布时间: 2011-11-18

我是这么分配的光驱
1. 先在VIO里创建一个VSCSI。
2. 在client里创建VSCSI,和VIO的这个对应起来
3. 在VIO里, mkvdev -vdev cd0 -vadapter vhostXXX -dev cd0
之前装AIX的客户机之后,在client里找到对应光驱的那个scsi设备,rmdev掉,然后在VIO里cfgdev就可以把光驱找回来再分配给别的LPAR了

但是SUSE里不知道咋弄了。。。

作者: niannian   发布时间: 2011-11-18



这个是针对DLPAR的。。。不太符合VIOS环境~~

The Linux IDE device interface for CD/DVD ROM does not support hot swapping. Therefore, it cannot be used for dynamic LPAR changes to an IDE CD/DVD ROM drive. However, recent support in the Linux Parallel ATA (PATA) and libATA modules can be used to support an IDE CD/DVD ROM drive as a dynamic LPAR device. With this support, the IDE CD/DVD ROM appears to Linux as an SCSI device. This support is included with SLES9 Service Pack 2.

Linux Parallel ATA (PATA) and libATA modules can be used to support an IDE CD/DVD ROM drive as a dynamic LPAR device. With this support, the IDE CD/DVD ROM appears to Linux as an SCSI device.

To use the dynamic LPAR IDE CD/DVD ROM support, the pata_pdc2027x module must be installed as an INITRD module. In the file /etc/sysconfig/kernel, add pata_pdc2027x to the beginning of the INITRD_MODULES

## Path: System/Kernel
## Description:
## Type: string
## Command:     /sbin/mkinitrd
#
# This variable contains the list of modules to be added to the
# initial ramdisk by calling the script "mk_initrd"
# (like drivers for scsi-controllers, for lvm or reiserfs)
#
INITRD_MODULES="pata_pdc2027x ibmvscsic"

Now use the /sbin/mkinitrd command to create initrd, and then reboot.
# mkinitrd
# shutdown -r now

The loaded modules can be examined for the pata_pdc2027x and libATA modules with the lsmod command:
The drive adapter is listed on HMC I/O adapter lists as an Other Mass Storage Controller.

To examine the partition’s PCI devices after adding the CD/DVD ROM drive adapter, use the lspci command:
# lspci
0000:00:02.3 PCI bridge: IBM EADS-X PCI-X to PCI-X Bridge (rev 03)
0000:cc:01.0 Unknown mass storage controller: Promise Technology,
Inc. 20275 (rev 01)

To find the SCSI device name for the CD/DVD ROM drive, use the lsscsi command to list all SCSI devices, and use grep to find cd/dvd:
# lsscsi | grep cd
[1:0:0:0]    cd/dvd  IBM     RMBO0020501    H106  /dev/sr0

Now use the mount command to mount the SCSI device with the file system type iso9660 as read-only to /media/cdrom:
# mount -t iso9660 -r /dev/sr0 /media/cdrom

When the DVD/CD ROM drive is no longer needed by the partition, unmount the /media/cdrom directory and use the HMC to remove the "Other Mass Storage Controller" I/O adapter.

作者: 咔叮枫情   发布时间: 2011-11-18