0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

Proxmoxの2ノードクラスタでは、片方のノードが停止すると過半数を確保できず、Quorumを失う場合があります。
Quorumを失うと、VMが起動できなくなったりします。
つまり2nodeでHAを組むためには、最低でも外部qDeviceが必要という事です。

そこで、OpenWrtが動作しているGL.iNet AXT1800上でcorosync-qnetdを動かし、第三の投票先となるQDeviceとして利用しました。
本記事では、AXT1800のWAN側にProxmoxノードが存在する構成での導入手順と、片系停止試験の結果をまとめます。

今回は、以下のリポジトリに公開されているbuild手順

を使って、Gl.iNet AXT1800ルーター(OpenWRT)をqdevice化します。
私の場合は以下のようにAXT1800のwan側にProxmoxが居るため、若干追加作業をしています。

なお、WAN側ポートを開ける作業を行わず普通に入れればLAN側でqnetdが動くようになっているようです。

この例では以下のネットワークを前提にしてます。
axt1800_qdevice_network.png

PVE1: 192.168.77.2
PVE2: 192.168.77.7
AXT1800:
WAN側: 192.168.77.199
LAN側: 192.168.8.0/24

ちなみに今回使ったAXT1800は、もともと家の中でWi-Fiが届きにくい場所を補うために使っていたルーターです。
普段のルーター用途はそのままに、空いているリソースでProxmoxクラスタのQDeviceも担当してもらうことにしました。

この記事では、公式READMEだけでは分かりにくかった以下の点も扱います。

  • AXT1800のWAN側からQNetdを利用するFW設定
  • libqbの並列ビルド失敗時の回避方法(Issueで報告済み)
  • Proxmox側に必要なcorosync-qdeviceパッケージ
  • 片方のPVEノードを停止した際のQuorum維持確認

「ここ試験に出るからね。大事だよ~」

対象ルーターのCPUアーキテクチャを確認する

本記事のビルド成果物はAArch64向けです。MIPS系OpenWrtルーターではそのまま利用できません。

この手順で生成するIPKは、すべてのOpenWrtルーターで利用できるわけではありません。ルーターによってCPUの命令セット(MIPS / ARM 32bit / ARM64・AArch64)とOpenWrtのパッケージアーキテクチャが異なります。

今回使用するリポジトリは、OpenWrt 23.05のAArch64/musl向けにビルドし、最終的にGL.iNet用のaarch64_cortex-a53_neon-vfpv4へIPKのArchitectureを書き換える構成です。したがって、MIPS機へそのまま入れることはできません。

まず対象ルーターで以下を確認します。

uname -m
opkg print-architecture
cat /etc/openwrt_release

今回のGL.iNet AXT1800では、以下のようになりました。

aarch64
arch all 1
arch noarch 1
arch aarch64_cortex-a53_neon-vfpv4 10
DISTRIB_TARGET='ipq60xx/generic'
DISTRIB_ARCH='aarch64_cortex-a53_neon-vfpv4'

arch aarch64_cortex-a53_neon-vfpv4が含まれているので、今回のリポジトリが生成するパッケージと一致することが分かります。

大まかな目安

ルーター系統 よくあるCPU系統 典型的な表示例 今回のIPK
GL.iNet AXT1800 / Flint系の一部 ARM64 / AArch64 aarch64_cortex-a53_neon-vfpv4 利用候補
GL.iNetの新しいMediaTek系 ARM64 / AArch64 aarch64_cortex-a53など 再ビルドやArchitecture確認が必要
GL.iNetの旧型小型機 MIPS系の場合あり mips_24kcなど 利用不可
TP-Link Archer旧世代 MIPS系が多い mips_24kcmipsel_24kcなど 利用不可
TP-Link Archer新世代 ARM系もある arm_cortex-a7aarch64など 機種ごとに確認
Raspberry Pi ARM / ARM64 aarch64arm_cortex-a7など このIPKではなくDebianパッケージ利用が容易

