obd离线部署OceanBase报错[ERROR] The machine's minimum memory cannot be less than min_value (6G)

obd离线部署OceanBase报错;


[admin@localhost ~]$ obd cluster deploy -i
Enter the IP (Default: 127.0.0.1): 192.168.40.110
Enter the current user password:
get system config ok
No need to change system parameters
Do you want to modify the parameters above? [y/n] [Default: y]:
get system config ok
No need to change system parameters
Enter the cluster name (Default: myoceanbase; allowed characters: letters, numbers, and underscores):
+-----------------------------------------------------------------------------------------------------+
|                                         Available Oceanbase                                         |
+--------------+---------+------------------------+--------+------------------------------------------+
| name         | version | release                | arch   | md5                                      |
+--------------+---------+------------------------+--------+------------------------------------------+
| oceanbase-ce | 4.3.5.3 | 103000092025080818.el7 | x86_64 | 8120a146d35cd47a9289d91990c8b44a8c21675d |
+--------------+---------+------------------------+--------+------------------------------------------+
Enter the OB SQL port (Default: 2881):
Enter the OB RPC port (Default: 2882):
Enter the obshell port (Default: 2886):
Enter the OB root password (Default: 7VgTKmtayeLXZonzJ3MY):
Enter the OB cpu count (Default: 2):
The cpu_count cannot be less than 8. It will be set to 8 automatically.
[ERROR] The machine's minimum memory cannot be less than min_value (6G). Please try again.
See https://www.oceanbase.com/product/ob-deployer/error-codes .
Trace ID: ea45a458-8d30-11f0-8df1-000c29e13c26
If you want to view detailed obd logs, please run: obd display-trace ea45a458-8d30-11f0-8df1-000c29e13c26
[admin@localhost ~]$ free -g
              total        used        free      shared  buff/cache   available
Mem:              7           0           4           0           2           3
Swap:             1           0           1
查看结果显示的内存不满足部署 OceanBase 数据库的内存要求,执行如下命令清空 Linux 缓存:PageCache、dentries 和 inodes。
sudo sysctl -w vm.drop_caches=3
#或
sudo echo 3 > /proc/sys/vm/drop_caches
再次安装依然报错:[ERROR] The machine's minimum memory cannot be less than min_value (6G). Please try again.
[admin@localhost ~]$ free -g
              total        used        free      shared  buff/cache   available
Mem:              7           0           7           0           0           4
Swap:             1           0           1

2 个赞

明显就是内存不足,你这配置有点低啊,怎么也得16G内存以上吧

1 个赞

单点官方文档写的低配2C6G就可以

1 个赞

而且就只部署OBD和OceanBase

1 个赞

那是ob的集群最小需求,你应该是操作系统总共6G。这是肯定不够的

1 个赞


官方文档这个地方是不是就不准确了,感觉得改成可用内存最低要求6G,个人感觉容易引起混淆

1 个赞

好的 这边反馈一下

2 个赞

最近最小化安装4.5版本单机版遇到同样的报错问题,分享一下解决办法:

分析:obd判断可用内存看available

OBD 判断内存不是看 free,而是看 available(4612MB ≈ 4.5GB)。
available : 表示应用程序还可以申请到的内存,计算方式:free + 可回收的 buff/cache - 部分已占用但可回收的内存,比 free 更严格。

$ free -m
              total        used        free      shared  buff/cache   available
Mem:           7981         182        7631           8         168        4612
Swap:             0           0           0

查看内存参数

obd安装的时候调整操作参数,为操作系统预留2GB内存,导致可分配内存不足
# sysctl -a | grep min_free
vm.min_free_kbytes=2097152

 # 实验环境最小化安装,将os预留内存调整为256M,再查看内存,已经足够
# vi /etc/sysctl.conf
vm.min_free_kbytes=262144
$free -m
              total        used        free      shared  buff/cache   available
Mem:           7981         175        7747           8          59        7356
Swap:             0           0           0

重装执行安装,问题解决

提示修改参数是选否
$ obd cluster deploy -i
...
Please run \`obd host init admin 1.1.1.91 -p '******'\` to init host.
Do you want to modify the parameters above? [y/n] [Default: y]: n            #  选否
...
The cpu_count cannot be less than 8. It will be set to 8 automatically.
Enter the OB memory limit (Configurable Range[6, 7], Default: 7, Unit: G): 6    # 未再报错可用内存不足
...

:+1: :+1: :+1:

看看看看