Select Your Language

Infrastructure and Management

Cloud Computing

Storage

Runtimes

Integration and Automation

  • Comments
  • rmdev command

    Posted on

    AIX has a great command: rmdev.

     

    Very useful to remove lun or disks before detach them. Reading the "Online storage guide" i made a script to do somethink like:

     

    #!/bin/bash

    # multipath -ll $1 not always works!!
    WWID=`multipath -ll | grep -e "^$1 " | awk '{ print $2 }' | tr -d \( | tr -d \)`
    multipath -ll $WWID > /tmp/"$1".txt

    echo multipath -f $1
    echo
    cat /tmp/"$1".txt | grep active | grep ready | awk '{ print $3 }' | while read I;do echo blockdev --flushbufs /dev/$I;done
    echo
    cat /tmp/"$1".txt | grep active | grep ready | awk '{ print $3 }' | while read I;do echo echo 1 \> /sys/block/$I/device/delete ;done
    echo
    echo vi /etc/multipath.conf
    echo
    echo /etc/init.d/multipathd restart

     

    It's very stupid, only shows command to execute but it simplify my life when I work with many luns with many path.

     

    AIX "rmdev -dl" command is much better.

     

    The same problem is present when we have to resize a lun.

    I think some utilities to do basic operations on SAN lun's should be provided with an ENTERPRISE system like RHEL.

    by

    points

    Responses

    Red Hat LinkedIn YouTube Facebook X, formerly Twitter

    Quick Links

    Help

    Site Info

    Related Sites

    © 2025 Red Hat