参考までに、GL.iNet主要機種だけ別表にまとめました(Not verified:AXT1800以外はこの記事内で実機検証していません)。

機種 SoC系統 CPUアーキテクチャの目安 今回のリポジトリ
GL-AXT1800 Slate AX Qualcomm IPQ60xx系 ARM64 今回実証済み
GL-AX1800 Flint Qualcomm IPQ60xx系 ARM64 可能性高いが実機確認
GL-MT3000 Beryl AX MediaTek Filogic系 ARM64 SDK target差の確認が必要
GL-MT6000 Flint 2 MediaTek Filogic系 ARM64 SDK target差の確認が必要
GL-AR750S Slate Qualcomm Atheros旧世代 MIPS 今回のIPKは不可
GL-MT300N-V2 Mango MediaTek旧世代 MIPS 今回のIPKは不可

これらの表はあくまで大分類の目安です。同じ製品シリーズ・同じ製品名でも、ハードウェアリビジョンによってSoCが変わっていることがあります。「GL.iNetだから対応」「ArcherだからMIPS」と製品名だけで判断せず、最終的には実機のopkg print-architecture/etc/openwrt_releaseの結果で判断してください。

ちなみにOpenWrt対応ルーターは、外見はどれも似た箱なのに、中身はMIPS・ARM・ARM64と国籍がバラバラです。今回は、AXT1800がAArch64であり、OpenWrtのパッケージアーキテクチャも今回のビルド成果物と一致することを事前に確認してから作業に入りました。別機種で試す場合はまずアーキテクチャの確認から始めてください。

なお、別アーキテクチャ向けの実装やリポジトリが公開されている場合もあるため、対象機種に合うものがないか探してみてください。

0. AXT1800のWAN側にqdeviceを作るので、まずはWAN側IPを固定化する

  • 自分の場合は、上位ルータ(WXR)のDHCPで、MACアドレスから固定のIPを払い出す設定をしました
  • その後AXT側に入り、rebootするなり、WAN側のIPを取り直してください

1. AXT1800のWAN側にqdeviceを作るのでまずはWAN側にSSHの穴を開ける

uci -q delete firewall.allow_qdevice_ssh
uci set firewall.allow_qdevice_ssh='rule'
uci set firewall.allow_qdevice_ssh.name='Allow-QDevice-SSH-Proxmox'
uci set firewall.allow_qdevice_ssh.src='wan'
uci add_list firewall.allow_qdevice_ssh.src_ip='192.168.77.2'
uci add_list firewall.allow_qdevice_ssh.src_ip='192.168.77.7'
uci set firewall.allow_qdevice_ssh.dest_port='22'
uci set firewall.allow_qdevice_ssh.proto='tcp'
uci set firewall.allow_qdevice_ssh.target='ACCEPT'

uci -q delete firewall.allow_qnetd_proxmox
uci set firewall.allow_qnetd_proxmox='rule'
uci set firewall.allow_qnetd_proxmox.name='Allow-QNetd-Proxmox'
uci set firewall.allow_qnetd_proxmox.src='wan'
uci add_list firewall.allow_qnetd_proxmox.src_ip='192.168.77.2'
uci add_list firewall.allow_qnetd_proxmox.src_ip='192.168.77.7'
uci set firewall.allow_qnetd_proxmox.dest_port='5403'
uci set firewall.allow_qnetd_proxmox.proto='tcp'
uci set firewall.allow_qnetd_proxmox.target='ACCEPT'

