在VMware vSphere环境中部署EMC UnityVSA(4TB免费版)(二):使用CLI控制台修改UnityVSA管理地址、启用SSH管理等
UnityVSA是SUSE Linux Enterprise Server(SLES,如下) 12 SP1操作系统:
15:38:15 service@VIRT1803SKN5YT-spa spa:/> uname -a
Linux spa 3.12.69-60.64.35.1.NEOKERNEL_SLES12SP1 #2 SMP Thu Oct 5 14:41:40 EDT 2017 x86_64 x86_64 x86_64 GNU/Linux
15:38:46 service@VIRT1803SKN5YT-spa spa:/> df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sda5 10192372 4936072 4715632 52% /
udev 1083360 8 1083352 1% /dev
tmpfs 2249168 84384 2164784 4% /dev/shm
tmpfs 2249168 45372 2203796 3% /run
tmpfs 2249168 0 2249168 0% /sys/fs/cgroup
/dev/ram0 59493 3415 56078 6% /tmp
/dev/sda1 118997 5744 107109 6% /mnt/c4lx-cfg_msata
/dev/sda6 8254392 1047708 6770872 14% /cores
/dev/sdc5 14523992 53188 13744380 1% /EMC/backend/service
/dev/sdb9 1032088 193148 786512 20% /EMC/backend/CEM
/dev/sdb8 253871 51357 189407 22% /nbsnas
/dev/sdb11 665200 17084 614324 3% /EMC/backend/perf_stats
/dev/sdb10 3449100 99412 3174484 4% /EMC/backend/log_shared
/dev/sdb12 3096336 204928 2734124 7% /EMC/backend/metricsluna1
/dev/sdb13 253871 10296 230468 5% /EMC/fastvp
可以通过命令行来实现相关配置,如下图
UnityVSA控制台默认用户名和密码都为service,使用service/service登陆控制台,
spa login:service
Password:
14:08:40 service@VIRT1803SKN5YT-spa spa:~>
1、SSH服务开启设置
完成登陆后开始进行相关配置,首先为了能够使用SSH等相关工具来管理控制台,先开启SSH服务,使用help | more命令查看帮助:
14:11:30 service@VIRT1803SKN5YT-spa spa:~> help | more
The following UnityVSA serviceability commands are available to the service user:
svc_acldb_dump
svc_arrayconfig
svc_banner
svc_boot-control
svc_cache
svc_cava
最后查看到命令为svc_ssh,命令使用方法:
Usage: svc_ssh [options]
Options:
-e, –enable Enable sshd on the system
-d,—disable Disables sshd on the system
-s,—status Prints status of sshd
14:15:22 service@VIRT1803SKN5YT-spa spa:~>
使用svc_ssh –s查看目前的SSH状态,状态为disabled,关闭状态
14:16:54 service@VIRT1803SKN5YT-spa spa:~> svc_ssh –s
使用svc_ssh -e命令打开SSH功能:
14:18:33 service@VIRT1803SKN5YT-spa spa:~> svc_ssh –e
完成开启后,开始使用SecureCRT来管理控制台,如下图。
2、管理地址更改设置
首先使用svc_networkcheck –m命令查看当前的管理地址,如下
14:31:58 service@VIRT1803CVH590-spa spa:~> svc_networkcheck -m
=== SP status: Normal Mode, Master SP ===
======================= [spa][Mon Jan 22 14:32:05 UTC 2018] Beginning Run =======================Management IPv4 Information
IP Address: 192.168.10.59
Mask/Prefix: 255.255.255.0
Gateway: 192.168.10.253
DNS/NTP Information
DNS server(s): None
NTP server(s): None
Management IPv6 Information
DNS/NTP Information
DNS server(s): None
NTP server(s): None======================= [spa][Mon Jan 22 14:32:19 UTC 2018] End of Run =======================
接着,使用svc_initial_config命令修改管理IP地址,如下
14:32:21 service@VIRT1803CVH590-spa spa:~> svc_initial_config
Usage : svc_initial_config [OPTIONS]
Sets up initial system configuration. Configures a management IP address when the
Connection Utility (CU) is not available on the network. Can also be used to change
the management IPv4 and IPv6 configuration mode if an address is set.
Attempts to configure the system with the given friendly name and/or network parameters.
Network parameters are for IPv4 and/or IPv6.Ex: svc_initial_config [-f <hostname>] -4 "<IPv4 address> <IPv4 netmask> <IPv4 default gateway>"
svc_initial_config [-f <hostname>] -6 "<IPv6 address> <prefix length> <IPv6 default gateway>"Options:
-h or –help Prints this usage information.
-4, –network IPv4 address, netmask and default gateway for management interface.
MUST BE ENCLOSED BY "QUOTES" and given in that exact order:
"ip net_mask def_gw".
Use "auto" instead of "ip net_mask def_gw" for DHCP.
Use "disable" to disable IPv4 configuration.-6, –networkv6 IPv6 address, prefix length and default gateway for management interface.
MUST BE ENCLOSED BY "QUOTES" and given in that exact order:
"ip prefix_len def_gw".
Use "auto" instead of "ip prefix_len def_gw" to
enable IPv6 autoconfiguration.
Use "disable" to disable IPv6 configuration.
-f, –friendly_name New friendly_name for the system. Name must contain only letters,
numbers, dot(.) or the hyphen(-) character. Name must not start
nor end with a hyphen and be limited to a total length of
255 characters.
14:34:24 service@VIRT1803CVH590-spa spa:~> svc_initial_config -f unityvsanew -4 "192.168.10.57 255.255.255.0 192.168.10.253"
Attempting to set friendly name to <unityvsanew>
Successfully set friendly name to <unityvsanew>
Validating address 192.168.10.57 format … Pass
Validating address 255.255.255.0 format … Pass
Validating address 192.168.10.253 format … Pass
Validating IP and Gateway subnet with Mask … Pass
Successfully configured network with parameters <static 192.168.10.57 255.255.255.0 192.168.10.253>
完成修改后,会出现Successfully提示,如上,成功后,就能使用新的地址来进行管理。
3、其它命令
所有可用命令可以使用help | more来显示:
14:29:38 service@VIRT1803CVH590-spa spa:~> help | more
The following UnityVSA serviceability commands are available to the service user:
svc_acldb_dump
svc_arrayconfig
svc_banner
svc_boot_control
svc_cache
svc_cava
svc_cbr
svc_change_hw_config
svc_check_hw_config
svc_cifssupport
svc_connectemc
svc_custom_cert
svc_dac
svc_dataprotection
svc_dc
svc_diag
svc_elms
svc_esrs_ve
svc_event_publishing
svc_firewall
svc_help
svc_initial_config
svc_inject
svc_ipmi
svc_kmip
svc_lockd
svc_mount
svc_nas
svc_network
svc_networkcheck
svc_ntp
svc_oscheck
svc_param
svc_pax
svc_perfcheck
svc_purge_logs
svc_reimage
svc_reinit
svc_rescue_state
svc_restart_service
svc_scsi_id
svc_service_password
svc_service_shell
svc_shutdown
svc_ssh
svc_stig
svc_storage_integritycheck
svc_storagecheck
svc_tcpdump
svc_udoctor
svc_vhdx
svc_vp_hostcheck
For detailed information on the available service commands, refer to the
"UnityVSA Service Commands Technical Notes" document on the EMC Online Support
Site (https://support.emc.com/).
PING命令:
15:31:08 service@VIRT1803SKN5YT-spa spa:~> svc_networkcheck -p 192.168.10.253
=== SP status: Normal Mode, Master SP ========================== [spa][Mon Jan 22 15:31:16 UTC 2018] Beginning Run =======================
PING 192.168.10.253 (192.168.10.253) from 192.168.10.59 : 56(84) bytes of data.
64 bytes from 192.168.10.253: icmp_seq=1 ttl=254 time=7.42 ms
64 bytes from 192.168.10.253: icmp_seq=2 ttl=254 time=2.05 ms
64 bytes from 192.168.10.253: icmp_seq=3 ttl=254 time=2.45 ms
64 bytes from 192.168.10.253: icmp_seq=4 ttl=254 time=1.97 ms— 192.168.10.253 ping statistics —
4 packets transmitted, 4 received, 0% packet loss, time 3004ms
rtt min/avg/max/mdev = 1.977/3.480/7.429/2.287 ms======================= [spa][Mon Jan 22 15:31:19 UTC 2018] End of Run =======================
查看管理地址:
15:31:21 service@VIRT1803SKN5YT-spa spa:~> svc_networkcheck -m
=== SP status: Normal Mode, Master SP ========================= [spa][Mon Jan 22 15:31:26 UTC 2018] Beginning Run =======================
Management IPv4 InformationIP Address: 192.168.10.59
Mask/Prefix: 255.255.255.0
Gateway: 192.168.10.253DNS/NTP Information
DNS server(s): None
NTP server(s): NoneManagement IPv6 Information
DNS/NTP Information
DNS server(s): None
NTP server(s): None======================= [spa][Mon Jan 22 15:31:40 UTC 2018] End of Run =======================