HuaweiのCentOS派生 Euler OSとopenEuler

Huaweiの作ったIoT向けOS LiteOS (github)、Android代替OSのHarmonyOS(鴻蒙OS)について調べていたらHuaweiがx86_64/ARMサーバ向けにEuler OSというのを出していることを知った。

公式: EulerOS

EulerOS Introductionによれば「ARM64完全対応」「セキュリティ強化」「キャリアで採用されるレベルの安定性」「Linuxコンテナ推し」らしい

DownloadリンクHuawei Mirrorsリンクを見るとインストール用ISOが入手可能となっている。

で、このEuler OSのベースは何かな、と調べて見るとopenEulerが出てくる。ちゃんとHuaweiが日本での商標を確保しているようだ。

openEuler自体はCentOSをベースとしており、このopenEulerからさらに派生しているOSがあると

中国科学院软件研究所 EulixOS
まだ生きていた TurboLinux
普华软件 isoft-linux
HopeEDGE

さて、openEule自体は3月から、2年ごとのLTSバージョンと半年リリースバージョンの2種類で出るようになったらしい(openEuler community release rule and life cycle management)

いま出ているopenEuler 20.03 LTSは長期サポートバージョンということになる。

このバージョンはCentOS8をベースとしているが、CentOS8 20.04よりパッケージバージョンがちょっと古い、という構成になっていた。

そして、CentOS8と比べるとパッケージがいくつか存在していなかったりした。例えば、open-vm-toolsとかが入っていない。

デスクトップ系の利用は考慮されていないようで、パッケージグループのインストールを行おうとすると、パッケージがない、というエラーになるものが結構ある。(パッケージリストの精査が行われておらず、CentOSにはあるがopenEulerには存在しないパッケージを指定している)

インストールしてみよう

openEuler 20.03 LTSのISOで仮想マシンを起動してみる
(セキュアブート非対応な点に注意)

画像

CentOS8の時とほぼ同じ感じです

画像

言語選択が「English」と「中文」しかない、というのが大きな違いですかね

画像

2021/04/19追記: openEuler 20.03-LTS-SP1ではRHEL8/CentOS8のパスワード設定とユーザ作成画面統合が反映されていました

ソフトウェアの選択も大きく違いますね。

標準選択が「Minimal Install」となっていて、「Server」と「Virtualization Host」が選べるという形です。(ただ、インストール後、dnf groups install Serverを実行するとエラーになるという…)

CentOS8だと簡単なパスワードでも設定できたのですが、openEulerだと断固として拒否してきました。

起動するとkernel 4.19.90-2003.4.0.0036.oe1で動作していました。(2021/04/19追記 20.03LTS SP1では 4.19.90-2012.5.0.0054.oe1 でした)

また、驚くべき事に、何もレポジトリが登録されておらず、アップデートも何もできない状態だという…(2021/04/19追記 20.03LTS SP1ではちゃんとアップデートできました)

画像

openEulerのマニュアル「Using the DNF to Manage Software Packages」に/etc/yum.repos.d/openEuler_aarch64.repo のサンプルがあったのでそれをマネしてx86_64用に書いてみる。「Installing the OS Release Package」にupdateレポジトリも載っていたので下記の様に書いてみた。

[root@openeuler ~]# cat /etc/yum.repos.d/openEuler_x86_64.repo
#Copyright (c) [2019] Huawei Technologies Co., Ltd.
#generic-repos is licensed under the Mulan PSL v1.
#You can use this software according to the terms and conditions of the Mulan PSL v1.
#You may obtain a copy of Mulan PSL v1 at:
#    http://license.coscl.org.cn/MulanPSL
#THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR
#IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR
#PURPOSE.
#See the Mulan PSL v1 for more details.
[osrepo]
name=osrepo
baseurl=https://repo.openeuler.org/openEuler-20.03-LTS/OS/x86_64/
enabled=1
gpgcheck=1
gpgkey=https://repo.openeuler.org/openEuler-20.03-LTS/OS/x86_64/RPM-GPG-KEY-openEuler

