3

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.
  • 33
  • 1
  • 1
  • 3
  • 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 ) but i think that them won't be deleted from LVM. – Alex G.Q. Aug 09 '13 at 06:34

1 Answers1

3

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.

Petter H
  • 3,443
  • 1
  • 16
  • 19
  • and with a vgscan after all in order to rebuild all vg/lv with courrent hardware? :) – Alex G.Q. Aug 09 '13 at 08:31
  • 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 ` before you remove the devices. – Petter H Aug 09 '13 at 08:57
  • vgreduce is missing for lvm part – c4f4t0r Feb 24 '14 at 16:24