Unsolved
This post is more than 5 years old
5 Practitioner
•
274.2K Posts
1
3955
UNITY : CLI command syntax to remove host access from lun?
hi Experts,
I could not find a way to remove host access from a LUN. I know the syntax to add host access is uemcli -d xxx -noHeader /stor/prov/luns/lun -id xxx set -lunHosts xx.
is there anyway to do this??
brettesinclair
715 Posts
0
March 13th, 2017 03:00
Have you tried running the command without the HostID in the -lunHosts parameter ?
Anonymous
5 Practitioner
5 Practitioner
•
274.2K Posts
0
April 4th, 2017 00:00
Hi Brett,
Yes i did try that but gives syntax error. The only way i could remove the host was by creating a fake host and assign it to the lun. This will automatically remove the existing host access. But since the GUI have the option to remove the host access i am wondering there has to be a way through CLI.
maniemc
169 Posts
0
April 4th, 2017 21:00
set argument with just a blank value (double or single quote) will remove all hosts.
Example: (sv_1 is lun id):
uemcli -u admin -p pwd /stor/prov/luns/lun -id sv_1 set -lunHosts ""
Anonymous
5 Practitioner
5 Practitioner
•
274.2K Posts
3
July 3rd, 2017 19:00
uemcli -u admin -p pwd /stor/prov/luns/lun -id sv_1 set -lunHosts ","
single29
5 Posts
0
October 13th, 2020 15:00
-bash-4.2$ uemcli -d xx-unity600-01 -u admin -p mypassword /remote/host -id Host_31 set -removeLuns sv_15,sv_16,sv_17
Storage system address: xx-unity600-01
Storage system port: 443
HTTPS connection
ID = Host_31
Operation completed successfully.
-bash-4.2$
But before doing above, you grep host name that contains string "0011" to find host_ID by these 2 cli:
uemcli -d xx-unity600-01 -u admin -p mypassword /remote/host show -brief |grep -B2 -A5 0011
27: ID = Host_31
Name = xxxx-esx0011
Description =
Tenant =
Type = host
Address =
Netmask =
^C
-bash-4.2$ uemcli -d xx-unity600-01 -u admin -p mypassword /remote/host -id Host_31 show -detail
Storage system address: xx-unity600-01
Storage system port: 443
HTTPS connection
1: ID = Host_31
Name = xxxx-esx0011
Description =
Tenant =
Type = host
Address =
Netmask =
OS type = VMware ESXi 6.0.0
Ignored address =
Management type = Others
Accessible LUNs = sv_15,sv_17,sv_16
Host LUN IDs = 0,1,2