[update]
name=update
baseurl=https://repo.openeuler.org/openEuler-20.03-LTS/update/x86_64/
enabled=1
gpgcheck=0
[EPOL]
name=EPOL
baseurl=https://repo.openeuler.org/openEuler-20.03-LTS/EPOL/x86_64/
enabled=1
gpgcheck=0
[root@openeuler ~]#

これを設定することで「yum update -y」でパッケージアップデートが完了した。

なお、アップデート後はレポジトリファイルがちゃんと設定されて、以下のようになった。

[root@openeuler ~]# cat /etc/yum.repos.d/openEuler.repo
#generic-repos is licensed under the Mulan PSL v2.
#You can use this software according to the terms and conditions of the Mulan PSL v2.
#You may obtain a copy of Mulan PSL v2 at:
#    http://license.coscl.org.cn/MulanPSL2
#THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR
#IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR
#PURPOSE.
#See the Mulan PSL v2 for more details.

[OS]
name=OS
baseurl=http://repo.openeuler.org/openEuler-20.03-LTS/OS/$basearch/
enabled=1
gpgcheck=1
gpgkey=http://repo.openeuler.org/openEuler-20.03-LTS/OS/$basearch/RPM-GPG-KEY-openEuler

[everything]
name=everything
baseurl=http://repo.openeuler.org/openEuler-20.03-LTS/everything/$basearch/
enabled=1
gpgcheck=1
gpgkey=http://repo.openeuler.org/openEuler-20.03-LTS/everything/$basearch/RPM-GPG-KEY-openEuler

[EPOL]
name=EPOL
baseurl=http://repo.openeuler.org/openEuler-20.03-LTS/EPOL/$basearch/
enabled=1
gpgcheck=1
gpgkey=http://repo.openeuler.org/openEuler-20.03-LTS/OS/$basearch/RPM-GPG-KEY-openEuler

[debuginfo]
name=debuginfo
baseurl=http://repo.openeuler.org/openEuler-20.03-LTS/debuginfo/$basearch/
enabled=1
gpgcheck=1
gpgkey=http://repo.openeuler.org/openEuler-20.03-LTS/debuginfo/$basearch/RPM-GPG-KEY-openEuler

[source]
name=source
baseurl=http://repo.openeuler.org/openEuler-20.03-LTS/source/
enabled=1
gpgcheck=1
gpgkey=http://repo.openeuler.org/openEuler-20.03-LTS/source/RPM-GPG-KEY-openEuler

[update]
name=update
baseurl=http://repo.openeuler.org/openEuler-20.03-LTS/update/$basearch/
enabled=0
gpgcheck=1
gpgkey=http://repo.openeuler.org/openEuler-20.03-LTS/OS/$basearch/RPM-GPG-KEY-openEuler
[root@openeuler ~]#

上記のレポジトリファイル、注意が必要な点として「updateレポジトリが有効になっていない」というものがある。(2021/04/19追記 20.03LTS SP1でもupdateレポジトリは有効になっていません)

「dnf config-manager –enable update」を実行して有効にする必要がある。

[root@openeuler ~]# dnf repolist --all
repo id                             repo name                           status
EPOL                                EPOL                                enabled
OS                                  OS                                  enabled
debuginfo                           debuginfo                           enabled
everything                          everything                          enabled
source                              source                              enabled
update                              update                              disabled
[root@openeuler ~]# dnf config-manager --enable update
[root@openeuler ~]# dnf repolist --all
repo id                             repo name                            status
EPOL                                EPOL                                 enabled
OS                                  OS                                   enabled
debuginfo                           debuginfo                            enabled
everything                          everything                           enabled
source                              source                               enabled
update                              update                               enabled
[root@openeuler ~]#

よく分からないのが「dnf group list」で表示されるグループを指定してインストールするとエラーになるという事象..(2021/04/19追記 20.03LTS SP1ではこの現象は解消していました)

画像

インストール時に「Server」を選択していた場合はちゃんとインストールできている。

どちらもレポジトリファイル自体は同じなのでよく分からない…それどころか、Serverでインストールされている環境で「dnf group install Server」を実行しても、同じパッケージが無い、と言われ、またインストールもされていない。という状態

