OceanBase 快速上手(二)
【摘要】 检查集群状态:[root@db01 ~]# obd cluster list+--------------------------------------------------+| Cluster List |+------+-------------------------+-----------------+| N...
检查集群状态:
[root@db01 ~]# obd cluster list
+--------------------------------------------------+
| Cluster List |
+------+-------------------------+-----------------+
| Name | Configuration Path | Status (Cached) |
+------+-------------------------+-----------------+
| test | /root/.obd/cluster/test | running |
+------+-------------------------+-----------------+
停止集群:
[root@db01 ~]# obd cluster list
+--------------------------------------------------+
| Cluster List |
+------+-------------------------+-----------------+
| Name | Configuration Path | Status (Cached) |
+------+-------------------------+-----------------+
| test | /root/.obd/cluster/test | stopped |
+------+-------------------------+-----------------+
[root@db01 ~]#
启动集群:
[root@db01 ~]# obd cluster start test
Get local repositories and plugins ok
Open ssh connection ok
Cluster param config check ok
Check before start observer ok
[WARN] (127.0.0.1) The recommended value of fs.aio-max-nr is 1048576 (Current value: 65536)
[WARN] (127.0.0.1) The recommended number of open files is 655350 (Current value: 99999)
Start observer ok
observer program health check ok
Connect to observer ok
Wait for observer init ok
+---------------------------------------------+
| observer |
+-----------+---------+------+-------+--------+
| ip | version | port | zone | status |
+-----------+---------+------+-------+--------+
| 127.0.0.1 | 3.1.1 | 2881 | zone1 | active |
+-----------+---------+------+-------+--------+
test running
检查集群资源:
[root@db01 ~]# obclient -h127.1 -uroot@sys -P2881 -prootPWD123 -c -A oceanbase
Welcome to the OceanBase. Commands end with ; or \g.
Your MySQL connection id is 3221487629
Server version: 5.7.25 OceanBase 3.1.1 (r4-8c615943cbd25a6f7b8bdfd8677a13a21709a05e) (Built Oct 21 2021 10:33:14)
Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
MySQL [oceanbase]> select * from __all_unit;
+----------------------------+----------------------------+---------+------------------+----------+-------+-----------+----------+---------------------+-----------------------+----------------+--------+--------------+
| gmt_create | gmt_modified | unit_id | resource_pool_id | group_id | zone | svr_ip | svr_port | migrate_from_svr_ip | migrate_from_svr_port | manual_migrate | status | replica_type |
+----------------------------+----------------------------+---------+------------------+----------+-------+-----------+----------+---------------------+-----------------------+----------------+--------+--------------+
| 2021-12-04 08:53:46.852722 | 2021-12-04 08:53:46.852722 | 1 | 1 | 0 | zone1 | 127.0.0.1 | 2882 | | 0 | 0 | ACTIVE | 0 |
| 2021-12-04 09:06:22.540623 | 2021-12-04 09:06:22.540623 | 1001 | 1001 | 0 | zone1 | 127.0.0.1 | 2882 | | 0 | 0 | ACTIVE | 0 |
+----------------------------+----------------------------+---------+------------------+----------+-------+-----------+----------+---------------------+-----------------------+----------------+--------+--------------+
2 rows in set (0.001 sec)
MySQL [oceanbase]> select * from v$unit;
+---------+----------------+------------------+------------------+--------------------+-------+-----------+-------------+-----------+----------+---------------------+-----------------------+---------+---------+------------+------------+----------+----------+---------------+---------------------+
| unit_id | unit_config_id | unit_config_name | resource_pool_id | resource_pool_name | zone | tenant_id | tenant_name | svr_ip | svr_port | migrate_from_svr_ip | migrate_from_svr_port | max_cpu | min_cpu | max_memory | min_memory | max_iops | min_iops | max_disk_size | max_session_num |
+---------+----------------+------------------+------------------+--------------------+-------+-----------+-------------+-----------+----------+---------------------+-----------------------+---------+---------+------------+------------+----------+----------+---------------+---------------------+
| 1 | 1 | sys_unit_config | 1 | sys_pool | zone1 | 1 | sys | 127.0.0.1 | 2882 | | 0 | 5 | 5 | 1288490188 | 1073741824 | 10000 | 5000 | 5368709120 | 9223372036854775807 |
| 1001 | 1001 | S4C1G | 1001 | my_pool | zone1 | 1001 | obmysql | 127.0.0.1 | 2882 | | 0 | 4 | 4 | 1073741824 | 1073741824 | 10000 | 1000 | 1099511627776 | 1000000 |
+---------+----------------+------------------+------------------+--------------------+-------+-----------+-------------+-----------+----------+---------------------+-----------------------+---------+---------+------------+------------+----------+----------+---------------+---------------------+
2 rows in set (0.017 sec)
MySQL [oceanbase]>
【版权声明】本文为华为云社区用户原创内容,转载时必须标注文章的来源(华为云社区)、文章链接、文章作者等基本信息, 否则作者和本社区有权追究责任。如果您发现本社区中有涉嫌抄袭的内容,欢迎发送邮件进行举报,并提供相关证据,一经查实,本社区将立刻删除涉嫌侵权内容,举报邮箱:
cloudbbs@huaweicloud.com
- 点赞
- 收藏
- 关注作者
评论(0)