1、工作流程分析
步骤说明:
1、 Cli接收到用户的输入后,对命令进行解析,判断命令是否合法(命令格式,字符拼写等检查),然后RPC调用本机的glusterd程序的远程函数,glusterd程序开始解析addbrick的命令行,判断里面的hostname所对应机器是否存在;peer内的uuid是否存在;brick所对应的路径是否存在;检查所对应的brick是否已经存在,日志片段如下:
[glusterd-op-sm.c:8544:glusterd_op_set_cli_op] 0-: Returning 0 [glusterd-handler.c:1306:glusterd_handle_add_brick] 0-glusterd: Receiv [glusterd-utils.c:847:glusterd_volinfo_find] 0-: Volume test found [glusterd-utils.c:855:glusterd_volinfo_find] 0-: Returning 0 [glusterd-utils.c:630:glusterd_brickinfo_new] 0-: Returning 0 [glusterd-utils.c:687:glusterd_brickinfo_from_brick] 0-: Returning 0 [glusterd-utils.c:2755:glusterd_friend_find_by_hostname] 0-glusterd: U [glusterd-utils.c:211:glusterd_is_local_addr] 0-glusterd: sdc0 is loca [glusterd-utils.c:2789:glusterd_hostname_to_uuid] 0-: returning 0 [glusterd-utils.c:642:glusterd_resolve_brick] 0-: Returning 0 [glusterd-utils.c:760:glusterd_volume_brickinfo_get] 0-: Returning -1 [glusterd-utils.c:2927:glusterd_new_brick_validate] 0-: returning 0 [glusterd-utils.c:760:glusterd_volume_brickinfo_get] 0-: Returning -1 [glusterd-utils.c:630:glusterd_brickinfo_new] 0-: Returning 0 [glusterd-utils.c:687:glusterd_brickinfo_from_brick] 0-: Returning 0 [glusterd-utils.c:2707:glusterd_friend_find_by_hos |