現状、Minimal Install以外の選択肢は正常に動作していない恐れが…

とりあえず、ひとしきり見てみた感じではCentOS8でパッケージ構成がちょっと違うバージョンという雰囲気だった。

デスクトップ(X-Window)の利用はあまり考えられていないようで、パッケージがぼろぼろと足らないので注意。

また、vSphere環境用のopen-vm-toolsも用意されていない。

Euler OS 2.0 SP5の場合

ソフトウェアの選択肢が異なっており、「Base System」「Developer Mode」「Cloud Server」「Server with GUI」となっていた。標準選択はBase System

パスワードの複雑性要求はopenEuler 20.03LTSと同じレベルでした。

再起動するとkernel 3.10.0-862.14.1.0.h209.eulerosv2r7で起動してきた。レポジトリの登録は無し

Euler OS公式のMirror Listを見ていくと「/mirrors_os2/euler/2.5/os/x86_64/」というのがあり、そこにはupdatesディレクトリとアップデートされたらしきパッケージもあるので、ここをレポジトリとして指定してみる。

# cat /etc/yum.repos.d/euleros.repo
[OS]
name=OS
baseurl=https://mirrors.huaweicloud.com/euler/2.5/os/$basearch/
enabled=1
gpgcheck=0

updateレポジトリ相当の内容は上記レポジトリに含まれている模様。

アップデート後のkernelは3.10.0-862.14.1.5.h442.eulerosv2r7 になった。

なお、何故かEuler OS 2.0 SP5の初期状態ではsshからのrootユーザログインが”パスワードが違う”というエラーでログインできなかった。アップデート後は正常にsshログインが可能となった。

[root@euleros ~]# df
Filesystem               1K-blocks    Used Available Use% Mounted on
/dev/mapper/euleros-root  36357632 1492596  32988456   5% /
devtmpfs                   3983580       0   3983580   0% /dev
tmpfs                      3996440       0   3996440   0% /dev/shm
tmpfs                      3996440    9048   3987392   1% /run
tmpfs                      3996440       0   3996440   0% /sys/fs/cgroup
/dev/sda2                   999320  157676    772832  17% /boot
/dev/sda1                   204580    8596    195984   5% /boot/efi
/dev/mapper/euleros-home  17745188   45080  16775644   1% /home
tmpfs                       799288       0    799288   0% /run/user/0
[root@euleros ~]# uname -a
Linux euleros 3.10.0-862.14.1.5.h442.eulerosv2r7.x86_64 #1 SMP Fri May 15 22:01:58 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
[root@euleros ~]# yum grouplist
Loaded plugins: fastestmirror
There is no installed groups file.
Maybe run: yum groups mark convert (see man yum)
Loading mirror speeds from cached hostfile
Available Environment Groups:
   Base System
   Developer Mode
   Cloud Server
   Server with GUI
Available Groups:
   Compatibility Libraries
   Development Tools
   Security Tools
   Smart Card Support
Done
[root@euleros ~]#

とりあえず「yum groupinstall “Server with GUI”」でパッケージを追加して再起動。

「1」を選んで

「2」を選んで

「c」と「c」で進めると普通のログイン画面に到達

rootでログインしたあと「init 5」して起動する画面はCentOSと変わりは無い

ログイン完了すると、EulerOSの壁紙デスクトップに到着。

「systemctl set-default graphical.target」でログイン画面自体をGUIにした場合は下記の様になる。

また、EulerOS2.0だとopen-vm-toolsがあった。

HPE 5700 スイッチのコマンド

以前にHPE5700スイッチの設定をした際、「HPE 5700 スイッチの日付設定」という記事を書いた。

今回はもっといくつか設定が必要になったので、いろいろメモ書きとして残しておく。

参考にしたもの
HPEスイッチ(旧H3C)シリーズ 設定別コマンド早見表
HPEスイッチ 基本コマンド&初期設定例 ~VLAN/リンクアグリゲーション(LACP), ssh, snmp, ntp, syslog等の管理設定,debug~

