openmpiでサポートされていたので調べてみた次第. これを組み上げてみる.
rpmのDescriptionから
Description : OrangeFS (formerly PVFS2) is a high-performance parallel
: network file system designed for use on high performance computing
: systems. It provides very high performance access to disk storage for
: parallel applications. It is accessible through a variety of
: interfaces, including the native OrangeFS library, the kernel, FUSE,
: and MPI-IO.
:
: This package provides the pvfs2-client-core which is required to use
: the kernel module.
(google先生訳)
OrangeFS(以前のPVFS2)は、高性能コンピューティングシステムで使用するために設計された高性能並列ネットワークファイルシステムです。
並列アプリケーションのディスクストレージへの非常に高性能なアクセスを提供します。
ネイティブのOrangeFSライブラリ、カーネル、FUSE、MPI-IOなどのさまざまなインターフェイスからアクセスできます。
このパッケージは、カーネルモジュールを使用するために必要なpvfs2-client-coreを提供します。
とある.
ファイルサーバに複数のストレージ領域があって、それが複数台存在してクラスターファイルシステムのような機能を提供しているみたい.
http://docs.orangefs.com/configuration/multiple_server_processes/
取り合えず1台ファイルサーバ(1個のストレージ)、1台クライアントで試してみる
[root@orange1 ~]# cat /etc/redhat-release
Rocky Linux release 8.4 (Green Obsidian)
[root@orange1 ~]# dnf -y install epel-release
[root@orange1 ~]# dnf -y install orangefs orangefs-server
「pvfs2-genconfig」を使って対話的に設定ファイルを作ります
ここでは1つのサーバで1つのストレージを持つことにしてます。
なので
ファイルサーバノード名 | port | data | meta |
orange1 | 3334 | /opt/orangefs/3334/data | /opt/orangefs/3334/meta |
[root@orange1 ~]# pvfs2-genconfig /etc/orangefs/fs.conf
(略
* Enter protocol type [Default is tcp]:
(略
* Enter port number [Default is 3334]:
(略
* Enter directory name: [Default is /var/lib/orangefs/data]: /opt/orangefs/3334/data
(略
* Enter directory name: [Default is /var/lib/orangefs/meta]: /opt/orangefs/3334/meta
(略
* Enter hostnames [Default is localhost]: orange1
(略
* Enter yes or no [Default is yes]:
Configured a total of 1 servers:
1 of them are I/O servers.
1 of them are Metadata servers.
* Would you like to verify server list (y/n) [Default is n]?
Writing fs config file... done
[root@orange1 ~]#
(中身確認)
[root@orange1 ~]# cat /etc/orangefs/fs.conf
<Defaults>
UnexpectedRequests 50
EventLogging none
EnableTracing no
LogStamp datetime
BMIModules bmi_tcp
FlowModules flowproto_multiqueue
PerfUpdateInterval 1000
ServerJobBMITimeoutSecs 30
ServerJobFlowTimeoutSecs 30
ClientJobBMITimeoutSecs 300
ClientJobFlowTimeoutSecs 300
ClientRetryLimit 5
ClientRetryDelayMilliSecs 2000
PrecreateBatchSize 0,1024,1024,1024,32,1024,0
PrecreateLowThreshold 0,256,256,256,16,256,0
DataStorageSpace /opt/orangefs/3334/data
MetadataStorageSpace /opt/orangefs/3334/meta
LogType syslog
<Security>
TurnOffTimeouts yes
</Security>
</Defaults>
<Aliases>
Alias orange1 tcp://orange1:3334
</Aliases>
<FileSystem>
Name orangefs
ID 858608395
RootHandle 1048576
FileStuffing yes
DistrDirServersInitial 1
DistrDirServersMax 1
DistrDirSplitSize 100
<MetaHandleRanges>
Range orange1 3-4611686018427387904
</MetaHandleRanges>
<DataHandleRanges>
Range orange1 4611686018427387905-9223372036854775806
</DataHandleRanges>
<StorageHints>
TroveSyncMeta yes
TroveSyncData no
TroveMethod alt-aio
</StorageHints>
</FileSystem>
[root@orange1 ~]#
dataとmetaのフォルダを作って
[root@orange1 ~]# mkdir -p /opt/orangefs/3334/data
[root@orange1 ~]# mkdir -p /opt/orangefs/3334/meta
その後に初期化
[root@orange1 ~]# pvfs2-server -f /etc/orangefs/fs.conf
[S 09/21/2021 00:03:29] PVFS2 Server on node orange1 version 2.9.7-orangefs-REV-13124 starting...
*** WARNING *** *** WARNING *** *** WARNING ***
*The MetadataStorageSpace path /opt/orangefs/3334/meta appears
to be on the root device.
*It is recommended that the meta data be
stored on a dedicated partition.
*If you have a dedicated partition setup,
please be sure it is mounted.
*** WARNING *** *** WARNING *** *** WARNING ***
*The DataStorageSpace path /opt/orangefs/3334/data appears
to be on the root device.
*It is recommended that the data be
stored on a dedicated partition.
*If you have a dedicated partition setup,
please be sure it is mounted.
[D 09/21/2021 00:03:29] PVFS2 Server: storage space created.
[D 09/21/2021 00:03:29] Exiting.
[root@orange1 ~]#
どうやらdataとmetaは別のデバイス/パーティションに置いた方がいいたみい.
ちなみに各フォルダは下記のようになった
[root@orange1 ~]# ls -l /opt/orangefs/3334/meta
total 0
drwxr-xr-x. 5 root root 86 Sep 21 00:03 332d530b
drwx--x--x. 2 root root 38 Sep 21 00:03 collections.db
drwx--x--x. 2 root root 38 Sep 21 00:03 storage_attributes.db
[root@orange1 ~]# ls -l /opt/orangefs/3334/data
total 0
drwxr-xr-x. 4 root root 47 Sep 21 00:03 332d530b
[root@orange1 ~]#
あとはデーモンを起動すればいいのだが、「orangefs-server.service」は「/etc/orangefs/orangefs.conf」を参照する様に作られている. ここを修正します
[root@orange1 ~]# vi /usr/lib/systemd/system/orangefs-server.service
[Unit]
Description=OrangeFS Parallel File System Server
After=network.target
[Service]
Type=simple
ExecStart=/usr/sbin/pvfs2-server -d /etc/orangefs/fs.conf <-- この部分を修正
[Install]
WantedBy=multi-user.target
[root@orange1 ~]# systemctl daemon-reload
[root@orange1 ~]# systemctl start orangefs-server.service
最後にfirewall. 3334のみ穴を開ける
[root@orange1 ~]# firewall-cmd --add-port=3334/tcp --zone=public --permanent
[root@orange1 ~]# firewall-cmd --reload
[root@orange2 ~]# cat /etc/redhat-release
Rocky Linux release 8.4 (Green Obsidian)
[root@orange2 ~]# dnf -y install orangefs orangefs-fuse
定義ファイルは「/etc/pvfs2tab」で中身は
[root@orange2 ~]# cat /etc/pvfs2tab
#tcp://localhost:3334/orangefs /pvfsmnt pvfs2
[root@orange2 ~]#
となっている. これを修正して
[root@orange2 ~]# cat /etc/pvfs2tab
tcp://orange1:3334/orangefs /pvfsmnt pvfs2
[root@orange2 ~]#
その後にテストを行う
[root@orange2 ~]# pvfs2-ping -m /pvfsmnt
(1) Parsing tab file...
(2) Initializing system interface...
(3) Initializing each file system found in tab file: /etc/pvfs2tab...
PVFS2 servers: tcp://orange1:3334
Storage name: orangefs
Local mount point: /pvfsmnt
/pvfsmnt: Ok
(4) Searching for /pvfsmnt in pvfstab...
PVFS2 servers: tcp://orange1:3334
Storage name: orangefs
Local mount point: /pvfsmnt
meta servers:
tcp://orange1:3334
data servers:
tcp://orange1:3334
(5) Verifying that all servers are responding...
meta servers:
tcp://orange1:3334 Ok
data servers:
tcp://orange1:3334 Ok
(6) Verifying that fsid 858608395 is acceptable to all servers...
Ok; all servers understand fs_id 858608395
(7) Verifying that root handle is owned by one server...
Root handle: 1048576
Ok; root handle is owned by exactly one server.
=============================================================
The PVFS2 filesystem at /pvfsmnt appears to be correctly configured.
[root@orange2 ~]#
と通信はできた。
一応この段階でfuseを使ってmountできるみたい. 「/etc/pvfs2tab」では「/pvfsmnt」をmountポイントにしてましたが、ここでは「/mnt」で行っています
[root@orange2 ~]# pvfs2fuse /mnt -o fs_spec=tcp://orange1:3334/orangefs
[root@orange2 ~]# df -h /mnt
Filesystem Size Used Avail Use% Mounted on
pvfs2fuse#tcp://orange1:3334/orangefs 14G 1.8G 13G 13% /mnt
[root@orange2 ~]#
「/etc/pvfs2tab」を使うには対応するkernel moduleが必要.
だが標準で用意されていなくコンパイルしてモジュールを用意する必要があります