Monday, October 5, 2015

Linux. Удаление multipath диска без перезагрузки


  1. Смотрим какие multipath диски подключены
    multipath -ll
    [root@Inspur5280M4 home]# multipath -ll
    Jul 28 15:59:31 | multipath.conf line 32, duplicate keyword: defaults
    mpathj (360080e50001fa3f0000016e155b7293f) dm-5 LSI,INF-01-00
    size=1.4T features='4 queue_if_no_path pg_init_retries 50 retain_attached_hw_handle' hwhandler='1 rdac' wp=rw
    |-+- policy='round-robin 0' prio=14 status=active
    | `- 2:0:0:2 sdh 8:112 active ready  running
    `-+- policy='round-robin 0' prio=9 status=enabled
      `- 1:0:0:2 sdd 8:48  active ready  running
    mpathi (360080e50001fa3f0000016e055b72912) dm-4 LSI,INF-01-00
    size=1.4T features='4 queue_if_no_path pg_init_retries 50 retain_attached_hw_handle' hwhandler='1 rdac' wp=rw
    |-+- policy='round-robin 0' prio=14 status=active
    | `- 2:0:0:0 sdf 8:80  active ready  running
    `-+- policy='round-robin 0' prio=9 status=enabled
      `- 1:0:0:0 sdb 8:16  active ready  running
    mpathh (360080e50001ff11c00000f6955b72924) dm-3 LSI,INF-01-00
    size=1.4T features='4 queue_if_no_path pg_init_retries 50 retain_attached_hw_handle' hwhandler='1 rdac' wp=rw
    |-+- policy='round-robin 0' prio=14 status=active
    | `- 1:0:0:1 sdc 8:32  active ready  running
    `-+- policy='round-robin 0' prio=9 status=enabled
      `- 2:0:0:1 sdg 8:96  active ready  running
    mpathg (360080e50001ff11c00000f6a55b7293d) dm-2 LSI,INF-01-00
    size=1.4T features='4 queue_if_no_path pg_init_retries 50 retain_attached_hw_handle' hwhandler='1 rdac' wp=rw
    |-+- policy='round-robin 0' prio=14 status=active
    | `- 1:0:0:3 sde 8:64  active ready  running
    `-+- policy='round-robin 0' prio=9 status=enabled
      `- 2:0:0:3 sdi 8:128 active ready  running
  2. Удаляем нужные multipath диски
    multipath -f mpathj
  3. Удаляем разделы, созданные для каждого пути multipath диска
    echo 1 > /sys/block/sdh/device/delete
    echo 1 > /sys/block/sdd/device/delete
  4. Все

No comments:

Post a Comment