2022/04/14追記
HPE 5940スイッチの設定をする際に探したら HPE japanの純正ドキュメント「HPE FLEXFABRIC & FLEXNETWORK スイッチ基本操作ガイド V1.1」を発見した
普通使う設定の範囲は概ね含んでいるので、まずはコレを読むと良い。(2023/03/29に確認したらv1.1からv1.3にアップデートしていた)

上記の配布元URLは「[Switch] HPE FlexFabric / FlexNetwork スイッチ基本操作ガイド」で、他に「Aruba CXスイッチ基本操作ガイド」と「ArubaOSスイッチ基本操作ガイド」があった。(2023/03/29時点では ARUBA CX スイッチ 基本操作ガイド V3.0とARUBA OS スイッチ 基本操作ガイド V1.6)

基本

・特権モードに入る

「system」「system-view」(“sys”でもOK)

・設定の確認

現在の設定確認「display current-configuration」
保存されている設定確認「display saved-configuration」

なお、「display」はCisco風に「show」でも動く

・設定確認とかの際に「More」を表示させない

「screen-length disable」を非特権モードで実行する。

・設定したものを保存

「save」

・設定を入れたものを消すとき

「undo 各コマンド」(Ciscoの”no 各コマンド”に相当)

ポートの状態確認

「display interface brief」

「display link-aggregation summary」
「display link-aggregation port」
「display link-aggregation member-port」

スイッチの個体設定

・スイッチのホスト名設定

「sysname ホスト名」

・現在時刻表示

「show clock」

・タイムゾーン設定

「clock timezone Tokyo add 09:00:00」

・手動で時刻を設定する場合

まず特権モードで「clock protocol none」
次に非特権モードで「clock datetime 21:09:00 2020/07/26」

・NTP設定をする場合

「clock protocol ntp」でNTPプロトコルを指定したあと
「ntp-service unicast-server xxx.xxx.xx.xx」

NTPサーバが複数ある場合は、サーバ毎に「ntp-service unicast-server ~」を実行する。

また、NTP通信に使用するインタフェースを指定する場合は「ntp-service source M-GigabitEthernet 0/0/0」とか「ntp-service source Vlan-interface1」という形で指定する

NTPの動作状況は「show ntp-service sessions」と「show ntp-service status」

・管理用IPアドレス

HPE5710背面にある管理用(MGMT)インタフェース(MGE0/0/0)に管理用IPアドレスを割り当てる場合

interface M-GigabitEthernet0/0/0
ip address 172.17.44.227 255.255.0.0
no dhcp client identifier
<interface Vlanから抜けたあと>
ip route-static 0.0.0.0 0.0.0.0 172.17.0.1

Vlan-interface1に管理用IPアドレスを割り当てる場合

interface Vlan-interface1
ip address 172.17.44.1 255.255.0.0
<interface Vlanから抜けたあと>
ip route-static 0.0.0.0 0.0.0.0 172.17.0.1

・管理用ユーザ作成

「admin」というユーザをパスワード「password」で作成する場合

local-user admin
password simple password
authorization-attribute user-role network-admin
service-type ssh https

作成したローカルユーザの確認「display local-user」

・リモートログインへの権限割り当て

vtyの0~4にsshでログインする権限を与える。
なお、下記はuser-roleとしてnetwork-adminとnetwork-operatorの2つが書かれているが実際は「user-role network-admin」を追加するだけで、自動的にnetwork-operatorも追加された。

line vty 0 4
authentication-mode scheme
user-role network-admin
user-role network-operator
protocol inbound ssh
idle-timeout 30 5

・リモートログインの許可

ssh有効設定「ssh server enable」
状態確認「display ssh server status」

・Web管理画面有効化

httpsを有効にする場合「ip https enable」
現在の設定状況確認「display ip https」

VLAN関連

「display vlan brief」

Link-aggregation設定

Link-aggregation/Trunk/トランク/LACP/IEE 802.3ad設定について

VMware KB「ESXi/ESX および Cisco/HP スイッチによる EtherChannel/リンク集約コントロール プロトコル (LACP) のサンプル構成 (1004048)

