【原創】大數據基礎之Kudu(5)kudu增加或刪除目錄/數據盤


kudu加減數據盤不能直接修改配置fs_data_dirs后重啟,否則會報錯:

Check failed: _s.ok() Bad status: Already present: FS layout already exists; not overwriting existing layout: FSManager roots already exist: /data0/kudu/data

官方解釋如下:

When Kudu starts, it checks each configured data directory, expecting either for all to be initialized or for all to be empty. If a server fails to start with a log message like
then this precondition has failed. This could be because Kudu was configured with non-empty data directories on first startup, or because a previously-running, healthy Kudu process was restarted and at least one data directory was deleted or is somehow corrupted, perhaps because of a disk error. If in the latter situation, consult the Changing Directory Configurations documentation.

For higher read parallelism and larger volumes of storage per server, users may want to configure servers to store data in multiple directories on different devices. Once a server is started, users must go through the following steps to change the directory configuration.
Users can add or remove data directories to an existing master or tablet server via the kudu fs update_dirs tool. Data is striped across data directories, and when a new data directory is added, new data will be striped across the union of the old and new directories.
The tool can only run while the server is offline, so establish a maintenance window to update the server. The tool itself runs quickly, so this offline window should be brief, and as such, only the server to update needs to be offline. However, if the server is offline for too long (see the follower_unavailable_considered_failed_sec flag), the tablet replicas on it may be evicted from their Raft groups. To avoid this, it may be desirable to bring the entire cluster offline while performing the update.

 

操作過程為:

  • 修改kudu配置(增加或刪除目錄/數據盤),但不重啟kudu;
  • 逐台操作tserver
    •   關閉一台tserver
    •   在這台tserver上執行 kudu fs update_dirs
    •   執行完成后啟動tserver

增加數據盤后使用rebalance命令

kudu cluster rebalance

參考:
https://kudu.apache.org/releases/1.7.0/docs/troubleshooting.html#disk_issues
https://kudu.apache.org/releases/1.7.0/docs/administration.html#change_dir_config

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM