How to find and delete a parent device in aix

Source: Internet
Author: User

In aix, how do I find the parent device and delete the Parent and Child devices of the device? ==================== ========================================================== ===================================1. query the parent device of a device # lsdev-Cl hdisk1hdisk1 Available 01 -08-00 SAS Disk Drive # lsdev-C-l hdisk1-F parentsas0 # lsdev-C-l sas0-F parentsissas0 # lsdev-C-l sissas0-F parentpci0 # lsdev- c-l pci0-F parent sysplanar0 # lsdev-C-l sysplanar0-F parentsys0 # lsdev-C-l sys0-F parent ---- # Lsdev-p pci0sissas0 Available 01-08 PCI-X266 Planar 3 Gb sas raid Adapter # lsdev-p sissas0sas0 Available 01-08-00 Controller SAS Protocolsata0 Available 01- 08-00 Controller SATA Protocol # lsdev-p sas0 hdisk0 Available 01-08-00 SAS Disk Drivehdisk1 Available 01-08-00 SAS Disk Driveses0 Available 01-08-00 SAS Enclosure Services Dev Iceses1 Available 01-08-00 SAS Enclosure Services Deviceses2 Available 01-08-00 SAS Enclosure Services Device --------------------------------------------------------script: for I in 'lsdev-C | awk' {print $1 }''; do DEV = $ I PARENT = 'lsdev-F parent-Cl $ DEV 'STRING = $ PARENT "" $ DEV while [aaa $ PARENT! = Aaa]; do DEV = $ PARENT = 'lsdev-F parent-Cl $ DEV 'STRING = $ PARENT "" $ STRING done echo $ STRING done | sort

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.