ジャンボフレーム関連

layer-2向け設定とlayer-3向け設定がある模様

interfaceの下で「mtu 9000」と設定するか、「jumboframe enable」と設定するか?

jumboframeの方はlayer-2/layer-3の両方で記載があったが、mtuの方はlayer-3のみ記載があった

jumboframe enableにすると10000のジャンボフレームが使えるようになる。「jumboframe enable 数値」でも可でその場合は1536~10000が指定できる

mtuの場合は「mtu 数値」で指定する。数値は128~9008

NetVault 用firewall設定 for RHEL/Windows

NetVaultサーバをRHEL上にたてて、クライアントにNetAppとRHELとWindows Serverがいる場合のファイアウォール設定サンプル。

必要なポートについては「Netvault 13.1.2 管理ガイド NetVaultが使用するポートNetVault 12.0管理ガイド ファイアウォールの設定の例より流用。

NetVaultサーバ/クライアント間の基本的な通信はネットワークマネージャによりポート20031のTCP/UDPで行われる。
またクライアント上でコミュニケーションマネージャがポート20032 TCPを使用する。

また、NDMPバックアップの場合、NetVaultサーバ側でポート10000 TCPと40000 TCPを使用する。

設定はOS側のfirewall設定と、NetVault側のファイアウォール設定の2つを行う。

NetVault側ファイアウォール設定

NetVaultサーバ側は以下のように設定する。設定したあとはサービス再起動が必須。

デバイス待ち受けポート50100-50199
デバイス接続ポート50200-50299
メッセージ チャンネルの待ち受けポート50300-50399
メッセージ チャンネルの接続ポート50400-50499
NDMPコントロール チャンネルの接続ポート10000
NetVault NDMPデータ チャンネルの待ち受けポート40000
NetVaultマシン間の内部的な通信に使用するポート50500-50599

クライアント側はNDMP関連設定がなくでも良い。設定したあとはサービス再起動が必須。

デバイス待ち受けポート50100-50199
デバイス接続ポート50200-50299
メッセージ チャンネルの待ち受けポート50300-50399
メッセージ チャンネルの接続ポート50400-50499
NDMPコントロール チャンネルの接続ポート
NetVault NDMPデータ チャンネルの待ち受けポート
NetVaultマシン間の内部的な通信に使用するポート50500-50599

クライアント側のfirewallが動いている場合、NetVaultサーバからの設定変更を受け付けることができない。Windowsの場合はスタートメニューにある「NetVault Configurator」を起動して変更する。

Linuxの場合は、NetVaultクライアント側で「txtconfig」コマンドを実行して設定を変更する。(Windowsにもtxtconfigがあるが、日本語が文字化けをする)

txtconfigを実行すると以下のような画面が表示される。

「p」と入力すると、2枚目のメニューが表示される。この中の「19. ファイアウォール」を変更するため「19」と入力する。

上から順に設定を変更していく。

最後は「s」を入力し、変更を保存して終了する。(qだと設定を反映しない)

OS側firewall設定

サーバ側として以下を開ける
 ・8443 TCP (管理画面)
 ・10000 TCP (NDMP)
 ・40000 TCP (NDMP)
 ・20031-20032 TCP
 ・20031 UDP
 ・50100-50599 TCP

クライアント側は管理画面用の8443と、NDMP用の10000と40000の設定を抜く。

CentOS7クライアントの場合以下とした

# firewall-cmd --permanent --zone=public --add-port=8443/tcp
# firewall-cmd --permanent --zone=public --add-port=10000/tcp
# firewall-cmd --permanent --zone=public --add-port=40000/tcp
# firewall-cmd --permanent --zone=public --add-port=20031-20032/tcp
# firewall-cmd --permanent --zone=public --add-port=20031/udp
# firewall-cmd --permanent --zone=public --add-port=50100-50599/tcp
# firewall-cmd --reload

Windowsクライアントの場合以下とした。

netsh advfirewall firewall add rule name=”NVBU TCP in ports” dir=in protocol=tcp localport=20031-20032 action=allow
netsh advfirewall firewall add rule name=”NVBU TCP in ports” dir=in protocol=tcp localport=50100-50599 action=allow