uci commit firewall
/etc/init.d/firewall restart
Section wan_drop_leaked_adgdns (wan_drop_leaked_adgdns) is disabled, ignoring section
Section wan_drop_leaked_dns (wan_drop_leaked_dns) is disabled, ignoring section
Section guest_drop_leaked_dns (guest_drop_leaked_dns) is disabled, ignoring section
Section guest_drop_leak_adgdns (guest_drop_leak_adgdns) is disabled, ignoring section
Section @rule[12] (Support-UDP-Traceroute) is disabled, ignoring section
Section wgserver_drop_leaked_dns (wgserver_drop_leaked_dns) option 'src' specifies invalid value 'wgserver'
Section wgserver_drop_leaked_dns (wgserver_drop_leaked_dns) skipped due to invalid options
Section ovpnserver_drop_leaked_dns (ovpnserver_drop_leaked_dns) option 'src' specifies invalid value 'ovpnserver'
Section ovpnserver_drop_leaked_dns (ovpnserver_drop_leaked_dns) skipped due to invalid options
Section wgserver_drop_leaked_adgdns (wgserver_drop_leaked_adgdns) option 'src' specifies invalid value 'wgserver'
Section wgserver_drop_leaked_adgdns (wgserver_drop_leaked_adgdns) skipped due to invalid options
Section ovpnserver_drop_leaked_adgdns (ovpnserver_drop_leaked_adgdns) option 'src' specifies invalid value 'ovpnserver'
Section ovpnserver_drop_leaked_adgdns (ovpnserver_drop_leaked_adgdns) skipped due to invalid options
Section sambasharewan specifies unknown option 'dest_proto'
Section sambasharelan specifies unknown option 'dest_proto'
Section glnas_ser specifies unknown option 'dest_proto'
Section webdav_wan specifies unknown option 'dest_proto'
Section @include[0] is not marked as compatible with fw4, ignoring section
Section @include[0] requires 'option fw4_compatible 1' to be considered compatible
Section nat6 option 'reload' is not supported by fw4
Section dns_order option 'reload' is not supported by fw4
Section security option 'reload' is not supported by fw4
Section glblock option 'reload' is not supported by fw4
Automatically including '/usr/share/nftables.d/ruleset-post/dns_accept.nft'
Automatically including '/usr/share/nftables.d/chain-pre/dstnat/00-dhcp-no-flow_offloading.nft'
sh: /etc/firewall.nat6: line 50: ip6tables-restore: not found
# Warning: iptables-legacy tables present, use iptables-legacy-save to see them
Include '/etc/firewall.nat6' failed with exit code 127
# Warning: iptables-legacy tables present, use iptables-legacy-save to see them
# Warning: iptables-legacy tables present, use iptables-legacy-save to see them
sh: ip6tables-save: not found
sh: ip6tables-save: not found
uci show firewall.allow_qdevice_ssh
uci show firewall.allow_qnetd_proxmox
firewall.allow_qdevice_ssh=rule
firewall.allow_qdevice_ssh.name='Allow-QDevice-SSH-Proxmox'
firewall.allow_qdevice_ssh.src='wan'
firewall.allow_qdevice_ssh.src_ip='192.168.77.2' '192.168.77.7'
firewall.allow_qdevice_ssh.dest_port='22'
firewall.allow_qdevice_ssh.proto='tcp'
firewall.allow_qdevice_ssh.target='ACCEPT'
firewall.allow_qnetd_proxmox=rule
firewall.allow_qnetd_proxmox.name='Allow-QNetd-Proxmox'
firewall.allow_qnetd_proxmox.src='wan'
firewall.allow_qnetd_proxmox.src_ip='192.168.77.2' '192.168.77.7'
firewall.allow_qnetd_proxmox.dest_port='5403'
firewall.allow_qnetd_proxmox.proto='tcp'
firewall.allow_qnetd_proxmox.target='ACCEPT'

2. ビルド

パッケージビルド用のdockerコンテナを建てビルドする。

*既にUbuntu 24.04のVMが存在したため、今回はそこを利用する。

git clone https://github.com/jrparks/corosync-qnetd-openwrt.git
cd corosync-qnetd-openwrt

docker build -t openwrt-corosync .
bash run-build.sh

tail -f output/build.log

