Multipath device unpresented to host. How to delete it from LVM and the system?

17,553

I don't know if this holds true for RHEL4, as I've only tried it on newer OS:es, but

To delete the mpath device;

multipath -f mpath10 

to remove a block device from the linux OS, run a

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

When the mpath device is gone, pvdisplay will no longer complain if that's where the pv is.

Share:
17,553

Related videos on Youtube

Alex G.Q.
Author by

Alex G.Q.

Updated on September 18, 2022

Comments

  • Alex G.Q.
    Alex G.Q. almost 2 years

    OS: Red Hat Enterprise Linux AS release 4

    Storage people had unpresented a couple of disks previously exported to the system (things that... sometimes happens). Well, there is no problem with this because that disk were empty and data was migrated to other PV's. The problem is that the devices were removed without the previously remove process in the system.

    How can i delete that missing disks from whole system?

    multipath -ll:

    mpath10 (350002ac01bde0e96)
    [size=50 GB][features="0"][hwhandler="0"]
    \_ round-robin 0 [enabled]
     \_ 0:0:1:2 sdf  8:80   [failed][faulty]
     \_ 0:0:2:2 sdk  8:160  [failed][faulty]
     \_ 1:0:0:2 sdp  8:240  [failed][faulty]
     \_ 1:0:2:2 sdx  65:112 [failed][faulty]
    

    pvdisplay:

    /dev/dm-9: read failed after 0 of 4096 at 53687025664: Input/output error
    /dev/dm-9: read failed after 0 of 4096 at 53687083008: Input/output error
    /dev/dm-9: read failed after 0 of 4096 at 0: Input/output error
    /dev/dm-9: read failed after 0 of 4096 at 4096: Input/output error
    /dev/dm-9: read failed after 0 of 4096 at 0: Input/output error
    

    Thanks in advance and, please, excuse me for my english

    • Alex G.Q.
      Alex G.Q. almost 11 years
      Al system works OK and all VG's in the system are OK, so, it seems that that disks only remains "mapped" in low level LVM config and in multipath. I know how to remove the devices from multipath (multipath -f <device>) but i think that them won't be deleted from LVM.
  • Alex G.Q.
    Alex G.Q. almost 11 years
    and with a vgscan after all in order to rebuild all vg/lv with courrent hardware? :)
  • Petter H
    Petter H almost 11 years
    LVM reads disk labels to figure out which devices contain pv:s. Once the devices are gone, lvm won't have any disks to fail reading them from. I suppose you could do a vgchange -a n <name_of_errorvg> before you remove the devices.
  • c4f4t0r
    c4f4t0r over 10 years
    vgreduce is missing for lvm part