netsh advfirewall firewall add rule name=”NVBU TCP out ports” dir=out protocol=tcp localport=20031-20032 action=allow
netsh advfirewall firewall add rule name=”NVBU TCP out ports” dir=out protocol=tcp localport=50100-50599 action=allow

netsh advfirewall firewall add rule name=”NVBU UDP in ports” dir=in protocol=udp localport=20031 action=allow
netsh advfirewall firewall add rule name=”NVBU UDP out ports” dir=out protocol=udp localport=20031 action=allow

最後にNetVaultのクライアント管理にてクライアント追加を行う際に「クライアントはファイアウォールの外側に存在」にチェックを入れることを忘れないこと。(入れないとNetVaultサーバからクライアントへのアクセスに指定したポートを使用しない)

vSphere ESXiで切断されたNFSに再接続する

NFSサーバが起動する前にESXiが起動してしまった場合、NFSが切断状態となる。

FCやiSCSIであれば勝手に再接続とかしてくれるが、NFSだと切れたままになる。

VMware KB「切断された NFS データストアの ESXi/ESX コマンド ラインからの再マウント (1005057)

一度NFSマウントの設定を削除して再設定する必要がある、とのこと。

VMware KBには「esxcli storage nfs list」といったコマンドが書かれているが、これはNFS v3.0向けのコマンドで、NFS v4.1については「esxcli storage nfs41 list」というようにコマンドを実行する必要があった。(以下、esxcli nfs41として記載しているが、NFS v3の場合はesxcli nfsで実行する)

まず、現在の設定を確認するため「esxcli storage nfs41 list」を実行

[root@esxiserver:~] esxcli storage nfs41 list
Volume Name  Host(s)        Share     Accessible  Mounted  Read-Only  Security   isPE  Hardware Acceleration
-----------  -------------  --------  ----------  -------  ---------  --------  -----  ---------------------
nfsv4test    172.17.44.108  /testvol       false    false      false  AUTH_SYS  false  Unknown
[root@esxiserver:~] 

エントリを削除するため「esxcli storage nfs41 remove –volume-name=nfsv4test」を実行

[root@esxiserver:~] esxcli storage nfs41 remove --volume-name=nfsv4test
[root@esxiserver:~] esxcli storage nfs41 list
[root@esxiserver:~] 

listで表示された内容をベースに「esxcli storage nfs41 add –volume-name=~ –hosts=~ –share=~ –sec=~」というように登録コマンドを実行する。

[root@esxiserver:~] esxcli storage nfs41 add --volume-name=nfsv4test --hosts=172
.17.44.108 --share=/testvol --sec=AUTH_SYS
[root@esxiserver:~] 

登録されたことを確認

[root@esxiserver:~] esxcli storage nfs41 list
Volume Name  Host(s)        Share     Accessible  Mounted  Read-Only  Security   isPE  Hardware Acceleration
-----------  -------------  --------  ----------  -------  ---------  --------  -----  ---------------------
nfsv4test    172.17.44.108  /testvol        true     true      false  AUTH_SYS  false  Supported
[root@esxiserver:~]

vSphere ESXiでNetApp ONTAP9のNFS4.1を使う

NetApp ONTAP 9.7環境にてNFS4.1を有効にして、vSphere ESXi 6.7のNFSデータストアにしてみた。

NetApp ONTAP9側

NFS 4.1有効化

ONTAP 9.7管理画面でNFSを有効にした場合、NFS v3.0のみが有効化されている。

プロトコルの「NFS」から編集を選ぶと以下の様に設定変更ができる。

とりあえず「バージョン4のサポートを有効にする」と「バージョン4.1のサポートを有効にする」にチェックを入れると下記のようになる。

「pNFS」にもチェックが入っている状態になるが、このまま設定する。

設定後のプロトコル表示は下記の様になる。

通常のNFSと同じくエクスポートルールの設定などはちゃんと行うこと。

ONTAPでNFS経由のVAAIを許可するエクスポート ポリシーの設定

NFS vStorage Support有効化

