VMware Cloud Community
rpeabody
Contributor
Contributor
Jump to solution

Command Line to place a LUN in an "offline" state

I was wondering if there was a command line available in the ESX server to place a LUN in an "offline" state.

0 Kudos
1 Solution

Accepted Solutions
Rob_Bohmann1
Expert
Expert
Jump to solution

If you want to turn a path to a lun off you can do something like this:

log]# esxcfg-mpath --path=vmhba1:0:0 --state=off --lun=vmhba1:0:0

Setting vmhba1:0:0 -- vmhba1:0:0 state to off

Disk vmhba1:0:0 /dev/sda (258052MB) has 2 paths and policy of Fixed

FC 5:7.0 210000e08b1a3472<->50060e8014427b00 vmhba1:0:0 Off

FC 5:7.1 210100e08b3a3472<->50060e8014427b10 vmhba2:0:0 On active preferred

View solution in original post

0 Kudos
2 Replies
JoJoGabor
Expert
Expert
Jump to solution

What are you trying to do?

I think you would be better off doing something at the storage level such as making hte LUN read-only os simply masking it from the ESX hosts?

0 Kudos
Rob_Bohmann1
Expert
Expert
Jump to solution

If you want to turn a path to a lun off you can do something like this:

log]# esxcfg-mpath --path=vmhba1:0:0 --state=off --lun=vmhba1:0:0

Setting vmhba1:0:0 -- vmhba1:0:0 state to off

Disk vmhba1:0:0 /dev/sda (258052MB) has 2 paths and policy of Fixed

FC 5:7.0 210000e08b1a3472<->50060e8014427b00 vmhba1:0:0 Off

FC 5:7.1 210100e08b3a3472<->50060e8014427b10 vmhba2:0:0 On active preferred

0 Kudos