这是因为启动meta server的时候用了-c参数,而chunk server所有的chunk目录都需要清空一次,否则就会报不匹配的错误
[qfs@my-computer tools]$ ./qfsadmin -s metaserver-ip -p 20000 -v -- check_leases Cseq: 1865947047709105122 Status: 0 10-14-2016 01:50:45.088 DEBUG - version: master-a79aaf7324e4ee55609c55cca73a6bbe8d01e12c-RelWithDebInfo-2DC1BDBD master-https://github.com/quantcast/qfs.git/unknown@a79aaf7324e4ee55609c55cc\ a73a6bbe8d01e12c 10-14-2016 01:50:45.091 DEBUG - (KfsNetClient.cc:1347) connecting to server: metaserver-ip 20000 auth: off 10-14-2016 01:50:45.091 DEBUG - (MonClient.cc:164) op completed: CHECK_LEASES status: 0 status: 0 msg:
[qfs@my-computer tools]$ ./qfsadmin -s metaserver-ip -p 20000 -v -- fsck Lost files total: 0 Directories: 2 Directories reachable: 2 100% Directory reachable max depth: 1 Files: 0 Files reachable: 0 0% Files reachable with recovery: 0 0% Files reachable striped: 0 0% Files reachable object store: 0 0% Files reachable sum of logical sizes: 0 1 Files reachable lost: 0 0% 2 Files reachable lost if server down: 0 0% 3 Files reachable lost if rack down: 0 0% 4 Files reachable abandoned: 0 0% 5 Files reachable ok: 0 0% File reachable max size: 0 File reachable max chunks: 0 File reachable max replication: 0 File reachable max object store blocks: 0 Chunks: 0 Chunks reachable: 0 0% Chunks reachable lost: 0 0% Chunks reachable no rack assigned: 0 0% Chunks reachable over replicated: 0 0% Chunks reachable under replicated: 0 0% Chunks reachable replicas: 0 0% Chunk reachable max replicas: 0 Recovery blocks reachable: 0 Recovery blocks reachable partial: 0 0% Object store blocks reachable: 0 Fsck run time: 0.000201 sec. Files: [fsck_state size replication type stripes recovery_stripes stripe_size chunk_count mtime path] 10-14-2016 01:51:49.826 DEBUG - version: master-a79aaf7324e4ee55609c55cca73a6bbe8d01e12c-RelWithDebInfo-2DC1BDBD master-https://github.com/quantcast/qfs.git/unknown@a79aaf7324e4ee55609c55cc\ a73a6bbe8d01e12c 10-14-2016 01:51:49.829 DEBUG - (KfsNetClient.cc:1347) connecting to server: metaserver-ip 20000 auth: off 10-14-2016 01:51:49.832 DEBUG - (MonClient.cc:164) op completed: FSCK status: 0 status: 0 msg:
[qfs@my-computer tools]$ ./qfsstats -m -s metaserver-ip -p 20000 Net Fds N/w Bytes In N/w Bytes Out 4 327566 10740 4 327669 11702 4 331903 12739 4 332006 13701 4 354339 14738 4 354442 15700 4 358677 16737 4 358780 17699
[qfs@my-computer tools]$ ./qfsstats -c -s chunkserver-ip -p 22000 Net Fds N/w Bytes In N/w Bytes Out Disk Fds Disk Bytes In Disk Bytes Out Net Fds N/w Bytes In N/w Bytes Out Disk Fds Disk Bytes In Disk Bytes Out 3 3913 361567 0 0 0 3 4018 362155 0 0 0 3 4198 366880 0 0 0
和qfsadmin 加上– fsck输出差不多,但是这里最后有一行Filesystem is HEALTHY,所以这个工具更方便快速诊断,应该优先使用
[qfs@my-computer bin]$ ./qfsfsck -m metaserver-ip -p 20000 Lost files total: 0 Directories: 2 Directories reachable: 2 100% Directory reachable max depth: 1 Files: 0 Files reachable: 0 0% Files reachable with recovery: 0 0% Files reachable striped: 0 0% Files reachable object store: 0 0% Files reachable sum of logical sizes: 0 1 Files reachable lost: 0 0% 2 Files reachable lost if server down: 0 0% 3 Files reachable lost if rack down: 0 0% 4 Files reachable abandoned: 0 0% 5 Files reachable ok: 0 0% File reachable max size: 0 File reachable max chunks: 0 File reachable max replication: 0 File reachable max object store blocks: 0 Chunks: 0 Chunks reachable: 0 0% Chunks reachable lost: 0 0% Chunks reachable no rack assigned: 0 0% Chunks reachable over replicated: 0 0% Chunks reachable under replicated: 0 0% Chunks reachable replicas: 0 0% Chunk reachable max replicas: 0 Recovery blocks reachable: 0 Recovery blocks reachable partial: 0 0% Object store blocks reachable: 0 Fsck run time: 0.000156 sec. Files: [fsck_state size replication type stripes recovery_stripes stripe_size chunk_count mtime path] Filesystem is HEALTHY