NetAppのStorage VM(SVM)に対してNFS vStorage Support(VAAI連携)を有効化する。

現在値の確認は「vserver nfs show -ins」で「NFS vStorage Support」の値を確認する。

ontap-select-cluster::> vserver nfs show -ins

                                        Vserver: svm0
                             General NFS Access: true
                                         NFS v3: enabled
                                       NFS v4.0: enabled
                                   UDP Protocol: enabled
                                   TCP Protocol: enabled
                           Default Windows User: -
                            NFSv4.0 ACL Support: disabled
                NFSv4.0 Read Delegation Support: disabled
               NFSv4.0 Write Delegation Support: disabled
                        NFSv4 ID Mapping Domain: defaultv4iddomain.com
            NFSv4 Grace Timeout Value (in secs): 45
Preserves and Modifies NFSv4 ACL (and NTFS File Permissions in Unified Security Style): enabled
                  NFSv4.1 Minor Version Support: enabled
                                  Rquota Enable: disabled
                   NFSv4.1 Parallel NFS Support: enabled
                            NFSv4.1 ACL Support: disabled
                           NFS vStorage Support: disabled
            NFSv4 Support for Numeric Owner IDs: enabled
                          Default Windows Group: -
                NFSv4.1 Read Delegation Support: disabled
               NFSv4.1 Write Delegation Support: disabled
                            NFS Mount Root Only: enabled
                                  NFS Root Only: disabled
            Permitted Kerberos Encryption Types: des, des3, aes-128, aes-256
                              Showmount Enabled: enabled
Set the Protocol Used for Name Services Lookups for Exports: udp
                    NFSv3 MS-DOS Client Support: disabled
     Idle Connection Timeout Value (in seconds): 360
             Are Idle NFS Connections Supported: disabled
Hide Snapshot Directory under NFSv3 Mount Point: disabled
           Provide Root Path as Showmount State: disabled

ontap-select-cluster::> 

vStorage Supportの項目だけ確認する場合は「vserver nfs show -fields vstorage」でも良い。

ontap-select-cluster::> vserver nfs show -fields vstorage
vserver vstorage
------- --------
svm0    disabled

ontap-select-cluster::>

有効にする場合は「vserver nfs modify -vserver SVM名 -vstorage enabled」を実行する。

ontap-select-cluster::> vserver nfs modify -vserver svm0 -vstorage enabled

ontap-select-cluster::> vserver nfs show

変更後は以下のような出力結果となる。

ontap-select-cluster::> vserver nfs show -ins

                                        Vserver: svm0
                             General NFS Access: true
                                         NFS v3: enabled
                                       NFS v4.0: enabled
                                   UDP Protocol: enabled
                                   TCP Protocol: enabled
                           Default Windows User: -
                            NFSv4.0 ACL Support: disabled
                NFSv4.0 Read Delegation Support: disabled
               NFSv4.0 Write Delegation Support: disabled
                        NFSv4 ID Mapping Domain: defaultv4iddomain.com
            NFSv4 Grace Timeout Value (in secs): 45
Preserves and Modifies NFSv4 ACL (and NTFS File Permissions in Unified Security Style): enabled
                  NFSv4.1 Minor Version Support: enabled
                                  Rquota Enable: disabled
                   NFSv4.1 Parallel NFS Support: enabled
                            NFSv4.1 ACL Support: disabled
                           NFS vStorage Support: enabled
            NFSv4 Support for Numeric Owner IDs: enabled
                          Default Windows Group: -
                NFSv4.1 Read Delegation Support: disabled
               NFSv4.1 Write Delegation Support: disabled
                            NFS Mount Root Only: enabled
                                  NFS Root Only: disabled
            Permitted Kerberos Encryption Types: des, des3, aes-128, aes-256
                              Showmount Enabled: enabled
Set the Protocol Used for Name Services Lookups for Exports: udp
                    NFSv3 MS-DOS Client Support: disabled
     Idle Connection Timeout Value (in seconds): 360
             Are Idle NFS Connections Supported: disabled