ちなみにそのまま流すと、エラーになる場合がある。
Buildの並列化のせいらしい。

# 最後数行のみ表示
make: *** [/opt/sdk/include/toplevel.mk:225: package/corosync/libknet/compile] Error 2

build.shのビルドを並列化せず、直列化する。

sed -i 's/-j$(nproc)/-j1/g' build.sh
grep 'make package' build.sh

中途半端な libqb のビルド結果を消してから再実行。
一応、sdk-state, outputのパーミッションも取っておく。

sudo rm -rf sdk-state/build_dir/target-aarch64_generic_musl/libqb-2.0.8
sudo rm -f sdk-state/staging_dir/target-aarch64_generic_musl/stamp/.libqb_installed
sudo chown -R "$USER":"$USER" sdk-state output
bash run-build.sh

成功すると、outputディレクトリ配下に以下のパッケージが出来るはず

corosync-nss-tools_3.0.4-1_aarch64_generic.ipk
corosync-qnetd_3.0.4-1_aarch64_generic.ipk
libknet_1.28-1_aarch64_generic.ipk
libnspr_4.35-1_aarch64_generic.ipk
libnss_3.98-8_aarch64_generic.ipk
libqb_2.0.8-1_aarch64_generic.ipk

出来上がるバージョンは微妙にビルドタイミングで変わる可能性があります。

3. ビルド完了後のパッケージをAXT1800にコピー

pve1,2からしかWAN側にssh出来ないようにしたので、一旦pve1にコピーしpve1から、axtにパッケージを移動しました。

Ubuntuから:

