当我通过 SSH 登录到 Nexenta 机器时,我必须输入以下命令:
nmc@nexenta:/$ option expert_mode=1
nmc@nexenta:/$ !bash
You are about to enter the Unix ("raw") shell and execute low-level Unix command(s). Warning: using low-level Unix commands is not recommended! Execute? Yes
Run Code Online (Sandbox Code Playgroud)
我可以登录并处于专家模式吗?每次都这样做很烦人。
注意:我不想每次都编写脚本来执行此操作,这并不是我真正要寻找的解决方案。
您可以在此处持久化专家模式选项。运行option expert_mode = 1 -s。在-s使设置永久。从现在开始,您只需要运行!bash即可从nmc控制台获取 shell 。
您也可以 ssh 作为admin用户并su在需要时使用。
然而,NexentaStor 实际上是一个由 Web 界面或nmc命令行控制台管理的设备。您对原始 Unix shell 的访问应该是有限的,但是如果您确实需要去那里,则键入两个命令来获取访问权限应该不会有问题。我觉得像sudo。当前的 NexentaStor 警告如下所示:
nmc@nexenta:/$ !bash
You are about to enter the Unix ("raw") shell and execute low-level Unix command(s). CAUTION: NexentaStor
appliance is not a general purpose operating system: managing the appliance via Unix shell is NOT
recommended. This management console (NMC) is the command-line interface (CLI) of the appliance,
specifically designed for all command-line interactions. Using Unix shell without authorization of your
support provider may not be supported and MAY VOID your license agreement. To display the agreement,
please use 'show appliance license agreement'.
Proceed anyway? (type No to return to the management console) Yes
Run Code Online (Sandbox Code Playgroud)
setup appliance nms restart在 bash shell 中完成工作后,请务必执行以刷新 Web 控制台的值。