Hide Snapshot Directory under NFSv3 Mount Point: disabled
           Provide Root Path as Showmount State: disabled

ontap-select-cluster::> vserver nfs show -fields vstorage
vserver vstorage
------- --------
svm0    enabled

ontap-select-cluster::>

vSphere側

データストアの追加から「NFS」の「NFS 4.1」を追加する

VAAIプラグインを追加

ESXiに「NetApp NFS Plug-in for VMware VAAI」をインストールすることで、VAAI機能が有効になる。

すでにNFSマウントされているデータストアがVAAIでアクセスされているか確認するにはESXi shellでコマンドを実行する。

[root@esxiserver:~] esxcli storage nfs41 list
Volume Name  Host(s)        Share     Accessible  Mounted  Read-Only  Security   isPE  Hardware Acceleration
-----------  -------------  --------  ----------  -------  ---------  --------  -----  ---------------------
nfsv4test    172.17.44.108  /testvol        true     true      false  AUTH_SYS  false  Not Supported
[root@esxiserver:~]

「Hardware Acceleration」が「Not Supported」となっている場合、VAAIが有効な状態ではない。

また「vmkfstools -Ph /vmfs/volumes/<データストア名>」を実行した結果内の「NAS VAAI Supported」でも確認できる。

[root@esxiserver:~] vmkfstools -Ph /vmfs/volumes/nfsv4test
NFS41-4.01 (Raw Major Version: 0) file system spanning 1 partitions.
File system label (if any): nfsv4test
Mode: public
Capacity 50 GB, 48.0 GB available, file block size 4 KB, max supported file size 16.0 TB
Disk Block Size: 512/512/0
UUID: a135f63e-34806068-0000-000000000000
Partitions spanned (on "notDCS"):
        NFS41:a135f63e-34806068-0000-000000000000
NAS VAAI Supported: NO
Is Native Snapshot Capable: NO
[root@esxiserver:~]

ESXi shellからVAAIプラグインをインストールする。

[root@esxiserver:~] esxcli software vib install -d /vmfs/volumes/software/netapp
/nfs_plugin_VAAI/1.1.2/NetAppNasPlugin.v23.zip
Installation Result
   Message: The update completed successfully, but the system needs to be rebooted for the changes to be effective.
   Reboot Required: true
   VIBs Installed: NetApp_bootbank_NetAppNasPlugin_1.1.2-3
   VIBs Removed:
   VIBs Skipped:
[root@esxiserver:~]

「Reboot Required: true」と再起動が要求されたので、ESXiを再起動します。

再起動後、「esxcli storage nfs41 list」で確認すると「Hardware Acceleration Supported」。

[root@esxiserver:~] esxcli storage nfs41 list
Volume Name  Host(s)        Share     Accessible  Mounted  Read-Only  Security   isPE  Hardware Acceleration
-----------  -------------  --------  ----------  -------  ---------  --------  -----  ---------------------
nfsv4test    172.17.44.108  /testvol        true     true      false  AUTH_SYS  false  Supported
[root@esxiserver:~]

「vmkfstools -Ph /vmfs/volumes/<データストア名>」は「NAS VAAI Supported: YES」に変わります。

[root@esxiserver:~] vmkfstools -Ph /vmfs/volumes/nfsv4test
NFS41-4.01 (Raw Major Version: 0) file system spanning 1 partitions.
File system label (if any): nfsv4test
Mode: public
Capacity 50 GB, 48.0 GB available, file block size 4 KB, max supported file size 16.0 TB
Disk Block Size: 512/512/0
UUID: a135f63e-34806068-0000-000000000000
Partitions spanned (on "notDCS"):
        NFS41:a135f63e-34806068-0000-000000000000
NAS VAAI Supported: YES
Is Native Snapshot Capable: YES
[root@esxiserver:~]

2020/08/04追記

export policy関連設定

svmのrootボリュームのexport policyをread onlyの0.0.0.0/0にして、vSphere用NFS共有のexport policyをread/write 0.0.0.0/0にしておいたところ、ESXi 7.0からのNFS4.1データストア登録に失敗。

svmのrootボリュームへの書き込み権限も必要だった。