scp output/*.ipk root@192.168.77.2:/tmp/

pve1から:

scp -O /tmp/*.ipk root@192.168.77.199:/tmp/

4. AXT1800に出来上がったパッケージ類をインストール

確認作業
AXT1800側で:

ls -lh /tmp/*.ipk

6つのipkがあればOK

まずSFTPサーバーを入れます。

opkg update
opkg install openssh-sftp-server

続いて6パッケージを導入します。

opkg install --nodeps --force-reinstall \
  /tmp/libnspr_*.ipk \
  /tmp/libnss_*.ipk \
  /tmp/libqb_*.ipk \
  /tmp/libknet_*.ipk \
  /tmp/corosync-qnetd_*.ipk \
  /tmp/corosync-nss-tools_*.ipk

付属のpostinstは引数なしでcorosync-qnetd-setupを実行するため、インストール時にはFW設定をスキップし、NSS DB作成とサービス起動だけ行います。
ちなみにcorosync-qnetd-setup 192.168.77.2 192.168.77.7は実行しない
実行するとsrc='lan'のルールへ置き換えてしまいます

成功すると以下のようになるはずです

root@GL-AXT1800:~# opkg install --nodeps --force-reinstall \
>   /tmp/libnspr_*.ipk \
>   /tmp/libnss_*.ipk \
>   /tmp/libqb_*.ipk \
>   /tmp/libknet_*.ipk \
>   /tmp/corosync-qnetd_*.ipk \
>   /tmp/corosync-nss-tools_*.ipk
No packages removed.
Updating database.
Database update completed.
Installing libnspr (4.35-1) to root...
Installing libnss (3.98-8) to root...
Installing libqb (2.0.8-1) to root...
Installing libknet (1.28-1) to root...
Installing corosync-qnetd (3.0.4-1) to root...
Installing corosync-nss-tools (3.0.4-1) to root...
Configuring libqb.
Configuring libnspr.
Configuring libnss.
moduleSpec configdir='' certPrefix='' keyPrefix='' secmod='' flags=noCertDB, noModDB
Library File: /usr/lib/libfreeblpriv3.so
Check File: /usr/lib/libfreeblpriv3.chk
Generate an HMAC key ...
Library File Size: 655377 bytes
  key: 32 bytes
    74 61 b9 a6 7b e3 3e fb b5 a2
    77 1d bd 84 98 39 b5 98 76 a2
    cd 97 5c 79 ee 5d 88 67 6f 6e
    d6 ec
  signature: 32 bytes
    99 d2 d9 93 d3 03 26 39 6d ec
    30 9e f6 96 bc 87 23 07 03 40
    b8 ab d7 09 58 cb e0 d2 7c a3
    33 2b
moduleSpec configdir='' certPrefix='' keyPrefix='' secmod='' flags=noCertDB, noModDB
Library File: /usr/lib/libsoftokn3.so
Check File: /usr/lib/libsoftokn3.chk
Generate an HMAC key ...
Library File Size: 463314 bytes
  key: 32 bytes
    48 8a df a4 43 71 c4 bd 33 91
    13 f6 73 a1 a5 03 25 32 f4 a7
    6d 12 d3 c0 c0 06 2b 23 cb d7
    25 43
  signature: 32 bytes
    bf 0c 98 02 d5 04 6e 8e 1f 73
    42 3e 60 e1 bc 7d 62 a7 94 77
    3a eb 02 07 e8 03 ce 9c f2 09
    87 ed
Configuring libknet.
Configuring corosync-qnetd.
Configuring corosync-nss-tools.

Generating key.  This may take a few moments...
Generating key.  This may take a few moments...

Notice: Trust flag u is set automatically if the private key is present.
  No IPs given — skipping firewall setup.
  Run manually: corosync-qnetd-setup <node1-ip> [node2-ip] ...
QNetd ready for Proxmox at port 5403
Updating database.
Database update completed.

WAN側向けなので以下のメッセージが出ています。
付属スクリプトがLAN向けFWルールを作らず終了したので、今回の構成ではむしろ狙いどおりです。

No IPs given — skipping firewall setup.
QNetd ready for Proxmox at port 5403

5. 動作確認

corosync状態確認

root@GL-AXT1800:~# /etc/init.d/corosync-qnetd status
root@GL-AXT1800:~# netstat -tlnp | grep 5403
tcp        0      0 0.0.0.0:5403            0.0.0.0:*               LISTEN      14968/corosync-qnet
root@GL-AXT1800:~# /usr/sbin/corosync-qnetd-tool -s
QNetd address:                  *:5403
TLS:                            Supported (client certificate required)
Connected clients:              0
Connected clusters:             0

5403でlisten出来ていますね。

念のためSFTPパスも確認します。

root@GL-AXT1800:~# ls -l /usr/lib/sftp-server /usr/libexec/sftp-server 2>/dev/null
-rwxr-xr-x    1 root     root        196637 Mar 13  2025 /usr/lib/sftp-server
lrwxrwxrwx    1 root     root            18 Jul 11 17:33 /usr/libexec/sftp-server -> ../lib/sftp-server

/usr/libexec/sftp-serverにリンクされているのでOKです。
リンクされてなければ以下で作れます。

mkdir -p /usr/libexec
ln -sf /usr/lib/sftp-server /usr/libexec/sftp-server

5403が開いているか確認

pve1から:

nc -vz 192.168.77.199 5403
192.168.77.199: inverse host lookup failed: Unknown host
(UNKNOWN) [192.168.77.199] 5403 (?) open

openなので、OK

pve1,2にcorosync-qdeviceを入れておく

これを忘れると次のステップでエラーになります。

apt install corosync-qdevice

6. Proxmoxからqdevice設定

pve1,2起動中にpve1から

pvecm qdevice setup 192.168.77.199

以下のように表示されます。

/bin/ssh-copy-id: INFO: Source of key(s) to be installed: "/root/.ssh/id_rsa.pub"
/bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed

/bin/ssh-copy-id: WARNING: All keys were skipped because they already exist on the remote system.
                (if you think this is a mistake, you may want to use -f option)


INFO: initializing qnetd server
INFO: copying CA cert and initializing on all nodes
node 'pve1': Creating /etc/corosync/qdevice/net/nssdb
password file contains no data
node 'pve1': Creating new key and cert db
node 'pve1': Creating new noise file /etc/corosync/qdevice/net/nssdb/noise.txt
node 'pve1': Importing CA
node 'pve2': Creating /etc/corosync/qdevice/net/nssdb
password file contains no data
node 'pve2': Creating new key and cert db
node 'pve2': Creating new noise file /etc/corosync/qdevice/net/nssdb/noise.txt
node 'pve2': Importing CA
INFO: generating cert request
Creating new certificate request

Generating key.  This may take a few moments...
Certificate request stored in /etc/corosync/qdevice/net/nssdb/qdevice-net-node.crq
INFO: copying exported cert request to qnetd server
INFO: sign and export cluster cert
pk12util: PKCS12 EXPORT SUCCESSFUL
-----BEGIN CERTIFICATE-----
MII...
-----END CERTIFICATE-----

INFO: copy exported CRT
INFO: import certificate
Importing signed cluster certificate
Notice: Trust flag u is set automatically if the private key is present.
pk12util: PKCS12 EXPORT SUCCESSFUL
Certificate stored in /etc/corosync/qdevice/net/nssdb/qdevice-net-node.p12

INFO: copy and import pk12 cert to all nodes
node 'pve1': Importing cluster certificate and key
node 'pve1': pk12util: PKCS12 IMPORT SUCCESSFUL
node 'pve2': Importing cluster certificate and key
node 'pve2': pk12util: PKCS12 IMPORT SUCCESSFUL
INFO: add QDevice to cluster configuration

INFO: start and enable corosync qdevice daemon on node 'pve1'...
Synchronizing state of corosync-qdevice.service with SysV service script with /usr/lib/systemd/systemd-sysv-install.
Executing: /usr/lib/systemd/systemd-sysv-install enable corosync-qdevice
Created symlink '/etc/systemd/system/multi-user.target.wants/corosync-qdevice.service' -> '/usr/lib/systemd/system/corosync-qdevice.service'.

INFO: start and enable corosync qdevice daemon on node 'pve2'...
Synchronizing state of corosync-qdevice.service with SysV service script with /usr/lib/systemd/systemd-sysv-install.
Executing: /usr/lib/systemd/systemd-sysv-install enable corosync-qdevice
Created symlink '/etc/systemd/system/multi-user.target.wants/corosync-qdevice.service' -> '/usr/lib/systemd/system/corosync-qdevice.service'.
Reloading corosync.conf...
Done

確認コマンド:

pve1から

root@pve1:~# pvecm status
Cluster information
-------------------
Name:             Cluster
Config Version:   3
Transport:        knet
Secure auth:      on

Quorum information
------------------
Date:             Sat Jul 11 18:30:05 2026
Quorum provider:  corosync_votequorum
Nodes:            2
Node ID:          0x00000001
Ring ID:          1.3e7
Quorate:          Yes

Votequorum information
----------------------
Expected votes:   3
Highest expected: 3
Total votes:      3
Quorum:           2
Flags:            Quorate Qdevice

Membership information
----------------------
    Nodeid      Votes    Qdevice Name
0x00000001          1

root@pve1:~# corosync-qdevice-tool -s

Qdevice information
-------------------
Model:                  Net
Node ID:                1
Configuration version:  3
Configured node list:
    0   Node ID = 1
    1   Node ID = 2
Membership node list:   1, 2

Qdevice-net information
----------------------
Cluster name:           Cluster
QNetd host:             192.168.77.199:5403
Algorithm:              Fifty-Fifty split
Tie-breaker:            Node with lowest node ID
State:                  Connected

pvecm statusで確認できているポイントは以下です。

Expected votes: 3
Total votes: 3
Quorum: 2
Flags: Quorate Qdevice
QDeviceの状態:Connected
QNetd側:Connected clients: 2
QNetd側:Connected clusters: 1

つまり、以下の3票構成になっています。
pve1 = 1票
pve2 = 1票
AXT1800 QDevice = 1票

更にcorosync-qdevice-tool -sの結果で
・QNetd hostが192.168.77.199:5403と表示されている
・stateがconnectedで表示されている
のでOK

AXT1800側:

root@GL-AXT1800:~# corosync-qnetd-tool -s
QNetd address:                  *:5403
TLS:                            Supported (client certificate required)
Connected clients:              2
Connected clusters:             1

Connected clients, Connected clustersの数がそれぞれ2,1で表示されているのでOK

最終確認

pve2を落として正しくqdeviceからvoteされることを確認

root@pve1:~# pvecm status
Cluster information
-------------------
Name:             Cluster
Config Version:   3
Transport:        knet
Secure auth:      on

Quorum information
------------------
Date:             Sat Jul 11 18:53:33 2026
Quorum provider:  corosync_votequorum
Nodes:            2
Node ID:          0x00000001
Ring ID:          1.3e7
Quorate:          Yes

Votequorum information
----------------------
Expected votes:   3
Highest expected: 3
Total votes:      3
Quorum:           2
Flags:            Quorate Qdevice

Membership information
----------------------
    Nodeid      Votes    Qdevice Name
0x00000001          1    A,V,NMW 192.168.77.2 (local)
0x00000002          1    A,V,NMW 192.168.77.7
0x00000000          1            Qdevice
root@pve1:~# ssh root@pve2
Linux pve2 7.0.6-2-pve #1 SMP PREEMPT_DYNAMIC PMX 7.0.6-2 (2026-05-29T11:08Z) x86_64

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Sat Jul 11 18:15:10 2026 from 192.168.77.199
root@pve2:~# shutdown -h 0
Shutdown scheduled for Sat 2026-07-11 18:53:52 JST, use 'shutdown -c' to cancel.
root@pve2:~# Read from remote host 192.168.77.7: Connection reset by peer
Connection to 192.168.77.7 closed.
client_loop: send disconnect: Broken pipe
root@pve1:~# pvecm status
Cluster information
-------------------
Name:             Cluster
Config Version:   3
Transport:        knet
Secure auth:      on

Quorum information
------------------
Date:             Sat Jul 11 18:54:13 2026
Quorum provider:  corosync_votequorum
Nodes:            1
Node ID:          0x00000001
Ring ID:          1.3eb
Quorate:          Yes

Votequorum information
----------------------
Expected votes:   3
Highest expected: 3
Total votes:      2
Quorum:           2
Flags:            Quorate Qdevice

Membership information
----------------------
    Nodeid      Votes    Qdevice Name
0x00000001          1    A,V,NMW 192.168.77.2 (local)
0x00000000          1            Qdevice

はい、Total votes:2になっており、期待どおりQDeviceが投票しています。成功です。
もう少し説明するとpve2停止後が、

Nodes:            1
Expected votes:   3
Total votes:      2
Quorum:           2
Flags:            Quorate Qdevice

なので、

pve1    1票
QDevice 1票
合計     2票

でQuorum 2を満たしています。

Membershipにも、

0x00000001  1  A,V,NMW 192.168.77.2
0x00000000  1          Qdevice

と出ているため、AXT1800がpve1側へ正常に1票を付与しています。

これで今回の目的は完全達成です

pve1停止 → pve2 + QDeviceでQuorum維持
pve2停止 → pve1 + QDeviceでQuorum維持
AXT1800停止だけ → pve1 + pve2でQuorum維持
片方のPVEとAXT1800が同時停止 → Quorum喪失

我が家では、AXT1800もpve1,2とは別電源系統に接続したので、さらに安心です。

おまけ:Proxmox環境をまとめて構築したい場合

この記事では既存のProxmox 2ノードクラスタにQDeviceを追加しました。

Proxmoxクラスタでの開発環境構築については、以下の記事にまとめています。

0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?