Bagaimana mendisable salah satu path multipath

June 13, 2013

Berikut adalah cara yang saya lakukan untuk melakukan testing apakah multipath sudah bekerja dengan baik.
Caranya adalah dengan mendisable salah satu pathnya, dan lihat apakah filesystem masih bisa diakses.

Melihat semua path yang ada:

[root@dudulz-box ~ ]# multipath -ll
mpath2 (360060e801604750000010475000041ee) dm-13 HP,OPEN-V
[size=100G][features=1 queue_if_no_path][hwhandler=0][rw]
\_ round-robin 0 [prio=2][active]
\_ 0:0:0:2 sdc 8:32 [active][ready]
\_ 3:0:0:2 sdf 8:80 [active][ready]
mpath0 (360060e801604750000010475000041ec) dm-11 HP,OPEN-V
[size=100G][features=1 queue_if_no_path][hwhandler=0][rw]
\_ round-robin 0 [prio=2][active]
\_ 0:0:0:0 sda 8:0 [active][ready]
\_ 3:0:0:0 sdd 8:48 [active][ready]
mpath1 (360060e8016047500000104750000019b) dm-12 HP,OPEN-V
[size=100G][features=1 queue_if_no_path][hwhandler=0][rw]
\_ round-robin 0 [prio=2][active]
\_ 0:0:0:1 sdb 8:16 [active][ready]
\_ 3:0:0:1 sde 8:64 [active][ready]

Lihat status salah satu path dari multipath diatas:

[root@dudulz-box ~ ]# cat /sys/block/sdc/device/state
running

Disable salah salah satu path “sdc”

[root@dudulz-box ~ ]# echo offline > /sys/block/sdc/device/state

[root@dudulz-box ~ ]# cat /sys/block/sdc/device/state
offline

Lihat status multipath setelah didisable, statusnya telah berubah menjadi failed.
Setelah itu coba cek apakah filesystem masih bisa diakses.

[root@dudulz-box ~ ]# multipath -ll
mpath2 (360060e801604750000010475000041ee) dm-13 HP,OPEN-V
[size=100G][features=1 queue_if_no_path][hwhandler=0][rw]
\_ round-robin 0 [prio=1][active]
\_ 0:0:0:2 sdc 8:32 [failed][faulty]
\_ 3:0:0:2 sdf 8:80 [active][ready]
mpath0 (360060e801604750000010475000041ec) dm-11 HP,OPEN-V
[size=100G][features=1 queue_if_no_path][hwhandler=0][rw]
\_ round-robin 0 [prio=2][active]
\_ 0:0:0:0 sda 8:0 [active][ready]
\_ 3:0:0:0 sdd 8:48 [active][ready]
mpath1 (360060e8016047500000104750000019b) dm-12 HP,OPEN-V
[size=100G][features=1 queue_if_no_path][hwhandler=0][rw]
\_ round-robin 0 [prio=2][active]
\_ 0:0:0:1 sdb 8:16 [active][ready]
\_ 3:0:0:1 sde 8:64 [active][ready]

Enable kembali pathnya:

[root@dudulz-box ~ ]# echo running > /sys/block/sdc/device/state

[root@dudulz-box ~ ]# cat /sys/block/sdc/device/state
running

[root@dudulz-box ~ ]# multipath -ll
mpath2 (360060e801604750000010475000041ee) dm-13 HP,OPEN-V
[size=100G][features=1 queue_if_no_path][hwhandler=0][rw]
\_ round-robin 0 [prio=2][active]
\_ 0:0:0:2 sdc 8:32 [active][ready]
\_ 3:0:0:2 sdf 8:80 [active][ready]
mpath0 (360060e801604750000010475000041ec) dm-11 HP,OPEN-V
[size=100G][features=1 queue_if_no_path][hwhandler=0][rw]
\_ round-robin 0 [prio=2][active]
\_ 0:0:0:0 sda 8:0 [active][ready]
\_ 3:0:0:0 sdd 8:48 [active][ready]
mpath1 (360060e8016047500000104750000019b) dm-12 HP,OPEN-V
[size=100G][features=1 queue_if_no_path][hwhandler=0][rw]
\_ round-robin 0 [prio=2][active]
\_ 0:0:0:1 sdb 8:16 [active][ready]
\_ 3:0:0:1 sde 8:64 [active][ready]

Salam.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: